449 ('', 'abort', False, _('abort an edit in progress')), |
449 ('', 'abort', False, _('abort an edit in progress')), |
450 ('o', 'outgoing', False, _('changesets not found in destination')), |
450 ('o', 'outgoing', False, _('changesets not found in destination')), |
451 ('f', 'force', False, |
451 ('f', 'force', False, |
452 _('force outgoing even for unrelated repositories')), |
452 _('force outgoing even for unrelated repositories')), |
453 ('r', 'rev', [], _('first revision to be edited'))], |
453 ('r', 'rev', [], _('first revision to be edited'))], |
454 _("[PARENT]")) |
454 _("ANCESTOR")) |
455 def histedit(ui, repo, *freeargs, **opts): |
455 def histedit(ui, repo, *freeargs, **opts): |
456 """interactively edit changeset history |
456 """interactively edit changeset history |
|
457 |
|
458 This command edits changesets between ANCESTOR and the parent of |
|
459 the working directory. |
457 """ |
460 """ |
458 # TODO only abort if we try and histedit mq patches, not just |
461 # TODO only abort if we try and histedit mq patches, not just |
459 # blanket if mq patches are applied somewhere |
462 # blanket if mq patches are applied somewhere |
460 mq = getattr(repo, 'mq', None) |
463 mq = getattr(repo, 'mq', None) |
461 if mq and mq.applied: |
464 if mq and mq.applied: |
491 _('only one repo argument allowed with --outgoing')) |
494 _('only one repo argument allowed with --outgoing')) |
492 else: |
495 else: |
493 revs.extend(freeargs) |
496 revs.extend(freeargs) |
494 if len(revs) != 1: |
497 if len(revs) != 1: |
495 raise util.Abort( |
498 raise util.Abort( |
496 _('histedit requires exactly one parent revision')) |
499 _('histedit requires exactly one ancestor revision')) |
497 |
500 |
498 |
501 |
499 if goal == 'continue': |
502 if goal == 'continue': |
500 (parentctxnode, rules, keep, topmost, replacements) = readstate(repo) |
503 (parentctxnode, rules, keep, topmost, replacements) = readstate(repo) |
501 currentparent, wantnull = repo.dirstate.parents() |
504 currentparent, wantnull = repo.dirstate.parents() |