# HG changeset patch # User Sushil khanchi # Date 1597233065 -19800 # Node ID 355a7c91ce9afdb13c0485085a311434bad9eb4e # Parent 4c328eb7196e41abf7b10fcaf3997c786496fee4 evolve: rename haspubdiv to haspublicdiv for more clarity diff -r 4c328eb7196e -r 355a7c91ce9a hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Fri Aug 07 00:25:13 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Aug 12 17:21:05 2020 +0530 @@ -312,10 +312,11 @@ evolvestate[b'divergent'] = div.node() evolvestate[b'other-divergent'] = other.node() return div, other - # haspubdiv: to keep track if we are solving public content-divergence - haspubdiv = False + + # haspublicdiv: to keep track if we are solving public content-divergence + haspublicdiv = False if not (divergent.mutable() and other.mutable()): - haspubdiv = True + haspublicdiv = True # for simplicity, we keep public one to local side while merging # (as divergent is kept at local side, pinning public -> divergent) if divergent.mutable(): @@ -404,7 +405,7 @@ pass if otheronly: relocatereq = True - if not haspubdiv: + if not haspublicdiv: # can't swap when public divergence, as public can't move divergent, other = swapnodes(divergent, other) resolutionparent = repo[succsotherp1].node() @@ -427,7 +428,7 @@ # # Otherwise, we are going to rebase the "behind" branch up to the new # brancmap level. - if not haspubdiv: + if not haspublicdiv: divergent, other = swapnodes(divergent, other) resolutionparent = divergent.p1().node() else: @@ -552,8 +553,8 @@ evolvestate) res, newnode = _completecontentdivergent(ui, repo, progresscb, divergent, other, base, evolvestate) - haspubdiv = not (divergent.mutable() and other.mutable()) - if not haspubdiv: + haspublicdiv = not (divergent.mutable() and other.mutable()) + if not haspublicdiv: return (res, newnode) else: publicdiv = repo[evolvestate[b'public-divergent']] @@ -623,9 +624,9 @@ resparent = evolvestate[b'resolutionparent'] # whether we are solving public divergence - haspubdiv = False + haspublicdiv = False if evolvestate.get(b'public-divergent'): - haspubdiv = True + haspublicdiv = True publicnode = evolvestate[b'public-divergent'] publicdiv = repo[publicnode] othernode = evolvestate[b'other-divergent'] @@ -681,14 +682,14 @@ newnode = repo.commit(text=desc, user=user, date=date, extra=extra) new = repo[newnode] hg.updaterepo(repo, new.rev(), False) - if haspubdiv and publicdiv == divergent: + if haspublicdiv and publicdiv == divergent: bypassphase(repo, (divergent, new), operation=b'evolve') else: obsolete.createmarkers(repo, [(divergent, (new,))], operation=b'evolve') # creating markers and moving phases post-resolution - if haspubdiv and publicdiv == other: + if haspublicdiv and publicdiv == other: bypassphase(repo, (other, new), operation=b'evolve') else: obsolete.createmarkers(repo, [(other, (new,))], operation=b'evolve')