diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -22,9 +22,11 @@ from mercurial import hg, url, util, gra 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 @@ def gincoming(ui, repo, source="default" 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 --git a/tests/test-glog b/tests/test-glog --- a/tests/test-glog +++ b/tests/test-glog @@ -169,6 +169,6 @@ echo % incoming and outgoing 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 --git a/tests/test-glog.out b/tests/test-glog.out --- a/tests/test-glog.out +++ b/tests/test-glog.out @@ -581,13 +581,33 @@ adding changesets 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