evolve: store the replacements in the evolvestate
This will greatly help when we will be implementing `hg evolve --abort`.
--- a/hgext3rd/evolve/evolvecmd.py Mon Jan 22 18:13:52 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Mon Jan 22 18:18:11 2018 +0530
@@ -1151,12 +1151,11 @@
# For the progress bar to show
count = len(revs)
- replacements = {}
# Order the revisions
if targetcat == 'orphan':
revs = _orderrevs(repo, revs)
- stateopts = {'category': targetcat}
+ stateopts = {'category': targetcat, 'replacements': {}}
evolvestate.addopts(stateopts)
for rev in revs:
curctx = repo[rev]
@@ -1165,6 +1164,6 @@
progresscb, targetcat)
seen += 1
if ret[0]:
- replacements[curctx.node()] = [ret[1]]
+ evolvestate['replacements'][curctx.node()] = [ret[1]]
progresscb()
_cleanup(ui, repo, startnode, showprogress)