Update debugindexdot to work with RevlogNG.
authorSamuel Masham <samuel.masham@gmail.com>
Mon, 15 May 2006 08:53:32 -0700
changeset 2287 3f18d1eea370
parent 2286 9f745d3675d4
child 2288 dfa17bd1d45e
Update debugindexdot to work with RevlogNG.
mercurial/commands.py
--- a/mercurial/commands.py	Mon May 15 08:47:42 2006 -0700
+++ b/mercurial/commands.py	Mon May 15 08:53:32 2006 -0700
@@ -1305,10 +1305,11 @@
     r = revlog.revlog(util.opener(os.getcwd(), audit=False), file_, "", 0)
     ui.write("digraph G {\n")
     for i in range(r.count()):
-        e = r.index[i]
-        ui.write("\t%d -> %d\n" % (r.rev(e[4]), i))
-        if e[5] != nullid:
-            ui.write("\t%d -> %d\n" % (r.rev(e[5]), i))
+        node = r.node(i)
+        pp = r.parents(node)
+        ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))
+        if pp[1] != nullid:
+            ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
     ui.write("}\n")
 
 def debugrename(ui, repo, file, rev=None):