changeset 5558:5f2c85ea8b33

evolve: set other side of public content div using mutability In upcoming behavior we will no longer be confident that evovlestate['other-divergent'] will always contain the mutable side of public content divergence since we won't swap the "divergent" and "other" cset (the swapping is used right now when "divergent" side need to relocate, because we keep the one which need relocation to `other` side)
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Mon, 31 Aug 2020 15:35:31 +0530
parents ca45afafd94f
children eb09d05f69f3
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Mon Aug 31 15:34:12 2020 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Aug 31 15:35:31 2020 +0530
@@ -628,8 +628,7 @@
         haspublicdiv = True
         publicnode = evolvestate[b'public-divergent']
         publicdiv = repo[publicnode]
-        othernode = evolvestate[b'other-divergent']
-        otherdiv = repo[othernode]
+        otherdiv = other if other.mutable() else divergent
 
         with repo.dirstate.parentchange(), compat.parentchange(repo):
             cmdrewrite.movedirstate(repo, repo[publicnode])