sshpeer: use the doublepipe object for the server to client channel
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 20 May 2015 11:41:48 -0500
changeset 25422 8dc5ee5b7b09
parent 25421 3dd3ccf7b807
child 25423 525fbf24b51b
sshpeer: use the doublepipe object for the server to client channel This restores real-time output from ssh server while waiting for protocol data sent by the server.
mercurial/sshpeer.py
tests/test-ssh.t
--- a/mercurial/sshpeer.py	Fri May 22 10:48:11 2015 -0500
+++ b/mercurial/sshpeer.py	Wed May 20 11:41:48 2015 -0500
@@ -160,6 +160,7 @@
         self.pipeo, self.pipei, self.pipee, self.subprocess = sub
 
         self.pipei = util.bufferedinputpipe(self.pipei)
+        self.pipei = doublepipe(self.ui, self.pipei, self.pipee)
 
         # skip any noise generated by remote shell
         self._callstream("hello")
--- a/tests/test-ssh.t	Fri May 22 10:48:11 2015 -0500
+++ b/tests/test-ssh.t	Wed May 20 11:41:48 2015 -0500
@@ -396,8 +396,8 @@
   $ hg push --ssh "sh ../ssh.sh"
   pushing to ssh://user@dummy/*/remote (glob)
   searching for changes
+  remote: Permission denied
   abort: pretxnopen.hg-ssh hook failed
-  remote: Permission denied
   [255]
 
   $ cd ..