hgext/histedit.py
changeset 22981 aa1ad9594dde
parent 22980 b3483bc1ec8c
child 22982 52f10a4d13dd
--- a/hgext/histedit.py	Wed Oct 15 08:06:15 2014 -0700
+++ b/hgext/histedit.py	Thu Oct 16 10:06:49 2014 -0700
@@ -572,8 +572,7 @@
         state = bootstrapcontinue(ui, state, opts)
     elif goal == 'abort':
         state = readstate(repo)
-        mapping, tmpnodes, leafs, _ntm = processreplacement(repo,
-                state.replacements)
+        mapping, tmpnodes, leafs, _ntm = processreplacement(repo, state)
         ui.debug('restore wc to old parent %s\n' % node.short(state.topmost))
         # check whether we should update away
         parentnodes = [c.node() for c in repo[None].parents()]
@@ -649,8 +648,7 @@
 
     hg.update(repo, state.parentctx.node())
 
-    mapping, tmpnodes, created, ntm = processreplacement(repo,
-            state.replacements)
+    mapping, tmpnodes, created, ntm = processreplacement(repo, state)
     if mapping:
         for prec, succs in mapping.iteritems():
             if not succs:
@@ -841,12 +839,13 @@
                          hint=_('do you want to use the drop action?'))
     return parsed
 
-def processreplacement(repo, replacements):
+def processreplacement(repo, state):
     """process the list of replacements to return
 
     1) the final mapping between original and created nodes
     2) the list of temporary node created by histedit
     3) the list of new commit created by histedit"""
+    replacements = state.replacements
     allsuccs = set()
     replaced = set()
     fullmapping = {}