##// END OF EJS Templates
histedit: pass state to processreplacement
David Soria Parra -
r22981:aa1ad959 default
parent child Browse files
Show More
@@ -572,8 +572,7 b' def _histedit(ui, repo, *freeargs, **opt'
572 state = bootstrapcontinue(ui, state, opts)
572 state = bootstrapcontinue(ui, state, opts)
573 elif goal == 'abort':
573 elif goal == 'abort':
574 state = readstate(repo)
574 state = readstate(repo)
575 mapping, tmpnodes, leafs, _ntm = processreplacement(repo,
575 mapping, tmpnodes, leafs, _ntm = processreplacement(repo, state)
576 state.replacements)
577 ui.debug('restore wc to old parent %s\n' % node.short(state.topmost))
576 ui.debug('restore wc to old parent %s\n' % node.short(state.topmost))
578 # check whether we should update away
577 # check whether we should update away
579 parentnodes = [c.node() for c in repo[None].parents()]
578 parentnodes = [c.node() for c in repo[None].parents()]
@@ -649,8 +648,7 b' def _histedit(ui, repo, *freeargs, **opt'
649
648
650 hg.update(repo, state.parentctx.node())
649 hg.update(repo, state.parentctx.node())
651
650
652 mapping, tmpnodes, created, ntm = processreplacement(repo,
651 mapping, tmpnodes, created, ntm = processreplacement(repo, state)
653 state.replacements)
654 if mapping:
652 if mapping:
655 for prec, succs in mapping.iteritems():
653 for prec, succs in mapping.iteritems():
656 if not succs:
654 if not succs:
@@ -841,12 +839,13 b' def verifyrules(rules, repo, ctxs):'
841 hint=_('do you want to use the drop action?'))
839 hint=_('do you want to use the drop action?'))
842 return parsed
840 return parsed
843
841
844 def processreplacement(repo, replacements):
842 def processreplacement(repo, state):
845 """process the list of replacements to return
843 """process the list of replacements to return
846
844
847 1) the final mapping between original and created nodes
845 1) the final mapping between original and created nodes
848 2) the list of temporary node created by histedit
846 2) the list of temporary node created by histedit
849 3) the list of new commit created by histedit"""
847 3) the list of new commit created by histedit"""
848 replacements = state.replacements
850 allsuccs = set()
849 allsuccs = set()
851 replaced = set()
850 replaced = set()
852 fullmapping = {}
851 fullmapping = {}
General Comments 0
You need to be logged in to leave comments. Login now