diff mercurial/bundle2.py @ 24878:e530cde6d115 stable

bundle2: disable ouput capture unless we use http (issue4613 issue4615) The current bundle2 processing was capturing all output. This is nice as it provide better meta data about what output what, but this was changing two things: 1) adding a prefix "remote: " to "other" output during local push (issue4613) 2) local and ssh push does not provide real time output anymore (issue4615) As we are unsure about what form should be used in (1) and how to solve (2) we disable output capture in this two cases. Output capture can be forced using an experimental option.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 28 Apr 2015 17:38:02 -0700
parents df0ce98c882f
children d26703eb3dc5
line wrap: on
line diff
--- a/mercurial/bundle2.py	Tue Feb 03 15:01:43 2015 -0500
+++ b/mercurial/bundle2.py	Tue Apr 28 17:38:02 2015 -0700
@@ -268,12 +268,13 @@
     * a way to construct a bundle response when applicable.
     """
 
-    def __init__(self, repo, transactiongetter):
+    def __init__(self, repo, transactiongetter, captureoutput=True):
         self.repo = repo
         self.ui = repo.ui
         self.records = unbundlerecords()
         self.gettransaction = transactiongetter
         self.reply = None
+        self.captureoutput = captureoutput
 
 class TransactionUnavailable(RuntimeError):
     pass
@@ -359,7 +360,7 @@
         # parthandlermapping lookup (any KeyError raised by handler()
         # itself represents a defect of a different variety).
         output = None
-        if op.reply is not None:
+        if op.captureoutput and op.reply is not None:
             op.ui.pushbuffer(error=True, subproc=True)
             output = ''
         try:
@@ -840,6 +841,7 @@
     def __init__(self, ui):
         self.ui = ui
         self.reply = None
+        self.captureoutput = False
 
     @property
     def repo(self):