Mercurial > hg
changeset 21905:7923648ad915
bundle2-test: use the new way to extend push content
The only core user of the old way were tests. We update them.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 02 Jul 2014 16:10:14 +0200 |
parents | 5fbccbcc07ea |
children | 08dcb572a456 |
files | tests/test-bundle2.t |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bundle2.t Wed Jul 02 15:26:04 2014 +0200 +++ b/tests/test-bundle2.t Wed Jul 02 16:10:14 2014 +0200 @@ -947,8 +947,7 @@ > from mercurial import exchange > from mercurial import extensions > - > def _pushbundle2failpart(orig, pushop, bundler): - > extradata = orig(pushop, bundler) + > def _pushbundle2failpart(pushop, bundler): > reason = pushop.ui.config('failpush', 'reason', None) > part = None > if reason == 'abort': @@ -958,14 +957,14 @@ > if reason == 'race': > # 20 Bytes of crap > bundler.newpart('b2x:check:heads', data='01234567890123456789') - > return extradata + > return lambda op: None > > @bundle2.parthandler("test:abort") > def handleabort(op, part): > raise util.Abort('Abandon ship!', hint="don't panic") > > def uisetup(ui): - > extensions.wrapfunction(exchange, '_pushbundle2extraparts', _pushbundle2failpart) + > exchange.bundle2partsgenerators.insert(0, _pushbundle2failpart) > > EOF