Show More
@@ -1720,6 +1720,15 b' def _docommit(ui, repo, *pats, **opts):' | |||
|
1720 | 1720 | if not allowunstable and old.children(): |
|
1721 | 1721 | raise error.Abort(_('cannot amend changeset with children')) |
|
1722 | 1722 | |
|
1723 | # Currently histedit gets confused if an amend happens while histedit | |
|
1724 | # is in progress. Since we have a checkunfinished command, we are | |
|
1725 | # temporarily honoring it. | |
|
1726 | # | |
|
1727 | # Note: eventually this guard will be removed. Please do not expect | |
|
1728 | # this behavior to remain. | |
|
1729 | if not obsolete.isenabled(repo, obsolete.createmarkersopt): | |
|
1730 | cmdutil.checkunfinished(repo) | |
|
1731 | ||
|
1723 | 1732 | # commitfunc is used only for temporary amend commit by cmdutil.amend |
|
1724 | 1733 | def commitfunc(ui, repo, message, match, opts): |
|
1725 | 1734 | return repo.commit(message, |
@@ -450,3 +450,46 b' Default base revision should stop at mer' | |||
|
450 | 450 | > pick 6f2f0241f119 |
|
451 | 451 | > pick 8cde254db839 |
|
452 | 452 | > EOF |
|
453 | ||
|
454 | commit --amend should abort if histedit is in progress | |
|
455 | (issue4800) and markers are not being created. | |
|
456 | Eventually, histedit could perhaps look at `source` extra, | |
|
457 | in which case this test should be revisited. | |
|
458 | ||
|
459 | $ hg -q up 8cde254db839 | |
|
460 | $ hg histedit 6f2f0241f119 --commands - <<EOF | |
|
461 | > pick 8cde254db839 | |
|
462 | > edit 6f2f0241f119 | |
|
463 | > EOF | |
|
464 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
465 | merging foo | |
|
466 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
|
467 | Fix up the change (pick 8cde254db839) | |
|
468 | (hg histedit --continue to resume) | |
|
469 | [1] | |
|
470 | $ hg resolve -m --all | |
|
471 | (no more unresolved files) | |
|
472 | continue: hg histedit --continue | |
|
473 | $ hg histedit --cont | |
|
474 | merging foo | |
|
475 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
|
476 | Editing (6f2f0241f119), you may commit or record as needed now. | |
|
477 | (hg histedit --continue to resume) | |
|
478 | [1] | |
|
479 | $ hg resolve -m --all | |
|
480 | (no more unresolved files) | |
|
481 | continue: hg histedit --continue | |
|
482 | $ hg commit --amend -m 'reject this fold' | |
|
483 | abort: histedit in progress | |
|
484 | (use 'hg histedit --continue' or 'hg histedit --abort') | |
|
485 | [255] | |
|
486 | ||
|
487 | With markers enabled, histedit does not get confused, and | |
|
488 | amend should not be blocked by the ongoing histedit. | |
|
489 | ||
|
490 | $ cat >>$HGRCPATH <<EOF | |
|
491 | > [experimental] | |
|
492 | > evolution=createmarkers,allowunstable | |
|
493 | > EOF | |
|
494 | $ hg commit --amend -m 'allow this fold' | |
|
495 | $ hg histedit --continue |
General Comments 0
You need to be logged in to leave comments.
Login now