Mercurial > evolve
changeset 2918:0437158e0ed6
stack: display both parent with displaying merge
This will help understanding merge in the stack. More test involving merge are
adding in the next changeset.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 07 Sep 2017 19:43:07 +0200 |
parents | 044686b25cf7 |
children | 5b514ab2ab4e |
files | hgext3rd/topic/stack.py tests/test-topic-stack.t |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py Sat Sep 09 22:32:44 2017 +0530 +++ b/hgext3rd/topic/stack.py Thu Sep 07 19:43:07 2017 +0200 @@ -170,9 +170,13 @@ prev = ctx.rev() continue p1 = ctx.p1() + p2 = ctx.p2() if p1.obsolete(): p1 = repo[_singlesuccessor(repo, p1)] - if p1.rev() != prev and p1.node() != node.nullid: + if p2.node() != node.nullid: + entries.append((idxmap.get(p1.rev()), False, p1)) + entries.append((idxmap.get(p2.rev()), False, p2)) + elif p1.rev() != prev and p1.node() != node.nullid: entries.append((idxmap.get(p1.rev()), False, p1)) entries.append((idx, True, ctx)) idxmap[ctx.rev()] = idx
--- a/tests/test-topic-stack.t Sat Sep 09 22:32:44 2017 +0530 +++ b/tests/test-topic-stack.t Thu Sep 07 19:43:07 2017 +0200 @@ -627,6 +627,8 @@ t2: c_B ^ c_A t1: c_H + ^ c_G + ^ c_D t0^ c_D (base) $ hg stack blue ### topic: blue (3 heads) @@ -685,6 +687,7 @@ ### topic: red (3 heads) ### branch: default, ambigious rebase destination t5$ c_H (unstable) + ^ c_G ^ c_D t4$ c_C (unstable) t1^ c_B (base) @@ -758,6 +761,7 @@ ### topic: red (3 heads) ### branch: default, ambigious rebase destination t5$ c_H (unstable) + ^ c_G ^ c_D t4$ c_F (unstable) t3$ c_E (unstable)