changeset 25457:2afa748138e0

sshpeer: allow doublepipe on unbuffered main pipe The output pipe does not have manually managed read buffer (actually, no read anything). To also use the doublepipe for outgoing write (useful to consume remote output when pushing large set of data) we need the doublepipe to work on standard pipe too.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 05 Jun 2015 04:54:23 -0700
parents 408b7979bf03
children 4642f0b803ae
files mercurial/sshpeer.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sshpeer.py	Wed May 20 10:58:29 2015 -0500
+++ b/mercurial/sshpeer.py	Fri Jun 05 04:54:23 2015 -0700
@@ -65,7 +65,7 @@
 
         (This will only wait for data if the setup is supported by `util.poll`)
         """
-        if self._main.hasbuffer:
+        if getattr(self._main, 'hasbuffer', False): # getattr for classic pipe
             return (True, True) # main has data, assume side is worth poking at.
         fds = [self._main.fileno(), self._side.fileno()]
         try: