changeset 9180:efe990445b33

merge with -stable
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 19 Jul 2009 21:15:40 +0200
parents 9e5e2e07cf81 (current diff) d12e9b40e444 (diff)
children 8864112d4f57
files hgext/graphlog.py
diffstat 3 files changed, 31 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/graphlog.py	Sun Jul 19 18:44:20 2009 +0200
+++ b/hgext/graphlog.py	Sun Jul 19 21:15:40 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:
@@ -339,7 +341,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:
--- a/tests/test-glog	Sun Jul 19 18:44:20 2009 +0200
+++ b/tests/test-glog	Sun Jul 19 21:15:40 2009 +0200
@@ -169,6 +169,6 @@
 cd ..
 hg clone -U -r31 repo repo2
 cd repo2
-hg incoming -q --graph
+hg incoming --graph ../repo
 cd ..
 hg -R repo outgoing --graph repo2
--- a/tests/test-glog.out	Sun Jul 19 18:44:20 2009 +0200
+++ b/tests/test-glog.out	Sun Jul 19 21:15:40 2009 +0200
@@ -581,13 +581,33 @@
 adding manifests
 adding file changes
 added 31 changesets with 31 changes to 1 files
-o  34:fea3ac5810e0
-|
-| o  33:68608f5145f9
+comparing with ../repo
+searching for changes
+o  changeset:   34:fea3ac5810e0
+|  tag:         tip
+|  parent:      32:d06dffa21a31
+|  user:        test
+|  date:        Thu Jan 01 00:00:34 1970 +0000
+|  summary:     (34) head
 |
-o  32:d06dffa21a31
+| o  changeset:   33:68608f5145f9
+|    parent:      18:1aa84d96232a
+|    user:        test
+|    date:        Thu Jan 01 00:00:33 1970 +0000
+|    summary:     (33) head
 |
-o  27:886ed638191b
+o  changeset:   32:d06dffa21a31
+|  parent:      27:886ed638191b
+|  parent:      31:621d83e11f67
+|  user:        test
+|  date:        Thu Jan 01 00:00:32 1970 +0000
+|  summary:     (32) expand
+|
+o  changeset:   27:886ed638191b
+   parent:      21:d42a756af44d
+   user:        test
+   date:        Thu Jan 01 00:00:27 1970 +0000
+   summary:     (27) collapse
 
 comparing with repo2
 searching for changes