evolve: store the replacements occurred during `hg evolve` at top level
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 16 Jan 2018 17:14:32 +0530
changeset 3459 218fbcc3220c
parent 3458 210132852a3d
child 3460 ada7fb453034
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.
hgext3rd/evolve/__init__.py
--- 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)