sshpeer: use a 'bufferedinputpipe' for standard output of the ssh process
We need this pipe to still be buffered when will switch to unbuffered pipe.
(switch motivated by the need of using polling to restore real time output from
ssh server). This is the only pipe that needs to be wrapped because this is the
one who do extensive usage of 'readline'. The stderr pipe of the process is
alway read in non blocking raw chunk, so it won't benefit from the
buffering.
--- a/mercurial/sshpeer.py Sat May 30 23:55:24 2015 -0700
+++ b/mercurial/sshpeer.py Sun May 31 00:00:36 2015 -0700
@@ -89,6 +89,8 @@
# to clean up correctly later
self.pipeo, self.pipei, self.pipee, self.subprocess = util.popen4(cmd)
+ self.pipei = util.bufferedinputpipe(self.pipei)
+
# skip any noise generated by remote shell
self._callstream("hello")
r = self._callstream("between", pairs=("%s-%s" % ("0"*40, "0"*40)))