##// END OF EJS Templates
histedit: list action when intervention is required
timeless -
r27629:e7ff83b2 default
parent child Browse files
Show More
@@ -423,8 +423,10 b' class histeditaction(object):'
423 hg.update(repo, self.state.parentctxnode, quietempty=True)
423 hg.update(repo, self.state.parentctxnode, quietempty=True)
424 stats = applychanges(repo.ui, repo, rulectx, {})
424 stats = applychanges(repo.ui, repo, rulectx, {})
425 if stats and stats[3] > 0:
425 if stats and stats[3] > 0:
426 raise error.InterventionRequired(_('Fix up the change and run '
426 raise error.InterventionRequired(
427 'hg histedit --continue'))
427 _('Fix up the change (%s %s)') %
428 (self.verb, node.short(self.node)),
429 hint=_('hg histedit --continue to resume'))
428
430
429 def continuedirty(self):
431 def continuedirty(self):
430 """Continues the action when changes have been applied to the working
432 """Continues the action when changes have been applied to the working
@@ -616,9 +618,9 b' class edit(histeditaction):'
616 hg.update(repo, self.state.parentctxnode, quietempty=True)
618 hg.update(repo, self.state.parentctxnode, quietempty=True)
617 applychanges(repo.ui, repo, rulectx, {})
619 applychanges(repo.ui, repo, rulectx, {})
618 raise error.InterventionRequired(
620 raise error.InterventionRequired(
619 _('Make changes as needed, you may commit or record as needed '
621 _('Editing (%s), you may commit or record as needed now.')
620 'now.\nWhen you are finished, run hg histedit --continue to '
622 % node.short(self.node),
621 'resume.'))
623 hint=_('hg histedit --continue to resume'))
622
624
623 def commiteditor(self):
625 def commiteditor(self):
624 return cmdutil.getcommiteditor(edit=True, editform='histedit.edit')
626 return cmdutil.getcommiteditor(edit=True, editform='histedit.edit')
@@ -128,8 +128,8 b' temporarily.'
128 > EOF
128 > EOF
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
130 reverting alpha
130 reverting alpha
131 Make changes as needed, you may commit or record as needed now.
131 Editing (08d98a8350f3), you may commit or record as needed now.
132 When you are finished, run hg histedit --continue to resume.
132 (hg histedit --continue to resume)
133 [1]
133 [1]
134
134
135 $ mv .hg/histedit-state .hg/histedit-state.back
135 $ mv .hg/histedit-state .hg/histedit-state.back
@@ -308,8 +308,8 b' Test --continue with --keep'
308 > edit eb57da33312f 2 three
308 > edit eb57da33312f 2 three
309 > pick f3cfcca30c44 4 x
309 > pick f3cfcca30c44 4 x
310 > EOF
310 > EOF
311 Make changes as needed, you may commit or record as needed now.
311 Editing (eb57da33312f), you may commit or record as needed now.
312 When you are finished, run hg histedit --continue to resume.
312 (hg histedit --continue to resume)
313 [1]
313 [1]
314 $ echo edit >> alpha
314 $ echo edit >> alpha
315 $ hg histedit -q --continue
315 $ hg histedit -q --continue
@@ -335,8 +335,8 b' Test that abort fails gracefully on exce'
335 $ hg histedit . -q --commands - << EOF
335 $ hg histedit . -q --commands - << EOF
336 > edit 8fda0c726bf2 6 x
336 > edit 8fda0c726bf2 6 x
337 > EOF
337 > EOF
338 Make changes as needed, you may commit or record as needed now.
338 Editing (8fda0c726bf2), you may commit or record as needed now.
339 When you are finished, run hg histedit --continue to resume.
339 (hg histedit --continue to resume)
340 [1]
340 [1]
341 Corrupt histedit state file
341 Corrupt histedit state file
342 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit
342 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit
@@ -146,7 +146,8 b' Abort'
146 > EOF
146 > EOF
147 merging B
147 merging B
148 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
148 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
149 Fix up the change and run hg histedit --continue
149 Fix up the change (pick 591369deedfd)
150 (hg histedit --continue to resume)
150 $ hg histedit --abort | fixbundle
151 $ hg histedit --abort | fixbundle
151 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 $ hg tglog
153 $ hg tglog
@@ -174,7 +175,8 b' Continue'
174 > EOF
175 > EOF
175 merging B
176 merging B
176 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
177 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
177 Fix up the change and run hg histedit --continue
178 Fix up the change (pick 591369deedfd)
179 (hg histedit --continue to resume)
178 $ echo b2 > B
180 $ echo b2 > B
179 $ hg resolve --mark B
181 $ hg resolve --mark B
180 (no more unresolved files)
182 (no more unresolved files)
@@ -84,8 +84,8 b' edit the history'
84 > EOF
84 > EOF
85 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
85 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
86 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
86 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
87 Make changes as needed, you may commit or record as needed now.
87 Editing (177f92b77385), you may commit or record as needed now.
88 When you are finished, run hg histedit --continue to resume.
88 (hg histedit --continue to resume)
89
89
90 rules should end up in .hg/histedit-last-edit.txt:
90 rules should end up in .hg/histedit-last-edit.txt:
91 $ cat .hg/histedit-last-edit.txt
91 $ cat .hg/histedit-last-edit.txt
@@ -74,8 +74,8 b' edit the history'
74 > pick 3c6a8ed2ebe8 g
74 > pick 3c6a8ed2ebe8 g
75 > EOF
75 > EOF
76 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
76 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
77 Make changes as needed, you may commit or record as needed now.
77 Editing (e860deea161a), you may commit or record as needed now.
78 When you are finished, run hg histedit --continue to resume.
78 (hg histedit --continue to resume)
79
79
80 edit the plan via the editor
80 edit the plan via the editor
81 $ cat >> $TESTTMP/editplan.sh <<EOF
81 $ cat >> $TESTTMP/editplan.sh <<EOF
@@ -198,8 +198,8 b' Stripping necessary commits should not b'
198 > pick b5f70786f9b0 g
198 > pick b5f70786f9b0 g
199 > EOF
199 > EOF
200 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
200 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
201 Make changes as needed, you may commit or record as needed now.
201 Editing (1a60820cd1f6), you may commit or record as needed now.
202 When you are finished, run hg histedit --continue to resume.
202 (hg histedit --continue to resume)
203
203
204 $ mv .hg/histedit-state .hg/histedit-state.bak
204 $ mv .hg/histedit-state .hg/histedit-state.bak
205 $ hg strip -q -r b5f70786f9b0
205 $ hg strip -q -r b5f70786f9b0
@@ -240,8 +240,8 b' check histedit_source'
240 > edit b5f70786f9b0 f
240 > edit b5f70786f9b0 f
241 > EOF
241 > EOF
242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
243 Make changes as needed, you may commit or record as needed now.
243 Editing (b5f70786f9b0), you may commit or record as needed now.
244 When you are finished, run hg histedit --continue to resume.
244 (hg histedit --continue to resume)
245 $ hg status
245 $ hg status
246 A f
246 A f
247
247
@@ -432,8 +432,8 b' rollback should not work after a histedi'
432 > EOF
432 > EOF
433 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
433 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
434 adding a
434 adding a
435 Make changes as needed, you may commit or record as needed now.
435 Editing (cb9a9f314b8b), you may commit or record as needed now.
436 When you are finished, run hg histedit --continue to resume.
436 (hg histedit --continue to resume)
437 [1]
437 [1]
438 $ HGEDITOR=true hg histedit --continue
438 $ HGEDITOR=true hg histedit --continue
439 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-backup.hg (glob)
439 saved backup bundle to $TESTTMP/r0/.hg/strip-backup/cb9a9f314b8b-cc5ccb0b-backup.hg (glob)
@@ -89,7 +89,8 b' edit the history'
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 merging e
90 merging e
91 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
91 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
92 Fix up the change and run hg histedit --continue
92 Fix up the change (fold 39522b764e3d)
93 (hg histedit --continue to resume)
93
94
94 fix up
95 fix up
95 $ echo 'I can haz no commute' > e
96 $ echo 'I can haz no commute' > e
@@ -123,7 +124,8 b' fix up'
123 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 merging e
125 merging e
125 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
126 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
126 Fix up the change and run hg histedit --continue
127 Fix up the change (pick 7b4e2f4b7bcd)
128 (hg histedit --continue to resume)
127
129
128 just continue this time
130 just continue this time
129 $ hg revert -r 'p1()' e
131 $ hg revert -r 'p1()' e
@@ -251,7 +253,8 b' edit the history'
251 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 merging e
254 merging e
253 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
255 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
254 Fix up the change and run hg histedit --continue
256 Fix up the change (roll 39522b764e3d)
257 (hg histedit --continue to resume)
255
258
256 fix up
259 fix up
257 $ echo 'I can haz no commute' > e
260 $ echo 'I can haz no commute' > e
@@ -263,7 +266,8 b' fix up'
263 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
266 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 merging e
267 merging e
265 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
268 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
266 Fix up the change and run hg histedit --continue
269 Fix up the change (pick 7b4e2f4b7bcd)
270 (hg histedit --continue to resume)
267
271
268 just continue this time
272 just continue this time
269 $ hg revert -r 'p1()' e
273 $ hg revert -r 'p1()' e
@@ -293,7 +293,8 b' folded content is dropped during a merge'
293 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
293 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
294 merging file
294 merging file
295 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
295 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
296 Fix up the change and run hg histedit --continue
296 Fix up the change (fold 251d831eeec5)
297 (hg histedit --continue to resume)
297 [1]
298 [1]
298 There were conflicts, we keep P1 content. This
299 There were conflicts, we keep P1 content. This
299 should effectively drop the changes from +6.
300 should effectively drop the changes from +6.
@@ -354,7 +355,8 b' dropped revision.'
354 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 merging file
356 merging file
356 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
357 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
357 Fix up the change and run hg histedit --continue
358 Fix up the change (fold 251d831eeec5)
359 (hg histedit --continue to resume)
358 [1]
360 [1]
359 $ cat > file << EOF
361 $ cat > file << EOF
360 > 1
362 > 1
@@ -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 Make changes as needed, you may commit or record as needed now.
94 Editing (e860deea161a), you may commit or record as needed now.
95 When you are finished, run hg histedit --continue to resume.
95 (hg histedit --continue to resume)
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 Make changes as needed, you may commit or record as needed now.
145 Editing (055a42cdd887), you may commit or record as needed now.
146 When you are finished, run hg histedit --continue to resume.
146 (hg histedit --continue to resume)
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 Make changes as needed, you may commit or record as needed now.
149 Editing (e860deea161a), you may commit or record as needed now.
150 When you are finished, run hg histedit --continue to resume.
150 (hg histedit --continue to resume)
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 Make changes as needed, you may commit or record as needed now.
214 Editing (292aec348d9e), you may commit or record as needed now.
215 When you are finished, run hg histedit --continue to resume.
215 (hg histedit --continue to resume)
216 $ hg histedit --abort
216 $ hg histedit --abort
217
217
218 $ cd ..
218 $ cd ..
@@ -72,7 +72,8 b' edit the history'
72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
73 merging e
73 merging e
74 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
74 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
75 Fix up the change and run hg histedit --continue
75 Fix up the change (pick e860deea161a)
76 (hg histedit --continue to resume)
76
77
77 insert unsupported advisory merge record
78 insert unsupported advisory merge record
78 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x
79 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x
@@ -90,7 +90,8 b' edit the history'
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 merging e
91 merging e
92 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
92 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
93 Fix up the change and run hg histedit --continue
93 Fix up the change (pick 39522b764e3d)
94 (hg histedit --continue to resume)
94
95
95 abort the edit
96 abort the edit
96 $ hg histedit --abort 2>&1 | fixbundle
97 $ hg histedit --abort 2>&1 | fixbundle
@@ -147,7 +148,8 b' edit the history'
147 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 merging e
149 merging e
149 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
150 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
150 Fix up the change and run hg histedit --continue
151 Fix up the change (pick 39522b764e3d)
152 (hg histedit --continue to resume)
151
153
152 fix up
154 fix up
153 $ echo 'I can haz no commute' > e
155 $ echo 'I can haz no commute' > e
@@ -157,7 +159,8 b' fix up'
157 $ hg histedit --continue 2>&1 | fixbundle
159 $ hg histedit --continue 2>&1 | fixbundle
158 merging e
160 merging e
159 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
161 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
160 Fix up the change and run hg histedit --continue
162 Fix up the change (pick 7b4e2f4b7bcd)
163 (hg histedit --continue to resume)
161
164
162 This failure is caused by 7b4e2f4b7bcd "e" not rebasing the non commutative
165 This failure is caused by 7b4e2f4b7bcd "e" not rebasing the non commutative
163 former children.
166 former children.
@@ -233,7 +236,8 b' edit the history, this time with a fold '
233 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
234 merging e
237 merging e
235 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
238 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
236 Fix up the change and run hg histedit --continue
239 Fix up the change (mess 39522b764e3d)
240 (hg histedit --continue to resume)
237
241
238 $ echo 'I can haz no commute' > e
242 $ echo 'I can haz no commute' > e
239 $ hg resolve --mark e
243 $ hg resolve --mark e
@@ -242,7 +246,8 b' edit the history, this time with a fold '
242 $ hg histedit --continue 2>&1 | fixbundle
246 $ hg histedit --continue 2>&1 | fixbundle
243 merging e
247 merging e
244 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
248 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
245 Fix up the change and run hg histedit --continue
249 Fix up the change (pick 7b4e2f4b7bcd)
250 (hg histedit --continue to resume)
246 second edit also fails, but just continue
251 second edit also fails, but just continue
247 $ hg revert -r 'p1()' e
252 $ hg revert -r 'p1()' e
248 $ hg resolve --mark e
253 $ hg resolve --mark e
@@ -136,8 +136,8 b' Test that rewriting leaving instability '
136 > EOF
136 > EOF
137 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
137 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
138 adding c
138 adding c
139 Make changes as needed, you may commit or record as needed now.
139 Editing (b346ab9a313d), you may commit or record as needed now.
140 When you are finished, run hg histedit --continue to resume.
140 (hg histedit --continue to resume)
141 [1]
141 [1]
142 $ echo c >> c
142 $ echo c >> c
143 $ hg histedit --continue
143 $ hg histedit --continue
@@ -280,8 +280,8 b' New-commit as draft (default)'
280 > EOF
280 > EOF
281 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
281 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
282 adding f
282 adding f
283 Make changes as needed, you may commit or record as needed now.
283 Editing (947ece25170f), you may commit or record as needed now.
284 When you are finished, run hg histedit --continue to resume.
284 (hg histedit --continue to resume)
285 [1]
285 [1]
286 $ echo f >> f
286 $ echo f >> f
287 $ hg histedit --continue
287 $ hg histedit --continue
@@ -323,8 +323,8 b' New-commit as draft (default)'
323 > EOF
323 > EOF
324 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
324 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
325 adding f
325 adding f
326 Make changes as needed, you may commit or record as needed now.
326 Editing (947ece25170f), you may commit or record as needed now.
327 When you are finished, run hg histedit --continue to resume.
327 (hg histedit --continue to resume)
328 [1]
328 [1]
329 $ echo f >> f
329 $ echo f >> f
330 $ hg histedit --continue
330 $ hg histedit --continue
General Comments 0
You need to be logged in to leave comments. Login now