hgext3rd/evolve/__init__.py
branchstable
changeset 2699 fddaf14783b1
parent 2693 f4b0351fa813
child 2713 be00ffa87889
child 2714 7eff426f999b
--- a/hgext3rd/evolve/__init__.py	Sun Jul 02 17:24:56 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Sun Jul 02 18:07:23 2017 +0200
@@ -1684,9 +1684,11 @@
                    progresscb=None):
     """Stabilize an unstable changeset"""
     pctx = orig.p1()
+    keepbranch = orig.p1().branch() != orig.branch()
     if len(orig.parents()) == 2:
         if not pctx.obsolete():
             pctx = orig.p2()  # second parent is obsolete ?
+            keepbranch = orig.p2().branch() != orig.branch()
         elif orig.p2().obsolete():
             hint = _("Redo the merge (%s) and use `hg prune <old> "
                      "--succ <new>` to obsolete the old one") % orig.hex()[:12]
@@ -1744,7 +1746,6 @@
         repo.ui.note(todo)
         if progresscb:
             progresscb()
-        keepbranch = orig.p1().branch() != orig.branch()
         try:
             relocate(repo, orig, target, pctx, keepbranch)
         except MergeFailure: