hgext/graphlog.py
changeset 9176 d12e9b40e444
parent 8934 9dda4c73fc3b
child 9180 efe990445b33
--- a/hgext/graphlog.py	Sun Jul 19 18:23:37 2009 +0200
+++ b/hgext/graphlog.py	Sun Jul 19 18:59:19 2009 +0200
@@ -22,9 +22,11 @@
 
 ASCIIDATA = 'ASC'
 
-def asciiformat(ui, repo, revdag, opts):
+def asciiformat(ui, repo, revdag, opts, parentrepo=None):
     """formats a changelog DAG walk for ASCII output"""
-    showparents = [ctx.node() for ctx in repo[None].parents()]
+    if parentrepo is None:
+        parentrepo = repo
+    showparents = [ctx.node() for ctx in parentrepo[None].parents()]
     displayer = show_changeset(ui, repo, opts, buffered=True)
     for (id, type, ctx, parentids) in revdag:
         if type != graphmod.CHANGESET:
@@ -341,7 +343,7 @@
 
         chlist = other.changelog.nodesbetween(incoming, revs)[0]
         revdag = graphrevs(other, chlist, opts)
-        fmtdag = asciiformat(ui, repo, revdag, opts)
+        fmtdag = asciiformat(ui, other, revdag, opts, parentrepo=repo)
         ascii(ui, asciiedges(fmtdag))
 
     finally: