D4297: util: improve handling of truncated compressed streams
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Mon Aug 20 15:21:24 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1af95139e5ec: util: improve handling of truncated compressed streams (authored by joerg.sonnenberger, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4297?vs=10379&id=10470
REVISION DETAIL
https://phab.mercurial-scm.org/D4297
AFFECTED FILES
mercurial/util.py
CHANGE DETAILS
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -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):
To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list