Show More
@@ -947,8 +947,7 b' Setting up' | |||||
947 | > from mercurial import exchange |
|
947 | > from mercurial import exchange | |
948 | > from mercurial import extensions |
|
948 | > from mercurial import extensions | |
949 | > |
|
949 | > | |
950 |
> def _pushbundle2failpart( |
|
950 | > def _pushbundle2failpart(pushop, bundler): | |
951 | > extradata = orig(pushop, bundler) |
|
|||
952 | > reason = pushop.ui.config('failpush', 'reason', None) |
|
951 | > reason = pushop.ui.config('failpush', 'reason', None) | |
953 | > part = None |
|
952 | > part = None | |
954 | > if reason == 'abort': |
|
953 | > if reason == 'abort': | |
@@ -958,14 +957,14 b' Setting up' | |||||
958 | > if reason == 'race': |
|
957 | > if reason == 'race': | |
959 | > # 20 Bytes of crap |
|
958 | > # 20 Bytes of crap | |
960 | > bundler.newpart('b2x:check:heads', data='01234567890123456789') |
|
959 | > bundler.newpart('b2x:check:heads', data='01234567890123456789') | |
961 |
> return |
|
960 | > return lambda op: None | |
962 | > |
|
961 | > | |
963 | > @bundle2.parthandler("test:abort") |
|
962 | > @bundle2.parthandler("test:abort") | |
964 | > def handleabort(op, part): |
|
963 | > def handleabort(op, part): | |
965 | > raise util.Abort('Abandon ship!', hint="don't panic") |
|
964 | > raise util.Abort('Abandon ship!', hint="don't panic") | |
966 | > |
|
965 | > | |
967 | > def uisetup(ui): |
|
966 | > def uisetup(ui): | |
968 |
> ex |
|
967 | > exchange.bundle2partsgenerators.insert(0, _pushbundle2failpart) | |
969 | > |
|
968 | > | |
970 | > EOF |
|
969 | > EOF | |
971 |
|
970 |
General Comments 0
You need to be logged in to leave comments.
Login now