diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
index 2f88821856eb997b826e47d33d57c003faa3493a_bWVyY3VyaWFsL2J1bmRsZTIucHk=..aff2aca3420e6d238b537378deb94350d8a707ac_bWVyY3VyaWFsL2J1bmRsZTIucHk= 100644
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -354,7 +354,7 @@
         # 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
index 2f88821856eb997b826e47d33d57c003faa3493a_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5..aff2aca3420e6d238b537378deb94350d8a707ac_bWVyY3VyaWFsL2V4Y2hhbmdlLnB5 100644
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1303,7 +1303,7 @@
                 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
index 2f88821856eb997b826e47d33d57c003faa3493a_dGVzdHMvdGVzdC1idW5kbGUyLWV4Y2hhbmdlLnQ=..aff2aca3420e6d238b537378deb94350d8a707ac_dGVzdHMvdGVzdC1idW5kbGUyLWV4Y2hhbmdlLnQ= 100644
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -549,6 +549,7 @@
   > reason =
   > [hooks]
   > pretxnclose.failpush = false
+  > txnabort.failpush = echo 'Cleaning up the mess...'
   > EOF
 
   $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
@@ -564,6 +565,7 @@
   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 @@
   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 @@
   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]