Patchwork [2,of,7] histedit: InterventionRequired list action

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 23, 2015, 9:06 a.m.
Message ID <bd24bc6edb3572fef163.1450861601@waste.org>
Download mbox | patch
Permalink /patch/12280/
State Superseded
Headers show

Comments

timeless@mozdev.org - Dec. 23, 2015, 9:06 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450861024 0
#      Wed Dec 23 08:57:04 2015 +0000
# Node ID bd24bc6edb3572fef1636e5723269275246aa42f
# Parent  e3eaa48dc27d4377d3146c602eec688c62678993
histedit: InterventionRequired list action

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -423,8 +423,10 @@ 
         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 @@ 
         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 @@ 
   > 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
@@ -297,8 +297,8 @@ 
   > 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
@@ -324,8 +324,8 @@ 
   $ 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 @@ 
   > 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 @@ 
   > 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-edit.t b/tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t
+++ b/tests/test-histedit-edit.t
@@ -67,8 +67,8 @@ 
   > 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 <<EOF
@@ -191,8 +191,8 @@ 
   > 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
@@ -233,8 +233,8 @@ 
   > 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
 
@@ -425,8 +425,8 @@ 
   > 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 @@ 
   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
@@ -122,7 +123,8 @@ 
   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
@@ -249,7 +251,8 @@ 
   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
@@ -260,7 +263,8 @@ 
   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 @@ 
   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.
@@ -353,7 +354,8 @@ 
   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 @@ 
   | 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 @@ 
   | 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 @@ 
   $ 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 @@ 
   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 @@ 
   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 @@ 
   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
@@ -156,7 +158,8 @@ 
   $ 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.
@@ -231,7 +234,8 @@ 
   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
@@ -239,7 +243,8 @@ 
   $ 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 @@ 
   > 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 @@ 
   > 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 @@ 
   > 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