--- a/mercurial/sshpeer.py Mon Jul 16 16:46:32 2018 +0200
+++ b/mercurial/sshpeer.py Thu Jul 12 18:46:10 2018 +0200
@@ -99,6 +99,17 @@
_forwardoutput(self._ui, self._side)
return r
+ def unbufferedread(self, size):
+ r = self._call('unbufferedread', size)
+ if size != 0 and not r:
+ # We've observed a condition that indicates the
+ # stdout closed unexpectedly. Check stderr one
+ # more time and snag anything that's there before
+ # letting anyone know the main part of the pipe
+ # closed prematurely.
+ _forwardoutput(self._ui, self._side)
+ return r
+
def readline(self):
return self._call('readline')