evolve: store the replacements occurred during `hg evolve` at top level
This patch starts storing the replacements made during the `hg evolve` command.
The current dictionary is not used anywhere but will be used in future as we
want to introduce abort functionality, so we want to delay writing of
obsmarkers, storing these exchanges in statefile etc.
--- a/hgext3rd/evolve/__init__.py Sat Jan 27 16:13:19 2018 +0530
+++ b/hgext3rd/evolve/__init__.py Tue Jan 16 17:14:32 2018 +0530
@@ -1620,14 +1620,18 @@
# For the progress bar to show
count = len(revs)
+ replacements = {}
# Order the revisions
if targetcat == 'orphan':
revs = _orderrevs(repo, revs)
for rev in revs:
+ curctx = repo[rev]
progresscb()
- _solveone(ui, repo, repo[rev], dryrunopt, confirmopt,
- progresscb, targetcat)
+ ret = _solveone(ui, repo, curctx, dryrunopt, confirmopt,
+ progresscb, targetcat)
seen += 1
+ if ret[0]:
+ replacements[curctx.node()] = [ret[1]]
progresscb()
_cleanup(ui, repo, startnode, showprogress)