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