Show More
@@ -573,25 +573,9 b' class drop(histeditaction):' | |||||
573 | parentctx = self.repo[self.state.parentctxnode] |
|
573 | parentctx = self.repo[self.state.parentctxnode] | |
574 | return parentctx, [(self.node, tuple())] |
|
574 | return parentctx, [(self.node, tuple())] | |
575 |
|
575 | |||
576 | def message(ui, state, ha, opts): |
|
576 | class message(histeditaction): | |
577 | repo, ctxnode = state.repo, state.parentctxnode |
|
577 | def commiteditor(self): | |
578 | ctx = repo[ctxnode] |
|
578 | return cmdutil.getcommiteditor(edit=True, editform='histedit.mess') | |
579 | oldctx = repo[ha] |
|
|||
580 | hg.update(repo, ctx.node()) |
|
|||
581 | stats = applychanges(ui, repo, oldctx, opts) |
|
|||
582 | if stats and stats[3] > 0: |
|
|||
583 | raise error.InterventionRequired( |
|
|||
584 | _('Fix up the change and run hg histedit --continue')) |
|
|||
585 | message = oldctx.description() |
|
|||
586 | commit = commitfuncfor(repo, oldctx) |
|
|||
587 | editor = cmdutil.getcommiteditor(edit=True, editform='histedit.mess') |
|
|||
588 | new = commit(text=message, user=oldctx.user(), date=oldctx.date(), |
|
|||
589 | extra=oldctx.extra(), editor=editor) |
|
|||
590 | newctx = repo[new] |
|
|||
591 | if oldctx.node() != newctx.node(): |
|
|||
592 | return newctx, [(oldctx.node(), (new,))] |
|
|||
593 | # We didn't make an edit, so just indicate no replaced nodes |
|
|||
594 | return newctx, [] |
|
|||
595 |
|
579 | |||
596 | def findoutgoing(ui, repo, remote=None, force=False, opts={}): |
|
580 | def findoutgoing(ui, repo, remote=None, force=False, opts={}): | |
597 | """utility function to find the first outgoing changeset |
|
581 | """utility function to find the first outgoing changeset | |
@@ -923,8 +907,8 b' def bootstrapcontinue(ui, state, opts):' | |||||
923 | message = 'fold-temp-revision %s' % currentnode[:12] |
|
907 | message = 'fold-temp-revision %s' % currentnode[:12] | |
924 | else: |
|
908 | else: | |
925 | message = ctx.description() |
|
909 | message = ctx.description() | |
926 |
editopt = action in ('e', 'edit' |
|
910 | editopt = action in ('e', 'edit') | |
927 |
canonaction = {'e': 'edit' |
|
911 | canonaction = {'e': 'edit'} | |
928 | editform = 'histedit.%s' % canonaction.get(action, action) |
|
912 | editform = 'histedit.%s' % canonaction.get(action, action) | |
929 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
|
913 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) | |
930 | commit = commitfuncfor(repo, ctx) |
|
914 | commit = commitfuncfor(repo, ctx) |
General Comments 0
You need to be logged in to leave comments.
Login now