##// END OF EJS Templates
histedit: tweak `edit` message to try and guide users to our workflow...
Augie Fackler -
r46719:3f82a915 default
parent child Browse files
Show More
@@ -799,10 +799,11 b' class edit(histeditaction):'
799 rulectx = repo[self.node]
799 rulectx = repo[self.node]
800 hg.update(repo, self.state.parentctxnode, quietempty=True)
800 hg.update(repo, self.state.parentctxnode, quietempty=True)
801 applychanges(repo.ui, repo, rulectx, {})
801 applychanges(repo.ui, repo, rulectx, {})
802 hint = _(b'to edit %s, `hg histedit --continue` after making changes')
802 raise error.InterventionRequired(
803 raise error.InterventionRequired(
803 _(b'Editing (%s), you may commit or record as needed now.')
804 _(b'Editing (%s), commit as needed now to split the change')
804 % node.short(self.node),
805 % node.short(self.node),
805 hint=_(b'hg histedit --continue to resume'),
806 hint=hint % node.short(self.node),
806 )
807 )
807
808
808 def commiteditor(self):
809 def commiteditor(self):
@@ -149,8 +149,8 b' temporarily.'
149 > edit 08d98a8350f3 4 five
149 > edit 08d98a8350f3 4 five
150 > EOF
150 > EOF
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 Editing (08d98a8350f3), you may commit or record as needed now.
152 Editing (08d98a8350f3), commit as needed now to split the change
153 (hg histedit --continue to resume)
153 (to edit 08d98a8350f3, `hg histedit --continue` after making changes)
154 [240]
154 [240]
155
155
156 $ hg graft --continue
156 $ hg graft --continue
@@ -335,8 +335,8 b' Test --continue with --keep'
335 > edit eb57da33312f 2 three
335 > edit eb57da33312f 2 three
336 > pick f3cfcca30c44 4 x
336 > pick f3cfcca30c44 4 x
337 > EOF
337 > EOF
338 Editing (eb57da33312f), you may commit or record as needed now.
338 Editing (eb57da33312f), commit as needed now to split the change
339 (hg histedit --continue to resume)
339 (to edit eb57da33312f, `hg histedit --continue` after making changes)
340 [240]
340 [240]
341 $ echo edit >> alpha
341 $ echo edit >> alpha
342 $ hg histedit -q --continue
342 $ hg histedit -q --continue
@@ -362,8 +362,8 b' Test that abort fails gracefully on exce'
362 $ hg histedit . -q --commands - << EOF
362 $ hg histedit . -q --commands - << EOF
363 > edit 8fda0c726bf2 6 x
363 > edit 8fda0c726bf2 6 x
364 > EOF
364 > EOF
365 Editing (8fda0c726bf2), you may commit or record as needed now.
365 Editing (8fda0c726bf2), commit as needed now to split the change
366 (hg histedit --continue to resume)
366 (to edit 8fda0c726bf2, `hg histedit --continue` after making changes)
367 [240]
367 [240]
368 Corrupt histedit state file
368 Corrupt histedit state file
369 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit
369 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit
@@ -496,8 +496,8 b' in which case this test should be revisi'
496 $ hg histedit --cont
496 $ hg histedit --cont
497 merging foo
497 merging foo
498 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
498 warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
499 Editing (6f2f0241f119), you may commit or record as needed now.
499 Editing (6f2f0241f119), commit as needed now to split the change
500 (hg histedit --continue to resume)
500 (to edit 6f2f0241f119, `hg histedit --continue` after making changes)
501 [240]
501 [240]
502 $ hg resolve -m --all
502 $ hg resolve -m --all
503 (no more unresolved files)
503 (no more unresolved files)
@@ -142,8 +142,8 b' edit the history'
142 > EOF
142 > EOF
143 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
143 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
144 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
144 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
145 Editing (177f92b77385), you may commit or record as needed now.
145 Editing (177f92b77385), commit as needed now to split the change
146 (hg histedit --continue to resume)
146 (to edit 177f92b77385, `hg histedit --continue` after making changes)
147
147
148 rules should end up in .hg/histedit-last-edit.txt:
148 rules should end up in .hg/histedit-last-edit.txt:
149 $ cat .hg/histedit-last-edit.txt
149 $ cat .hg/histedit-last-edit.txt
@@ -75,8 +75,8 b' edit the history'
75 > pick 3c6a8ed2ebe8 g
75 > pick 3c6a8ed2ebe8 g
76 > EOF
76 > EOF
77 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
77 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
78 Editing (e860deea161a), you may commit or record as needed now.
78 Editing (e860deea161a), commit as needed now to split the change
79 (hg histedit --continue to resume)
79 (to edit e860deea161a, `hg histedit --continue` after making changes)
80
80
81 try to update and get an error
81 try to update and get an error
82 $ hg update tip
82 $ hg update tip
@@ -205,8 +205,8 b' Stripping necessary commits should not b'
205 > pick b5f70786f9b0 g
205 > pick b5f70786f9b0 g
206 > EOF
206 > EOF
207 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
207 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
208 Editing (1a60820cd1f6), you may commit or record as needed now.
208 Editing (1a60820cd1f6), commit as needed now to split the change
209 (hg histedit --continue to resume)
209 (to edit 1a60820cd1f6, `hg histedit --continue` after making changes)
210
210
211 $ mv .hg/histedit-state .hg/histedit-state.bak
211 $ mv .hg/histedit-state .hg/histedit-state.bak
212 $ hg strip -q -r b5f70786f9b0
212 $ hg strip -q -r b5f70786f9b0
@@ -247,8 +247,8 b' check histedit_source'
247 > edit b5f70786f9b0 f
247 > edit b5f70786f9b0 f
248 > EOF
248 > EOF
249 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
249 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
250 Editing (b5f70786f9b0), you may commit or record as needed now.
250 Editing (b5f70786f9b0), commit as needed now to split the change
251 (hg histedit --continue to resume)
251 (to edit b5f70786f9b0, `hg histedit --continue` after making changes)
252 $ hg status
252 $ hg status
253 A f
253 A f
254
254
@@ -435,8 +435,8 b' rollback should not work after a histedi'
435 > edit cb9a9f314b8b a > $EDITED
435 > edit cb9a9f314b8b a > $EDITED
436 > EOF
436 > EOF
437 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
437 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
438 Editing (cb9a9f314b8b), you may commit or record as needed now.
438 Editing (cb9a9f314b8b), commit as needed now to split the change
439 (hg histedit --continue to resume)
439 (to edit cb9a9f314b8b, `hg histedit --continue` after making changes)
440 [240]
440 [240]
441 $ HGEDITOR=true hg histedit --continue
441 $ HGEDITOR=true hg histedit --continue
442 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-histedit.hg
442 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-histedit.hg
@@ -50,8 +50,8 b' Test when `backup-bundle` config option '
50 > edit 7d5187087c79 3 four
50 > edit 7d5187087c79 3 four
51 > EOF
51 > EOF
52 merging file
52 merging file
53 Editing (7d5187087c79), you may commit or record as needed now.
53 Editing (7d5187087c79), commit as needed now to split the change
54 (hg histedit --continue to resume)
54 (to edit 7d5187087c79, `hg histedit --continue` after making changes)
55 [240]
55 [240]
56 $ hg abort
56 $ hg abort
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -72,8 +72,8 b' Enable config option:'
72 > edit 7d5187087c79 3 four
72 > edit 7d5187087c79 3 four
73 > EOF
73 > EOF
74 merging file
74 merging file
75 Editing (7d5187087c79), you may commit or record as needed now.
75 Editing (7d5187087c79), commit as needed now to split the change
76 (hg histedit --continue to resume)
76 (to edit 7d5187087c79, `hg histedit --continue` after making changes)
77 [240]
77 [240]
78
78
79 $ hg abort
79 $ hg abort
@@ -91,8 +91,8 b' editing a changeset without any actual c'
91 | edit e860deea161a 4 e
91 | edit e860deea161a 4 e
92 | pick 652413bf663e 5 f
92 | pick 652413bf663e 5 f
93 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
93 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
94 Editing (e860deea161a), you may commit or record as needed now.
94 Editing (e860deea161a), commit as needed now to split the change
95 (hg histedit --continue to resume)
95 (to edit e860deea161a, `hg histedit --continue` after making changes)
96 $ continueediting true "(leaving commit message unaltered)"
96 $ continueediting true "(leaving commit message unaltered)"
97 % finalize changeset editing (leaving commit message unaltered)
97 % finalize changeset editing (leaving commit message unaltered)
98
98
@@ -142,12 +142,12 b' check state of working copy'
142 | edit e860deea161a 4 e
142 | edit e860deea161a 4 e
143 | pick 652413bf663e 5 f
143 | pick 652413bf663e 5 f
144 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
144 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
145 Editing (055a42cdd887), you may commit or record as needed now.
145 Editing (055a42cdd887), commit as needed now to split the change
146 (hg histedit --continue to resume)
146 (to edit 055a42cdd887, `hg histedit --continue` after making changes)
147 $ continueediting true "(leaving commit message unaltered)"
147 $ continueediting true "(leaving commit message unaltered)"
148 % finalize changeset editing (leaving commit message unaltered)
148 % finalize changeset editing (leaving commit message unaltered)
149 Editing (e860deea161a), you may commit or record as needed now.
149 Editing (e860deea161a), commit as needed now to split the change
150 (hg histedit --continue to resume)
150 (to edit e860deea161a, `hg histedit --continue` after making changes)
151 $ graphlog "log after first edit"
151 $ graphlog "log after first edit"
152 % log after first edit
152 % log after first edit
153 @ 6 e5ae3ca2f1ffdbd89ec41ebc273a231f7c3022f2 "d"
153 @ 6 e5ae3ca2f1ffdbd89ec41ebc273a231f7c3022f2 "d"
@@ -211,8 +211,8 b' aborting and not changing files can skip'
211 $ startediting 1 1 "(not changing anything)" # edit the 3rd of 3 changesets
211 $ startediting 1 1 "(not changing anything)" # edit the 3rd of 3 changesets
212 % start editing the history (not changing anything)
212 % start editing the history (not changing anything)
213 | edit 292aec348d9e 6 closebranch
213 | edit 292aec348d9e 6 closebranch
214 Editing (292aec348d9e), you may commit or record as needed now.
214 Editing (292aec348d9e), commit as needed now to split the change
215 (hg histedit --continue to resume)
215 (to edit 292aec348d9e, `hg histedit --continue` after making changes)
216 $ hg histedit --abort
216 $ hg histedit --abort
217
217
218 $ cd ..
218 $ cd ..
@@ -43,8 +43,8 b' Test that histedit learns about obsolesc'
43 $ echo "pick `hg log -r 2 -T '{node|short}'`" >> plan
43 $ echo "pick `hg log -r 2 -T '{node|short}'`" >> plan
44 $ echo "edit `hg log -r 1 -T '{node|short}'`" >> plan
44 $ echo "edit `hg log -r 1 -T '{node|short}'`" >> plan
45 $ hg histedit -r 'all()' --commands plan
45 $ hg histedit -r 'all()' --commands plan
46 Editing (1b2d564fad96), you may commit or record as needed now.
46 Editing (1b2d564fad96), commit as needed now to split the change
47 (hg histedit --continue to resume)
47 (to edit 1b2d564fad96, `hg histedit --continue` after making changes)
48 [240]
48 [240]
49 $ hg st
49 $ hg st
50 A b
50 A b
@@ -70,8 +70,8 b' With some node gone missing during the e'
70 $ echo "pick `hg log -r 5 -T '{node|short}'`" >> plan
70 $ echo "pick `hg log -r 5 -T '{node|short}'`" >> plan
71 $ echo "edit `hg log -r 4 -T '{node|short}'`" >> plan
71 $ echo "edit `hg log -r 4 -T '{node|short}'`" >> plan
72 $ hg histedit -r 'all()' --commands plan
72 $ hg histedit -r 'all()' --commands plan
73 Editing (49d44ab2be1b), you may commit or record as needed now.
73 Editing (49d44ab2be1b), commit as needed now to split the change
74 (hg histedit --continue to resume)
74 (to edit 49d44ab2be1b, `hg histedit --continue` after making changes)
75 [240]
75 [240]
76 $ hg st
76 $ hg st
77 A b
77 A b
@@ -225,8 +225,8 b' Test that rewriting leaving instability '
225 > edit b346ab9a313d 6 c
225 > edit b346ab9a313d 6 c
226 > EOF
226 > EOF
227 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
227 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
228 Editing (b346ab9a313d), you may commit or record as needed now.
228 Editing (b346ab9a313d), commit as needed now to split the change
229 (hg histedit --continue to resume)
229 (to edit b346ab9a313d, `hg histedit --continue` after making changes)
230 [240]
230 [240]
231 $ echo c >> c
231 $ echo c >> c
232 $ hg histedit --continue
232 $ hg histedit --continue
@@ -359,8 +359,8 b' New-commit as draft (default)'
359 > pick ee118ab9fa44 16 k
359 > pick ee118ab9fa44 16 k
360 > EOF
360 > EOF
361 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
361 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
362 Editing (b449568bf7fc), you may commit or record as needed now.
362 Editing (b449568bf7fc), commit as needed now to split the change
363 (hg histedit --continue to resume)
363 (to edit b449568bf7fc, `hg histedit --continue` after making changes)
364 [240]
364 [240]
365 $ echo f >> f
365 $ echo f >> f
366 $ hg histedit --continue
366 $ hg histedit --continue
@@ -401,8 +401,8 b' New-commit as secret (config)'
401 > pick ee118ab9fa44 16 k
401 > pick ee118ab9fa44 16 k
402 > EOF
402 > EOF
403 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
403 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
404 Editing (b449568bf7fc), you may commit or record as needed now.
404 Editing (b449568bf7fc), commit as needed now to split the change
405 (hg histedit --continue to resume)
405 (to edit b449568bf7fc, `hg histedit --continue` after making changes)
406 [240]
406 [240]
407 $ echo f >> f
407 $ echo f >> f
408 $ hg histedit --continue
408 $ hg histedit --continue
@@ -527,8 +527,8 b' attempted later.'
527 > roll 3a6c53ee7f3d 17 j
527 > roll 3a6c53ee7f3d 17 j
528 > edit ee118ab9fa44 18 k
528 > edit ee118ab9fa44 18 k
529 > EOF
529 > EOF
530 Editing (ee118ab9fa44), you may commit or record as needed now.
530 Editing (ee118ab9fa44), commit as needed now to split the change
531 (hg histedit --continue to resume)
531 (to edit ee118ab9fa44, `hg histedit --continue` after making changes)
532 [240]
532 [240]
533
533
534 #if abortcommand
534 #if abortcommand
@@ -566,8 +566,8 b' when in dry-run mode'
566 > pick 3a6c53ee7f3d 17 j
566 > pick 3a6c53ee7f3d 17 j
567 > edit ee118ab9fa44 18 k
567 > edit ee118ab9fa44 18 k
568 > EOF
568 > EOF
569 Editing (ee118ab9fa44), you may commit or record as needed now.
569 Editing (ee118ab9fa44), commit as needed now to split the change
570 (hg histedit --continue to resume)
570 (to edit ee118ab9fa44, `hg histedit --continue` after making changes)
571 [240]
571 [240]
572 $ hg histedit --continue --config experimental.evolution.track-operation=1
572 $ hg histedit --continue --config experimental.evolution.track-operation=1
573 $ hg log -G
573 $ hg log -G
@@ -456,8 +456,8 b' qrecord should throw an error when histe'
456 > edit ea55e2ae468f foo bar
456 > edit ea55e2ae468f foo bar
457 > EOF
457 > EOF
458 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
458 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
459 Editing (ea55e2ae468f), you may commit or record as needed now.
459 Editing (ea55e2ae468f), commit as needed now to split the change
460 (hg histedit --continue to resume)
460 (to edit ea55e2ae468f, `hg histedit --continue` after making changes)
461 [240]
461 [240]
462 $ echo 'foo bar' > a
462 $ echo 'foo bar' > a
463 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
463 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
@@ -88,8 +88,8 b' Abort pull early if another operation (h'
88 $ hg histedit . -q --commands - << EOF
88 $ hg histedit . -q --commands - << EOF
89 > edit d80cc2da061e histedit: generate unfinished state
89 > edit d80cc2da061e histedit: generate unfinished state
90 > EOF
90 > EOF
91 Editing (d80cc2da061e), you may commit or record as needed now.
91 Editing (d80cc2da061e), commit as needed now to split the change
92 (hg histedit --continue to resume)
92 (to edit d80cc2da061e, `hg histedit --continue` after making changes)
93 [240]
93 [240]
94 $ hg pull --rebase
94 $ hg pull --rebase
95 abort: histedit in progress
95 abort: histedit in progress
General Comments 0
You need to be logged in to leave comments. Login now