# HG changeset patch # User Sushil khanchi # Date 1598937102 -19800 # Node ID a4c6c63e0ed5db8deec47917ee4ff320b7eca65b # Parent 2a04af930bad154aa8659c9e2fd6dcba6f05b231 evolve: refactor few lines for clear understanding diff -r 2a04af930bad -r a4c6c63e0ed5 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Mon Aug 31 01:19:12 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Tue Sep 01 10:41:42 2020 +0530 @@ -531,11 +531,11 @@ newdivergent = _relocatedivergent(repo, divergent, repo[succsdivp1], evolvestate) evolvestate[b'old-divergent'] = divergent.node() + evolvestate[b'relocating-div'] = False + evolvestate[b'relocated-div'] = newdivergent + evolvestate[b'temprevs'].append(newdivergent) + evolvestate[b'divergent'] = newdivergent divergent = repo[newdivergent] - evolvestate[b'relocating-div'] = False - evolvestate[b'relocated-div'] = divergent.node() - evolvestate[b'temprevs'].append(divergent.node()) - evolvestate[b'divergent'] = divergent.node() # relocate the other divergent if required if relocatereq: @@ -547,11 +547,11 @@ b' %s\n' % (other, divergent.p1()))) newother = _relocatedivergent(repo, other, divergent.p1(), evolvestate) evolvestate[b'old-other'] = other.node() + evolvestate[b'relocating-other'] = False + evolvestate[b'relocated-other'] = newother + evolvestate[b'temprevs'].append(newother) + evolvestate[b'other-divergent'] = newother other = repo[newother] - evolvestate[b'relocating-other'] = False - evolvestate[b'relocated-other'] = other.node() - evolvestate[b'temprevs'].append(other.node()) - evolvestate[b'other-divergent'] = other.node() _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) @@ -2040,11 +2040,11 @@ obsolete.createmarkers(repo, [(current, (repo[newdiv],))], operation=b'evolve') evolvestate[b'old-divergent'] = divergent.node() - divergent = repo[newdiv] evolvestate[b'relocating-div'] = False evolvestate[b'relocated-div'] = newdiv evolvestate[b'temprevs'].append(newdiv) evolvestate[b'divergent'] = newdiv + divergent = repo[newdiv] relocatereq = evolvestate[b'relocation-req'] if relocatereq: @@ -2054,11 +2054,11 @@ newother = _relocatedivergent(repo, other, divergent.p1(), evolvestate) evolvestate[b'old-other'] = other.node() - other = repo[newother] evolvestate[b'relocating-other'] = False evolvestate[b'relocated-other'] = newother evolvestate[b'temprevs'].append(newother) evolvestate[b'other-divergent'] = newother + other = repo[newother] # continue the resolution by merging the content-divergence _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate) @@ -2066,7 +2066,6 @@ if evolvestate[b'relocating-other']: newother = _completerelocation(ui, repo, evolvestate) evolvestate[b'old-other'] = other.node() - other = repo[newother] current = repo[evolvestate[b'current']] obsolete.createmarkers(repo, [(current, (repo[newother],))], operation=b'evolve') @@ -2074,6 +2073,7 @@ evolvestate[b'relocated-other'] = newother evolvestate[b'temprevs'].append(newother) evolvestate[b'other-divergent'] = newother + other = repo[newother] # continue the resolution by merging the content-divergence _mergecontentdivergents(repo, progresscb, divergent, other, base, evolvestate)