# HG changeset patch # User Sushil khanchi # Date 1596564848 -19800 # Node ID 159d6c0c7dbb77efedd04492b2e7020390a57518 # Parent 4c3656aaacc63f5d8c278b36a470fe29ce2bafcd evolve: make consistent usage of variable throughout the func diff -r 4c3656aaacc6 -r 159d6c0c7dbb hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Mon Aug 31 01:10:58 2020 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Tue Aug 04 23:44:08 2020 +0530 @@ -2030,15 +2030,17 @@ """function to continue the interrupted content-divergence resolution.""" tr = repo.transaction(b'evolve') with util.acceptintervention(tr): - divergent = evolvestate[b'divergent'] - base = evolvestate[b'base'] repo = repo.unfiltered() + divergent = repo[evolvestate[b'divergent']] + other = repo[evolvestate[b'other-divergent']] + base = repo[evolvestate[b'base']] if evolvestate[b'relocating-div']: newdiv = _completerelocation(ui, repo, evolvestate) current = repo[evolvestate[b'current']] obsolete.createmarkers(repo, [(current, (repo[newdiv],))], operation=b'evolve') - evolvestate[b'old-divergent'] = repo[divergent].node() + evolvestate[b'old-divergent'] = divergent.node() + divergent = repo[newdiv] evolvestate[b'relocating-div'] = False evolvestate[b'relocated-div'] = newdiv evolvestate[b'temprevs'].append(newdiv) @@ -2046,8 +2048,6 @@ relocatereq = evolvestate[b'relocation-req'] if relocatereq: - divergent = repo[evolvestate[b'divergent']] - other = repo[evolvestate[b'other-divergent']] evolvestate[b'relocating-other'] = True ui.status(_(b'rebasing "other" content-divergent changeset %s on' b' %s\n' % (other, divergent.p1()))) @@ -2056,17 +2056,16 @@ evolvestate[b'old-other'] = other.node() 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() + evolvestate[b'relocated-other'] = newother + evolvestate[b'temprevs'].append(newother) + evolvestate[b'other-divergent'] = newother # continue the resolution by merging the content-divergence - divergent = evolvestate[b'divergent'] - other = evolvestate[b'other-divergent'] - _mergecontentdivergents(repo, progresscb, repo[divergent], - repo[other], repo[base], evolvestate) + _mergecontentdivergents(repo, progresscb, divergent, other, + base, evolvestate) if evolvestate[b'relocating-other']: newother = _completerelocation(ui, repo, evolvestate) + other = repo[newother] current = repo[evolvestate[b'current']] obsolete.createmarkers(repo, [(current, (repo[newother],))], operation=b'evolve') @@ -2075,19 +2074,12 @@ evolvestate[b'temprevs'].append(newother) evolvestate[b'other-divergent'] = newother # continue the resolution by merging the content-divergence - _mergecontentdivergents(repo, progresscb, - repo[divergent], - repo[newother], - repo[base], - evolvestate) + _mergecontentdivergents(repo, progresscb, divergent, + other, base, evolvestate) - divergent = evolvestate[b'divergent'] - other = evolvestate[b'other-divergent'] res, newnode = _completecontentdivergent(ui, repo, progresscb, - repo[divergent], - repo[other], - repo[base], - evolvestate) + divergent, other, + base, evolvestate) origdivergent = evolvestate[b'orig-divergent'] evolvestate[b'replacements'][origdivergent] = newnode ret = (res, newnode)