# HG changeset patch # User Matt Mackall # Date 1190412818 18000 # Node ID 599f3a690d8f70963c81c5094ed173950cd35cf8 # Parent ba3dc78839686ccb285f4227a80356f7b13e6f8f debugindex: more robust for damaged indexes diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -803,7 +803,10 @@ def debugindex(ui, file_): " 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])))