Mercurial > evolve
changeset 5515:159d6c0c7dbb
evolve: make consistent usage of variable throughout the func
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Tue, 04 Aug 2020 23:44:08 +0530 |
parents | 4c3656aaacc6 |
children | 2a04af930bad |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 15 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- 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)