evolve: abort if deciding resolution parent is ambiguous stable
authorSushil khanchi <sushilkhanchi97@gmail.com>
Fri, 06 Dec 2019 23:43:00 +0530
branchstable
changeset 4992 1eab41625dee
parent 4991 2928f35023a1
child 4993 e0b5ce458af5
evolve: abort if deciding resolution parent is ambiguous While solving content-divergence, it could be hard to decide which cset should be treated as a resolution parent if there are multiple successors of divergent cset. i.e split case. But we are planning to make some update in handling this split case: 1) consider highest one if all splitted csets are in a single topological branch 2) still need to decide if 1) doesn't apply
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Sat Nov 23 16:17:04 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Dec 06 23:43:00 2019 +0530
@@ -504,7 +504,8 @@
     try:
         succsdivp1 = utility._singlesuccessor(repo, divergent.p1())
     except utility.MultipleSuccessorsError:
-        succsdivp1 = divergent.p1().rev()
+        msg = _(b"ambiguous orphan resolution parent for %b")
+        raise error.Abort(msg % divergent.hex()[:12])
     # relocate divergent cset to its obsolete parent's successsor
     if succsdivp1 != divergent.p1().rev():
         ui.status(_(b'rebasing "divergent" content-divergent changeset %s on'