# HG changeset patch # User Matt Mackall # Date 2007-03-15 23:38:46 # Node ID 90bb1ab53a853b4f52940186dc6010fdf2290903 # Parent 3be4785f8994c52bc648552db4acd9f94d15d88a revlog: attempt to gracefully handle some interleaved damage diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -425,10 +425,13 @@ class revlog(object): self.nodemap[e[-1]] = n n += 1 if inline: + if e[1] < 0: + break off += e[1] if off > l: # some things don't seek well, just read it fp.read(off - l) + break if not st: break