Patchwork [3,of,4] sshpeer: use the doublepipe object for the server to client channel

login
register
mail settings
Submitter Pierre-Yves David
Date June 3, 2015, 8:26 p.m.
Message ID <44b96431e75236a4124b.1433363192@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9463/
State Superseded
Commit 8dc5ee5b7b091413f01b2c2de4374c6f7228cd74
Headers show

Comments

Pierre-Yves David - June 3, 2015, 8:26 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1432140108 18000
#      Wed May 20 11:41:48 2015 -0500
# Node ID 44b96431e75236a4124ba310ee45371594eb3511
# Parent  c27dfc2cf0a3bd00d5c6037d1cdb0960bbb50070
sshpeer: use the doublepipe object for the server to client channel

This restore real time output from ssh server while waiting for protocol data
sent by the server.

Patch

diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py
--- a/mercurial/sshpeer.py
+++ b/mercurial/sshpeer.py
@@ -158,10 +158,11 @@  class sshpeer(wireproto.wirepeer):
         # move to threading.
         sub = util.popen4(cmd, bufsize=0)
         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")
         r = self._callstream("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
         lines = ["", "dummy"]