# HG changeset patch # User Benoit Boissinot # Date 1248030940 -7200 # Node ID efe990445b331256bebd07b29e7a1ef6f56df338 # Parent 9e5e2e07cf8122bb0f00fd64a44d35ba6bd449a1# Parent d12e9b40e4449af10295382cfceff1153dec6879 merge with -stable diff -r 9e5e2e07cf81 -r efe990445b33 hgext/graphlog.py --- 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: diff -r 9e5e2e07cf81 -r efe990445b33 tests/test-glog --- 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 diff -r 9e5e2e07cf81 -r efe990445b33 tests/test-glog.out --- 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