Commit 04bde74e authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

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".
parent 18fe83bf7b14
......@@ -318,8 +318,8 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
# 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 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
# 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 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
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'other-divergent'] = other.node()
......@@ -1833,13 +1833,13 @@ def stopevolve(ui, repo, evolvestate):
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 @@ def _continuecontentdivergent(ui, repo, evolvestate, progresscb):
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],))],
evolvestate[b'relocating'] = False
evolvestate[b'relocated'] = newother
evolvestate[b'relocating-other'] = False
evolvestate[b'relocated-other'] = newother
evolvestate[b'other-divergent'] = newother
# continue the resolution by merging the content-divergence
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment