# HG changeset patch # User Pierre-Yves David # Date 1504806187 -7200 # Node ID 0437158e0ed6ce5a827895f79c091ac8e1b7f8a7 # Parent 044686b25cf7422f8354baa53bc7e2db7a939fbf 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. diff -r 044686b25cf7 -r 0437158e0ed6 hgext3rd/topic/stack.py --- 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 diff -r 044686b25cf7 -r 0437158e0ed6 tests/test-topic-stack.t --- 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)