# HG changeset patch # User Sushil khanchi # Date 1597951584 -19800 # Node ID 80e55fbda4a4d9c5c6ab37431901f80d98c439df # Parent d7d954b6d5188ebd8cbe3d794767557cebc500a5 evolve: remove an evolvestate which is no more required diff -r d7d954b6d518 -r 80e55fbda4a4 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sun Sep 20 09:22:04 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Fri Aug 21 00:56:24 2020 +0530 @@ -322,8 +322,7 @@ evolvestate[b'relocate-other'] = True resolutionparent = publicdiv.p1().node() evolvestate[b'public-divergent'] = publicdiv.node() - relocatereq = evolvestate[b'relocate-other'] - return (True, divergent, other, resolutionparent, relocatereq) + return (True, divergent, other, resolutionparent) otherp1 = succsotherp1 = other.p1().rev() divp1 = succsdivp1 = divergent.p1().rev() @@ -362,8 +361,6 @@ # make it exclusive set divonly = set(divonly) - {divergent.rev()} otheronly = set(otheronly) - {other.rev()} - # is relocation of one of the changeset required - relocatereq = False # testing how both the divergent changesets are arranged, there can be 4 # possible cases here: @@ -392,17 +389,15 @@ # to do in this case pass if otheronly: - relocatereq = True resolutionparent = repo[succsotherp1].node() elif divonly: - relocatereq = True + pass else: # no extra cset on either side; so not considering relocation pass elif succsotherp1 in gca and succsdivp1 not in gca: - relocatereq = True + pass elif succsdivp1 in gca and succsotherp1 not in gca: - relocatereq = True resolutionparent = repo[succsotherp1].node() else: msg = _(b"skipping %s: have a different parent than %s " @@ -419,7 +414,7 @@ ui.write_err(hint) return (False, b".") - return (True, divergent, other, resolutionparent, relocatereq) + return (True, divergent, other, resolutionparent) def _relocatedivergent(repo, orig, dest, evolvestate): """relocates a divergent commit and saves the evolve state""" @@ -476,7 +471,6 @@ evolvestate[b'relocating-other'] = False evolvestate[b'relocated-div'] = None evolvestate[b'relocating-div'] = False - evolvestate[b'relocation-req'] = False # in case or relocation we get a new other node, we need to store the old # other for purposes like `--abort` or `--stop` evolvestate[b'old-other'] = None @@ -487,15 +481,13 @@ evolvestate) if not datatoproceed[0]: return (False, b".") - divergent, other, resolutionparent, relocatereq = datatoproceed[1:] + divergent, other, resolutionparent = datatoproceed[1:] if divergent.p1().node() != resolutionparent: evolvestate[b'relocate-div'] = True if other.p1().node() != resolutionparent: evolvestate[b'relocate-other'] = True - if relocatereq: - evolvestate[b'relocation-req'] = True evolvestate[b'resolutionparent'] = resolutionparent if not ui.quiet or confirm: