mercurial/sshpeer.py
changeset 38713 27391d74aaa2
parent 38475 67dc32d4e790
child 39549 089fc0db0954
equal deleted inserted replaced
38712:70a4289896b0 38713:27391d74aaa2
    88     def write(self, data):
    88     def write(self, data):
    89         return self._call('write', data)
    89         return self._call('write', data)
    90 
    90 
    91     def read(self, size):
    91     def read(self, size):
    92         r = self._call('read', size)
    92         r = self._call('read', size)
       
    93         if size != 0 and not r:
       
    94             # We've observed a condition that indicates the
       
    95             # stdout closed unexpectedly. Check stderr one
       
    96             # more time and snag anything that's there before
       
    97             # letting anyone know the main part of the pipe
       
    98             # closed prematurely.
       
    99             _forwardoutput(self._ui, self._side)
       
   100         return r
       
   101 
       
   102     def unbufferedread(self, size):
       
   103         r = self._call('unbufferedread', size)
    93         if size != 0 and not r:
   104         if size != 0 and not r:
    94             # We've observed a condition that indicates the
   105             # We've observed a condition that indicates the
    95             # stdout closed unexpectedly. Check stderr one
   106             # stdout closed unexpectedly. Check stderr one
    96             # more time and snag anything that's there before
   107             # more time and snag anything that's there before
    97             # letting anyone know the main part of the pipe
   108             # letting anyone know the main part of the pipe