changeset 3481:93bb36b4a666

evolve: store the replacements in the evolvestate This will greatly help when we will be implementing `hg evolve --abort`.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 22 Jan 2018 18:18:11 +0530
parents 1799fc777f30
children 7f646d98858e
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)