# HG changeset patch # User Sushil khanchi # Date 1615146122 -19800 # Node ID 22f4ebf3f7d8b9dd56c98a08ff02e58ef22c8d8f # Parent b0b1ab64f6d83e0c7bd84d7e7e859c4f2e141a8d 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()`. diff -r b0b1ab64f6d8 -r 22f4ebf3f7d8 hgext3rd/evolve/evolvecmd.py --- 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()