diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -354,7 +354,7 @@ def _processpart(op, part): # itself represents a defect of a different variety). output = None if op.reply is not None: - op.ui.pushbuffer(error=True) + op.ui.pushbuffer(error=True, subproc=True) output = '' try: handler(op, part) diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1303,7 +1303,7 @@ def unbundle(repo, cg, heads, source, ur exc.duringunbundle2 = True if r is not None: parts = exc._bundle2salvagedoutput = r.salvageoutput() - repo.ui.pushbuffer(error=True) + repo.ui.pushbuffer(error=True, subproc=True) def recordout(output): part = bundle2.bundlepart('output', data=output, mandatory=False) diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t --- a/tests/test-bundle2-exchange.t +++ b/tests/test-bundle2-exchange.t @@ -549,6 +549,7 @@ Doing the actual push: hook abort > reason = > [hooks] > pretxnclose.failpush = false + > txnabort.failpush = echo 'Cleaning up the mess...' > EOF $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS @@ -564,6 +565,7 @@ Doing the actual push: hook abort remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: transaction abort! + remote: Cleaning up the mess... remote: rollback completed abort: pretxnclose.failpush hook exited with status 1 [255] @@ -576,6 +578,7 @@ Doing the actual push: hook abort remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: transaction abort! + remote: Cleaning up the mess... remote: rollback completed abort: pretxnclose.failpush hook exited with status 1 remote: pre-close-tip:e7ec4e813ba6 draft @@ -589,6 +592,7 @@ Doing the actual push: hook abort remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: transaction abort! + remote: Cleaning up the mess... remote: rollback completed abort: pretxnclose.failpush hook exited with status 1 [255]