revlog: attempt to gracefully handle some interleaved damage
authorMatt Mackall <mpm@selenic.com>
Thu, 15 Mar 2007 18:38:46 -0500
changeset 4215 90bb1ab53a85
parent 4213 3be4785f8994
child 4218 2216535f07d7
revlog: attempt to gracefully handle some interleaved damage
mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Mar 14 19:13:04 2007 -0500
+++ b/mercurial/revlog.py	Thu Mar 15 18:38:46 2007 -0500
@@ -425,10 +425,13 @@
                 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