Show More
@@ -487,28 +487,14 b' def collapse(repo, first, last, commitop' | |||||
487 | editor=editor) |
|
487 | editor=editor) | |
488 | return repo.commitctx(new) |
|
488 | return repo.commitctx(new) | |
489 |
|
489 | |||
490 | def pick(ui, state, ha, opts): |
|
490 | class pick(histeditaction): | |
491 | repo, ctxnode = state.repo, state.parentctxnode |
|
491 | def run(self): | |
492 |
ctx = repo[ |
|
492 | rulectx = self.repo[self.node] | |
493 | oldctx = repo[ha] |
|
493 | if rulectx.parents()[0].node() == self.state.parentctxnode: | |
494 | if oldctx.parents()[0] == ctx: |
|
494 | self.repo.ui.debug('node %s unchanged\n' % node.short(self.node)) | |
495 | ui.debug('node %s unchanged\n' % ha[:12]) |
|
495 | return rulectx, [] | |
496 | return oldctx, [] |
|
|||
497 | hg.update(repo, ctx.node()) |
|
|||
498 | stats = applychanges(ui, repo, oldctx, opts) |
|
|||
499 | if stats and stats[3] > 0: |
|
|||
500 | raise error.InterventionRequired(_('Fix up the change and run ' |
|
|||
501 | 'hg histedit --continue')) |
|
|||
502 | # drop the second merge parent |
|
|||
503 | commit = commitfuncfor(repo, oldctx) |
|
|||
504 | n = commit(text=oldctx.description(), user=oldctx.user(), |
|
|||
505 | date=oldctx.date(), extra=oldctx.extra()) |
|
|||
506 | if n is None: |
|
|||
507 | ui.warn(_('%s: empty changeset\n') % ha[:12]) |
|
|||
508 | return ctx, [] |
|
|||
509 | new = repo[n] |
|
|||
510 | return new, [(oldctx.node(), (n,))] |
|
|||
511 |
|
496 | |||
|
497 | return super(pick, self).run() | |||
512 |
|
498 | |||
513 | def edit(ui, state, ha, opts): |
|
499 | def edit(ui, state, ha, opts): | |
514 | repo, ctxnode = state.repo, state.parentctxnode |
|
500 | repo, ctxnode = state.repo, state.parentctxnode | |
@@ -939,7 +925,7 b' def bootstrapcontinue(ui, state, opts):' | |||||
939 | else: |
|
925 | else: | |
940 | message = ctx.description() |
|
926 | message = ctx.description() | |
941 | editopt = action in ('e', 'edit', 'm', 'mess') |
|
927 | editopt = action in ('e', 'edit', 'm', 'mess') | |
942 |
canonaction = {'e': 'edit', 'm': 'mess' |
|
928 | canonaction = {'e': 'edit', 'm': 'mess'} | |
943 | editform = 'histedit.%s' % canonaction.get(action, action) |
|
929 | editform = 'histedit.%s' % canonaction.get(action, action) | |
944 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
|
930 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) | |
945 | commit = commitfuncfor(repo, ctx) |
|
931 | commit = commitfuncfor(repo, ctx) |
@@ -132,6 +132,7 b' just continue this time' | |||||
132 | $ hg resolve --mark e |
|
132 | $ hg resolve --mark e | |
133 | (no more unresolved files) |
|
133 | (no more unresolved files) | |
134 | $ hg histedit --continue 2>&1 | fixbundle |
|
134 | $ hg histedit --continue 2>&1 | fixbundle | |
|
135 | 7b4e2f4b7bcd: empty changeset | |||
135 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
136 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
137 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
137 |
|
138 | |||
@@ -274,6 +275,7 b' just continue this time' | |||||
274 | $ hg resolve --mark e |
|
275 | $ hg resolve --mark e | |
275 | (no more unresolved files) |
|
276 | (no more unresolved files) | |
276 | $ hg histedit --continue 2>&1 | fixbundle |
|
277 | $ hg histedit --continue 2>&1 | fixbundle | |
|
278 | 7b4e2f4b7bcd: empty changeset | |||
277 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
279 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
278 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
280 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
279 |
|
281 |
@@ -170,6 +170,7 b' just continue this time' | |||||
170 | $ hg resolve --mark e |
|
170 | $ hg resolve --mark e | |
171 | (no more unresolved files) |
|
171 | (no more unresolved files) | |
172 | $ hg histedit --continue 2>&1 | fixbundle |
|
172 | $ hg histedit --continue 2>&1 | fixbundle | |
|
173 | 7b4e2f4b7bcd: empty changeset | |||
173 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
174 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
174 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
175 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
175 |
|
176 | |||
@@ -253,6 +254,7 b' second edit also fails, but just continu' | |||||
253 | $ hg resolve --mark e |
|
254 | $ hg resolve --mark e | |
254 | (no more unresolved files) |
|
255 | (no more unresolved files) | |
255 | $ hg histedit --continue 2>&1 | fixbundle |
|
256 | $ hg histedit --continue 2>&1 | fixbundle | |
|
257 | 7b4e2f4b7bcd: empty changeset | |||
256 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
258 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
259 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
258 |
|
260 |
General Comments 0
You need to be logged in to leave comments.
Login now