##// END OF EJS Templates
histedit: pass state to boostrapcontinue...
David Soria Parra -
r22980:b3483bc1 default
parent child Browse files
Show More
@@ -569,9 +569,7 b' def _histedit(ui, repo, *freeargs, **opt'
569 # rebuild state
569 # rebuild state
570 if goal == 'continue':
570 if goal == 'continue':
571 state = readstate(repo)
571 state = readstate(repo)
572 state.parentctx, repl = bootstrapcontinue(ui, repo, state.parentctx,
572 state = bootstrapcontinue(ui, state, opts)
573 state.rules, opts)
574 state.replacements.extend(repl)
575 elif goal == 'abort':
573 elif goal == 'abort':
576 state = readstate(repo)
574 state = readstate(repo)
577 mapping, tmpnodes, leafs, _ntm = processreplacement(repo,
575 mapping, tmpnodes, leafs, _ntm = processreplacement(repo,
@@ -702,8 +700,9 b' def gatherchildren(repo, ctx):'
702 newchildren.pop(0) # remove ctx
700 newchildren.pop(0) # remove ctx
703 return newchildren
701 return newchildren
704
702
705 def bootstrapcontinue(ui, repo, parentctx, rules, opts):
703 def bootstrapcontinue(ui, state, opts):
706 action, currentnode = rules.pop(0)
704 repo, parentctx = state.repo, state.parentctx
705 action, currentnode = state.rules.pop(0)
707 ctx = repo[currentnode]
706 ctx = repo[currentnode]
708
707
709 newchildren = gatherchildren(repo, parentctx)
708 newchildren = gatherchildren(repo, parentctx)
@@ -758,8 +757,11 b' def bootstrapcontinue(ui, repo, parentct'
758 elif newchildren:
757 elif newchildren:
759 # otherwise update "parentctx" before proceeding to further operation
758 # otherwise update "parentctx" before proceeding to further operation
760 parentctx = repo[newchildren[-1]]
759 parentctx = repo[newchildren[-1]]
761 return parentctx, replacements
762
760
761 state.parentctx = parentctx
762 state.replacements.extend(replacements)
763
764 return state
763
765
764 def between(repo, old, new, keep):
766 def between(repo, old, new, keep):
765 """select and validate the set of revision to edit
767 """select and validate the set of revision to edit
General Comments 0
You need to be logged in to leave comments. Login now