diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -423,8 +423,10 @@ class histeditaction(object): hg.update(repo, self.state.parentctxnode, quietempty=True) stats = applychanges(repo.ui, repo, rulectx, {}) if stats and stats[3] > 0: - raise error.InterventionRequired(_('Fix up the change and run ' - 'hg histedit --continue')) + raise error.InterventionRequired( + _('Fix up the change (%s %s)') % + (self.verb, node.short(self.node)), + hint=_('hg histedit --continue to resume')) def continuedirty(self): """Continues the action when changes have been applied to the working @@ -616,9 +618,9 @@ class edit(histeditaction): hg.update(repo, self.state.parentctxnode, quietempty=True) applychanges(repo.ui, repo, rulectx, {}) raise error.InterventionRequired( - _('Make changes as needed, you may commit or record as needed ' - 'now.\nWhen you are finished, run hg histedit --continue to ' - 'resume.')) + _('Editing (%s), you may commit or record as needed now.') + % node.short(self.node), + hint=_('hg histedit --continue to resume')) def commiteditor(self): return cmdutil.getcommiteditor(edit=True, editform='histedit.edit') diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t --- a/tests/test-histedit-arguments.t +++ b/tests/test-histedit-arguments.t @@ -128,8 +128,8 @@ temporarily. > EOF 1 files updated, 0 files merged, 0 files removed, 0 files unresolved reverting alpha - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (08d98a8350f3), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ mv .hg/histedit-state .hg/histedit-state.back @@ -308,8 +308,8 @@ Test --continue with --keep > edit eb57da33312f 2 three > pick f3cfcca30c44 4 x > EOF - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (eb57da33312f), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ echo edit >> alpha $ hg histedit -q --continue @@ -335,8 +335,8 @@ Test that abort fails gracefully on exce $ hg histedit . -q --commands - << EOF > edit 8fda0c726bf2 6 x > EOF - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (8fda0c726bf2), you may commit or record as needed now. + (hg histedit --continue to resume) [1] Corrupt histedit state file $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit diff --git a/tests/test-histedit-base.t b/tests/test-histedit-base.t --- a/tests/test-histedit-base.t +++ b/tests/test-histedit-base.t @@ -146,7 +146,8 @@ Abort > EOF merging B warning: conflicts while merging B! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 591369deedfd) + (hg histedit --continue to resume) $ hg histedit --abort | fixbundle 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg tglog @@ -174,7 +175,8 @@ Continue > EOF merging B warning: conflicts while merging B! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 591369deedfd) + (hg histedit --continue to resume) $ echo b2 > B $ hg resolve --mark B (no more unresolved files) diff --git a/tests/test-histedit-commute.t b/tests/test-histedit-commute.t --- a/tests/test-histedit-commute.t +++ b/tests/test-histedit-commute.t @@ -84,8 +84,8 @@ edit the history > EOF $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle 0 files updated, 0 files merged, 4 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (177f92b77385), you may commit or record as needed now. + (hg histedit --continue to resume) rules should end up in .hg/histedit-last-edit.txt: $ cat .hg/histedit-last-edit.txt diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t --- a/tests/test-histedit-edit.t +++ b/tests/test-histedit-edit.t @@ -74,8 +74,8 @@ edit the history > pick 3c6a8ed2ebe8 g > EOF 0 files updated, 0 files merged, 3 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (e860deea161a), you may commit or record as needed now. + (hg histedit --continue to resume) edit the plan via the editor $ cat >> $TESTTMP/editplan.sh < pick b5f70786f9b0 g > EOF 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (1a60820cd1f6), you may commit or record as needed now. + (hg histedit --continue to resume) $ mv .hg/histedit-state .hg/histedit-state.bak $ hg strip -q -r b5f70786f9b0 @@ -240,8 +240,8 @@ check histedit_source > edit b5f70786f9b0 f > EOF 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (b5f70786f9b0), you may commit or record as needed now. + (hg histedit --continue to resume) $ hg status A f @@ -432,8 +432,8 @@ rollback should not work after a histedi > EOF 0 files updated, 0 files merged, 1 files removed, 0 files unresolved adding a - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (cb9a9f314b8b), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ HGEDITOR=true hg histedit --continue saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-backup.hg (glob) diff --git a/tests/test-histedit-fold-non-commute.t b/tests/test-histedit-fold-non-commute.t --- a/tests/test-histedit-fold-non-commute.t +++ b/tests/test-histedit-fold-non-commute.t @@ -89,7 +89,8 @@ edit the history 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (fold 39522b764e3d) + (hg histedit --continue to resume) fix up $ echo 'I can haz no commute' > e @@ -123,7 +124,8 @@ fix up 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 7b4e2f4b7bcd) + (hg histedit --continue to resume) just continue this time $ hg revert -r 'p1()' e @@ -251,7 +253,8 @@ edit the history 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (roll 39522b764e3d) + (hg histedit --continue to resume) fix up $ echo 'I can haz no commute' > e @@ -263,7 +266,8 @@ fix up 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 7b4e2f4b7bcd) + (hg histedit --continue to resume) just continue this time $ hg revert -r 'p1()' e diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t --- a/tests/test-histedit-fold.t +++ b/tests/test-histedit-fold.t @@ -293,7 +293,8 @@ folded content is dropped during a merge 1 files updated, 0 files merged, 0 files removed, 0 files unresolved merging file warning: conflicts while merging file! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (fold 251d831eeec5) + (hg histedit --continue to resume) [1] There were conflicts, we keep P1 content. This should effectively drop the changes from +6. @@ -354,7 +355,8 @@ dropped revision. 1 files updated, 0 files merged, 0 files removed, 0 files unresolved merging file warning: conflicts while merging file! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (fold 251d831eeec5) + (hg histedit --continue to resume) [1] $ cat > file << EOF > 1 diff --git a/tests/test-histedit-no-change.t b/tests/test-histedit-no-change.t --- a/tests/test-histedit-no-change.t +++ b/tests/test-histedit-no-change.t @@ -91,8 +91,8 @@ editing a changeset without any actual c | edit e860deea161a 4 e | pick 652413bf663e 5 f 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (e860deea161a), you may commit or record as needed now. + (hg histedit --continue to resume) $ continueediting true "(leaving commit message unaltered)" % finalize changeset editing (leaving commit message unaltered) @@ -142,12 +142,12 @@ check state of working copy | edit e860deea161a 4 e | pick 652413bf663e 5 f 0 files updated, 0 files merged, 3 files removed, 0 files unresolved - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (055a42cdd887), you may commit or record as needed now. + (hg histedit --continue to resume) $ continueediting true "(leaving commit message unaltered)" % finalize changeset editing (leaving commit message unaltered) - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (e860deea161a), you may commit or record as needed now. + (hg histedit --continue to resume) $ graphlog "log after first edit" % log after first edit @ 6 e5ae3ca2f1ffdbd89ec41ebc273a231f7c3022f2 "d" @@ -211,8 +211,8 @@ aborting and not changing files can skip $ startediting 1 1 "(not changing anything)" # edit the 3rd of 3 changesets % start editing the history (not changing anything) | edit 292aec348d9e 6 closebranch - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (292aec348d9e), you may commit or record as needed now. + (hg histedit --continue to resume) $ hg histedit --abort $ cd .. diff --git a/tests/test-histedit-non-commute-abort.t b/tests/test-histedit-non-commute-abort.t --- a/tests/test-histedit-non-commute-abort.t +++ b/tests/test-histedit-non-commute-abort.t @@ -72,7 +72,8 @@ edit the history 0 files updated, 0 files merged, 2 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick e860deea161a) + (hg histedit --continue to resume) insert unsupported advisory merge record $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x diff --git a/tests/test-histedit-non-commute.t b/tests/test-histedit-non-commute.t --- a/tests/test-histedit-non-commute.t +++ b/tests/test-histedit-non-commute.t @@ -90,7 +90,8 @@ edit the history 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 39522b764e3d) + (hg histedit --continue to resume) abort the edit $ hg histedit --abort 2>&1 | fixbundle @@ -147,7 +148,8 @@ edit the history 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 39522b764e3d) + (hg histedit --continue to resume) fix up $ echo 'I can haz no commute' > e @@ -157,7 +159,8 @@ fix up $ hg histedit --continue 2>&1 | fixbundle merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 7b4e2f4b7bcd) + (hg histedit --continue to resume) This failure is caused by 7b4e2f4b7bcd "e" not rebasing the non commutative former children. @@ -233,7 +236,8 @@ edit the history, this time with a fold 2 files updated, 0 files merged, 0 files removed, 0 files unresolved merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (mess 39522b764e3d) + (hg histedit --continue to resume) $ echo 'I can haz no commute' > e $ hg resolve --mark e @@ -242,7 +246,8 @@ edit the history, this time with a fold $ hg histedit --continue 2>&1 | fixbundle merging e warning: conflicts while merging e! (edit, then use 'hg resolve --mark') - Fix up the change and run hg histedit --continue + Fix up the change (pick 7b4e2f4b7bcd) + (hg histedit --continue to resume) second edit also fails, but just continue $ hg revert -r 'p1()' e $ hg resolve --mark e diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t --- a/tests/test-histedit-obsolete.t +++ b/tests/test-histedit-obsolete.t @@ -136,8 +136,8 @@ Test that rewriting leaving instability > EOF 0 files updated, 0 files merged, 1 files removed, 0 files unresolved adding c - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (b346ab9a313d), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ echo c >> c $ hg histedit --continue @@ -280,8 +280,8 @@ New-commit as draft (default) > EOF 0 files updated, 0 files merged, 6 files removed, 0 files unresolved adding f - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (947ece25170f), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ echo f >> f $ hg histedit --continue @@ -323,8 +323,8 @@ New-commit as draft (default) > EOF 0 files updated, 0 files merged, 6 files removed, 0 files unresolved adding f - Make changes as needed, you may commit or record as needed now. - When you are finished, run hg histedit --continue to resume. + Editing (947ece25170f), you may commit or record as needed now. + (hg histedit --continue to resume) [1] $ echo f >> f $ hg histedit --continue