changeset 5578:b0234a269f29

evolve: update public content divergence acc. to new behavior Now this method _pickresolutionparent() is to decide which cset would be the resolution parent and no need to update evolvestate here since we do that later.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Fri, 21 Aug 2020 16:22:24 +0530
parents 2f78cb38620f
children 6289ddfb9d48
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Fri Aug 21 01:28:33 2020 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Aug 21 16:22:24 2020 +0530
@@ -303,7 +303,6 @@
 
     if not (divergent.mutable() and other.mutable()):
         # Public divergence: we keep public one to local side while merging
-        sameparent = divergent.p1().rev() == other.p1().rev()
         # When public branch is behind to the mutable branch, for now we
         # relocate mutable cset to public one's side in every case.
         #
@@ -312,14 +311,7 @@
         #
         # Otherwise, we are going to rebase the "behind" branch up to the new
         # brancmap level.
-        if divergent.mutable():
-            publicdiv = other
-            if not sameparent:
-                evolvestate[b'relocate-div'] = True
-        else:
-            publicdiv = divergent
-            if not sameparent:
-                evolvestate[b'relocate-other'] = True
+        publicdiv = divergent if other.mutable() else other
         resolutionparent = publicdiv.p1().node()
         evolvestate[b'public-divergent'] = publicdiv.node()
         return (True, resolutionparent)