Mercurial > evolve
changeset 5014:35870ce163ee
evolve: use more specific key name to store in evolvestate
Now, as we also relocate divergent cset if required, so let's use
more specific key to track the relocation of "divergent" and "other".
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Mon, 25 Nov 2019 19:12:51 +0530 |
parents | 18fe83bf7b14 |
children | 43f4784a3f21 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Fri Dec 13 01:29:27 2019 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Mon Nov 25 19:12:51 2019 +0530 @@ -318,8 +318,8 @@ # strip that relocated commit. However if `--all` is passed, we need to # reset this value for each content-divergence resolution which we are doing # below. - evolvestate[b'relocated'] = None - evolvestate[b'relocating'] = False + evolvestate[b'relocated-other'] = None + evolvestate[b'relocating-other'] = 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 @@ -526,7 +526,7 @@ # relocating will help us understand during the time of conflicts that # whether conflicts occur at reloacting or they occured at merging # content divergent changesets - evolvestate[b'relocating'] = True + evolvestate[b'relocating-other'] = True ui.status(_(b'rebasing "other" content-divergent changeset %s on' b' %s\n' % (other, divergent.p1()))) with state.saver(evolvestate, {b'current': other.node()}): @@ -534,8 +534,8 @@ keepbranch=True) evolvestate[b'old-other'] = other.node() other = repo[newother] - evolvestate[b'relocating'] = False - evolvestate[b'relocated'] = other.node() + evolvestate[b'relocating-other'] = False + evolvestate[b'relocated-other'] = other.node() evolvestate[b'temprevs'].append(other.node()) evolvestate[b'other-divergent'] = other.node() @@ -1833,13 +1833,13 @@ pctx = None if (evolvestate[b'command'] == b'evolve' and evolvestate[b'category'] == b'contentdivergent' - and evolvestate[b'relocated']): + and evolvestate[b'relocated-other']): oldother = evolvestate[b'old-other'] if oldother: with repo.wlock(), repo.lock(): repo = repo.unfiltered() hg.updaterepo(repo, oldother, True) - strips = [evolvestate[b'relocated']] + strips = [evolvestate[b'relocated-other']] repair.strip(ui, repo, strips, False) updated = True pctx = repo[oldother] @@ -2013,13 +2013,13 @@ divergent = evolvestate[b'divergent'] base = evolvestate[b'base'] repo = repo.unfiltered() - if evolvestate[b'relocating']: + if evolvestate[b'relocating-other']: newother = _completerelocation(ui, repo, evolvestate) current = repo[evolvestate[b'current']] obsolete.createmarkers(repo, [(current, (repo[newother],))], operation=b'evolve') - evolvestate[b'relocating'] = False - evolvestate[b'relocated'] = newother + evolvestate[b'relocating-other'] = False + evolvestate[b'relocated-other'] = newother evolvestate[b'temprevs'].append(newother) evolvestate[b'other-divergent'] = newother # continue the resolution by merging the content-divergence