mercurial/util.py
changeset 39237 1af95139e5ec
parent 39097 ed8160e4fea0
child 39285 497effb0a04a
--- a/mercurial/util.py	Fri Aug 10 23:24:33 2018 +0800
+++ b/mercurial/util.py	Thu Aug 16 05:50:49 2018 +0200
@@ -3377,6 +3377,9 @@
                 return ''.join(buf)
             chunk = self._reader(65536)
             self._decompress(chunk)
+            if not chunk and not self._pending and not self._eof:
+                # No progress and no new data, bail out
+                return ''.join(buf)
 
 class _GzipCompressedStreamReader(_CompressedStreamReader):
     def __init__(self, fh):