diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -112,7 +112,10 @@ def decompress(bin): if t == '\0': return bin if t == 'x': - return _decompress(bin) + try: + return _decompress(bin) + except zlib.error, e: + raise RevlogError(_("revlog decompress error: %s") % str(e)) if t == 'u': return bin[1:] raise RevlogError(_("unknown compression type %r") % t)