diff hgext3rd/topic/stack.py @ 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 17749d9d3968
children 5b514ab2ab4e
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