Mercurial > evolve
changeset 5517:a4c6c63e0ed5
evolve: refactor few lines for clear understanding
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Tue, 01 Sep 2020 10:41:42 +0530 |
parents | 2a04af930bad |
children | af835b32e155 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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)