diff mercurial/sshpeer.py @ 25243:d65243d28749

sshpeer: break "OutOfBandError" feature for ssh (BC) When we'll be using the ssh's 'stderr' for realtime output successfully, it will no longer be possible to use 'stderr' to carry the error message (because it is already consumed by the real time output logic. This feature is very rarely used (test says largefile only) and I think breaking its output pattern is worth the benefit of having real time output with ssh.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 20 May 2015 12:33:12 -0500
parents 14ac0c1579cd
children cf90764f40a4
line wrap: on
line diff
--- a/mercurial/sshpeer.py	Wed May 20 18:17:40 2015 -0500
+++ b/mercurial/sshpeer.py	Wed May 20 12:33:12 2015 -0500
@@ -195,16 +195,9 @@
     def _recv(self):
         l = self.pipei.readline()
         if l == '\n':
-            err = []
-            while True:
-                line = self.pipee.readline()
-                if line == '-\n':
-                    break
-                err.extend([line])
-            if len(err) > 0:
-                # strip the trailing newline added to the last line server-side
-                err[-1] = err[-1][:-1]
-            self._abort(error.OutOfBandError(*err))
+            self.readerr()
+            msg = _('check previous remote output')
+            self._abort(error.OutOfBandError(hint=msg))
         self.readerr()
         try:
             l = int(l)