##// 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 569 # rebuild state
570 570 if goal == 'continue':
571 571 state = readstate(repo)
572 state.parentctx, repl = bootstrapcontinue(ui, repo, state.parentctx,
573 state.rules, opts)
574 state.replacements.extend(repl)
572 state = bootstrapcontinue(ui, state, opts)
575 573 elif goal == 'abort':
576 574 state = readstate(repo)
577 575 mapping, tmpnodes, leafs, _ntm = processreplacement(repo,
@@ -702,8 +700,9 b' def gatherchildren(repo, ctx):'
702 700 newchildren.pop(0) # remove ctx
703 701 return newchildren
704 702
705 def bootstrapcontinue(ui, repo, parentctx, rules, opts):
706 action, currentnode = rules.pop(0)
703 def bootstrapcontinue(ui, state, opts):
704 repo, parentctx = state.repo, state.parentctx
705 action, currentnode = state.rules.pop(0)
707 706 ctx = repo[currentnode]
708 707
709 708 newchildren = gatherchildren(repo, parentctx)
@@ -758,8 +757,11 b' def bootstrapcontinue(ui, repo, parentct'
758 757 elif newchildren:
759 758 # otherwise update "parentctx" before proceeding to further operation
760 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 766 def between(repo, old, new, keep):
765 767 """select and validate the set of revision to edit
General Comments 0
You need to be logged in to leave comments. Login now