changeset 2287:3f18d1eea370

Update debugindexdot to work with RevlogNG.
author Samuel Masham <samuel.masham@gmail.com>
date Mon, 15 May 2006 08:53:32 -0700
parents 9f745d3675d4
children dfa17bd1d45e
files mercurial/commands.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):