changeset 5858:22f4ebf3f7d8

evolve: update some conditionals Now as we know that, in public-content-divergence cset in public phase will always be the `divergent` one. We don't need to check `if not other.mutable()`.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Mon, 08 Mar 2021 01:12:02 +0530
parents b0b1ab64f6d8
children 1bd2c4f147e1
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Mon Mar 08 17:45:57 2021 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Mar 08 01:12:02 2021 +0530
@@ -301,7 +301,7 @@
         ui.write_err(hint)
         return (False, b".")
 
-    if not (divergent.mutable() and other.mutable()):
+    if not divergent.mutable():
         # Public divergence: we keep public one to local side while merging
         # When public branch is behind to the mutable branch, for now we
         # relocate mutable cset to public one's side in every case.
@@ -311,9 +311,8 @@
         #
         # Otherwise, we are going to rebase the "behind" branch up to the new
         # brancmap level.
-        publicdiv = divergent if other.mutable() else other
-        resolutionparent = publicdiv.p1().rev()
-        evolvestate[b'public-divergent'] = publicdiv.node()
+        resolutionparent = divergent.p1().rev()
+        evolvestate[b'public-divergent'] = divergent.node()
         return (True, resolutionparent)
 
     otherp1 = succsotherp1 = other.p1().rev()