changeset 5311:599f3a690d8f

debugindex: more robust for damaged indexes
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Sep 2007 17:13:38 -0500
parents ba3dc7883968
children fb070713ff36
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Sep 15 16:07:05 2007 +0200
+++ b/mercurial/commands.py	Fri Sep 21 17:13:38 2007 -0500
@@ -803,7 +803,10 @@
              " nodeid       p1           p2\n")
     for i in xrange(r.count()):
         node = r.node(i)
-        pp = r.parents(node)
+        try:
+            pp = r.parents(node)
+        except:
+            pp = [nullid, nullid]
         ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % (
                 i, r.start(i), r.length(i), r.base(i), r.linkrev(node),
             short(node), short(pp[0]), short(pp[1])))