changeset 4443:fc2214916f50

evolve: add condition in case of pubdiv to not swap the two div csets In public divergence, we have pinned the public cset to the local side when merge is performed. And in divergence resolution implementation divergent cset is the one who is kept at the local side, so to say this in one line: we have pinned public cset to the divergent side. However, in some cases we need to swap the "divergent" and "other" but we can't swap them in case of public divergence as thought would cause an error because of not being able to relocate public cset.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sun, 24 Mar 2019 21:29:44 +0530
parents 819bad275701
children ea336a6592cc
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Sat Mar 23 02:10:31 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Sun Mar 24 21:29:44 2019 +0530
@@ -456,10 +456,12 @@
                 pass
             if otheronly:
                 relocatereq = True
-                divergent, other = other, divergent
-                evolvestate['divergent'] = divergent.node()
-                evolvestate['other-divergent'] = other.node()
-                resolutionparent = repo[otherp1].node()
+                if not haspubdiv:
+                    # can't swap when public divergence, as public can't move
+                    divergent, other = other, divergent
+                    evolvestate['divergent'] = divergent.node()
+                    evolvestate['other-divergent'] = other.node()
+                    resolutionparent = repo[otherp1].node()
             elif divonly:
                 relocatereq = True
             else: