# HG changeset patch # User Pierre-Yves David # Date 1404310214 -7200 # Node ID 7923648ad915ab06c0dba852ffcdfc62c2364362 # Parent 5fbccbcc07ea1ba94d5dad91bf48925b99bdc0ce bundle2-test: use the new way to extend push content The only core user of the old way were tests. We update them. diff -r 5fbccbcc07ea -r 7923648ad915 tests/test-bundle2.t --- 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