Show More
@@ -212,7 +212,7 b' class histeditstate(object):' | |||||
212 | raise |
|
212 | raise | |
213 | raise util.Abort(_('no histedit in progress')) |
|
213 | raise util.Abort(_('no histedit in progress')) | |
214 |
|
214 | |||
215 |
|
|
215 | parentctxnode, rules, keep, topmost, replacements = pickle.load(fp) | |
216 |
|
216 | |||
217 | self.parentctx = self.repo[parentctxnode] |
|
217 | self.parentctx = self.repo[parentctxnode] | |
218 | self.rules = rules |
|
218 | self.rules = rules | |
@@ -223,7 +223,7 b' class histeditstate(object):' | |||||
223 | def write(self): |
|
223 | def write(self): | |
224 | fp = self.repo.vfs('histedit-state', 'w') |
|
224 | fp = self.repo.vfs('histedit-state', 'w') | |
225 | pickle.dump((self.parentctx.node(), self.rules, self.keep, |
|
225 | pickle.dump((self.parentctx.node(), self.rules, self.keep, | |
226 | self.topmost, self.replacements), fp) |
|
226 | self.topmost, self.replacements), fp) | |
227 | fp.close() |
|
227 | fp.close() | |
228 |
|
228 | |||
229 | def clear(self): |
|
229 | def clear(self): | |
@@ -361,8 +361,7 b' def pick(ui, state, ha, opts):' | |||||
361 | n = commit(text=oldctx.description(), user=oldctx.user(), |
|
361 | n = commit(text=oldctx.description(), user=oldctx.user(), | |
362 | date=oldctx.date(), extra=oldctx.extra()) |
|
362 | date=oldctx.date(), extra=oldctx.extra()) | |
363 | if n is None: |
|
363 | if n is None: | |
364 | ui.warn(_('%s: empty changeset\n') |
|
364 | ui.warn(_('%s: empty changeset\n') % node.hex(ha)) | |
365 | % node.hex(ha)) |
|
|||
366 | return ctx, [] |
|
365 | return ctx, [] | |
367 | new = repo[n] |
|
366 | new = repo[n] | |
368 | return new, [(oldctx.node(), (n,))] |
|
367 | return new, [(oldctx.node(), (n,))] | |
@@ -393,8 +392,7 b' def fold(ui, state, ha, opts):' | |||||
393 | n = repo.commit(text='fold-temp-revision %s' % ha, user=oldctx.user(), |
|
392 | n = repo.commit(text='fold-temp-revision %s' % ha, user=oldctx.user(), | |
394 | date=oldctx.date(), extra=oldctx.extra()) |
|
393 | date=oldctx.date(), extra=oldctx.extra()) | |
395 | if n is None: |
|
394 | if n is None: | |
396 | ui.warn(_('%s: empty changeset') |
|
395 | ui.warn(_('%s: empty changeset') % node.hex(ha)) | |
397 | % node.hex(ha)) |
|
|||
398 | return ctx, [] |
|
396 | return ctx, [] | |
399 | return finishfold(ui, repo, ctx, oldctx, n, opts, []) |
|
397 | return finishfold(ui, repo, ctx, oldctx, n, opts, []) | |
400 |
|
398 | |||
@@ -432,9 +430,9 b' def finishfold(ui, repo, ctx, oldctx, ne' | |||||
432 | return ctx, [] |
|
430 | return ctx, [] | |
433 | hg.update(repo, n) |
|
431 | hg.update(repo, n) | |
434 | replacements = [(oldctx.node(), (newnode,)), |
|
432 | replacements = [(oldctx.node(), (newnode,)), | |
435 |
|
|
433 | (ctx.node(), (n,)), | |
436 |
|
|
434 | (newnode, (n,)), | |
437 |
|
|
435 | ] | |
438 | for ich in internalchanges: |
|
436 | for ich in internalchanges: | |
439 | replacements.append((ich, (n,))) |
|
437 | replacements.append((ich, (n,))) | |
440 | return repo[n], replacements |
|
438 | return repo[n], replacements | |
@@ -456,8 +454,7 b' def message(ui, state, ha, opts):' | |||||
456 | commit = commitfuncfor(repo, oldctx) |
|
454 | commit = commitfuncfor(repo, oldctx) | |
457 | editor = cmdutil.getcommiteditor(edit=True, editform='histedit.mess') |
|
455 | editor = cmdutil.getcommiteditor(edit=True, editform='histedit.mess') | |
458 | new = commit(text=message, user=oldctx.user(), date=oldctx.date(), |
|
456 | new = commit(text=message, user=oldctx.user(), date=oldctx.date(), | |
459 | extra=oldctx.extra(), |
|
457 | extra=oldctx.extra(), editor=editor) | |
460 | editor=editor) |
|
|||
461 | newctx = repo[new] |
|
458 | newctx = repo[new] | |
462 | if oldctx.node() != newctx.node(): |
|
459 | if oldctx.node() != newctx.node(): | |
463 | return newctx, [(oldctx.node(), (new,))] |
|
460 | return newctx, [(oldctx.node(), (new,))] | |
@@ -747,9 +744,8 b' def bootstrapcontinue(ui, state, opts):' | |||||
747 | editform = 'histedit.%s' % canonaction.get(action, action) |
|
744 | editform = 'histedit.%s' % canonaction.get(action, action) | |
748 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
|
745 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) | |
749 | commit = commitfuncfor(repo, ctx) |
|
746 | commit = commitfuncfor(repo, ctx) | |
750 | new = commit(text=message, user=ctx.user(), |
|
747 | new = commit(text=message, user=ctx.user(), date=ctx.date(), | |
751 |
|
|
748 | extra=ctx.extra(), editor=editor) | |
752 | editor=editor) |
|
|||
753 | if new is not None: |
|
749 | if new is not None: | |
754 | newchildren.append(new) |
|
750 | newchildren.append(new) | |
755 |
|
751 |
General Comments 0
You need to be logged in to leave comments.
Login now