Show More
@@ -301,8 +301,8 b' def pick(ui, repo, ctx, ha, opts):' | |||||
301 | hg.update(repo, ctx.node()) |
|
301 | hg.update(repo, ctx.node()) | |
302 | stats = applychanges(ui, repo, oldctx, opts) |
|
302 | stats = applychanges(ui, repo, oldctx, opts) | |
303 | if stats and stats[3] > 0: |
|
303 | if stats and stats[3] > 0: | |
304 |
raise |
|
304 | raise error.InterventionRequired(_('Fix up the change and run ' | |
305 | 'hg histedit --continue')) |
|
305 | 'hg histedit --continue')) | |
306 | # drop the second merge parent |
|
306 | # drop the second merge parent | |
307 | commit = commitfuncfor(repo, oldctx) |
|
307 | commit = commitfuncfor(repo, oldctx) | |
308 | n = commit(text=oldctx.description(), user=oldctx.user(), |
|
308 | n = commit(text=oldctx.description(), user=oldctx.user(), | |
@@ -319,17 +319,17 b' def edit(ui, repo, ctx, ha, opts):' | |||||
319 | oldctx = repo[ha] |
|
319 | oldctx = repo[ha] | |
320 | hg.update(repo, ctx.node()) |
|
320 | hg.update(repo, ctx.node()) | |
321 | applychanges(ui, repo, oldctx, opts) |
|
321 | applychanges(ui, repo, oldctx, opts) | |
322 | raise util.Abort(_('Make changes as needed, you may commit or record as ' |
|
322 | raise error.InterventionRequired( | |
323 | 'needed now.\nWhen you are finished, run hg' |
|
323 | _('Make changes as needed, you may commit or record as needed now.\n' | |
324 |
|
|
324 | 'When you are finished, run hg histedit --continue to resume.')) | |
325 |
|
325 | |||
326 | def fold(ui, repo, ctx, ha, opts): |
|
326 | def fold(ui, repo, ctx, ha, opts): | |
327 | oldctx = repo[ha] |
|
327 | oldctx = repo[ha] | |
328 | hg.update(repo, ctx.node()) |
|
328 | hg.update(repo, ctx.node()) | |
329 | stats = applychanges(ui, repo, oldctx, opts) |
|
329 | stats = applychanges(ui, repo, oldctx, opts) | |
330 | if stats and stats[3] > 0: |
|
330 | if stats and stats[3] > 0: | |
331 | raise util.Abort(_('Fix up the change and run ' |
|
331 | raise error.InterventionRequired( | |
332 |
|
|
332 | _('Fix up the change and run hg histedit --continue')) | |
333 | n = repo.commit(text='fold-temp-revision %s' % ha, user=oldctx.user(), |
|
333 | n = repo.commit(text='fold-temp-revision %s' % ha, user=oldctx.user(), | |
334 | date=oldctx.date(), extra=oldctx.extra()) |
|
334 | date=oldctx.date(), extra=oldctx.extra()) | |
335 | if n is None: |
|
335 | if n is None: | |
@@ -390,8 +390,8 b' def message(ui, repo, ctx, ha, opts):' | |||||
390 | hg.update(repo, ctx.node()) |
|
390 | hg.update(repo, ctx.node()) | |
391 | stats = applychanges(ui, repo, oldctx, opts) |
|
391 | stats = applychanges(ui, repo, oldctx, opts) | |
392 | if stats and stats[3] > 0: |
|
392 | if stats and stats[3] > 0: | |
393 | raise util.Abort(_('Fix up the change and run ' |
|
393 | raise error.InterventionRequired( | |
394 |
|
|
394 | _('Fix up the change and run hg histedit --continue')) | |
395 | message = oldctx.description() + '\n' |
|
395 | message = oldctx.description() + '\n' | |
396 | message = ui.edit(message, ui.username()) |
|
396 | message = ui.edit(message, ui.username()) | |
397 | commit = commitfuncfor(repo, oldctx) |
|
397 | commit = commitfuncfor(repo, oldctx) |
@@ -63,7 +63,7 b' log before edit' | |||||
63 | edit the history |
|
63 | edit the history | |
64 | $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle |
|
64 | $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle | |
65 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
65 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
66 |
|
|
66 | Make changes as needed, you may commit or record as needed now. | |
67 | When you are finished, run hg histedit --continue to resume. |
|
67 | When you are finished, run hg histedit --continue to resume. | |
68 |
|
68 | |||
69 | Go at a random point and try to continue |
|
69 | Go at a random point and try to continue | |
@@ -151,7 +151,7 b' check histedit_source' | |||||
151 | > EOF |
|
151 | > EOF | |
152 | $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle |
|
152 | $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle | |
153 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
153 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
154 |
|
|
154 | Make changes as needed, you may commit or record as needed now. | |
155 | When you are finished, run hg histedit --continue to resume. |
|
155 | When you are finished, run hg histedit --continue to resume. | |
156 | $ hg status |
|
156 | $ hg status | |
157 | A f |
|
157 | A f |
@@ -91,7 +91,7 b' edit the history' | |||||
91 | merging e |
|
91 | merging e | |
92 | warning: conflicts during merge. |
|
92 | warning: conflicts during merge. | |
93 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
93 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
94 |
|
|
94 | Fix up the change and run hg histedit --continue | |
95 |
|
95 | |||
96 | fix up |
|
96 | fix up | |
97 | $ echo 'I can haz no commute' > e |
|
97 | $ echo 'I can haz no commute' > e | |
@@ -125,7 +125,7 b' fix up' | |||||
125 | merging e |
|
125 | merging e | |
126 | warning: conflicts during merge. |
|
126 | warning: conflicts during merge. | |
127 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
127 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
128 |
|
|
128 | Fix up the change and run hg histedit --continue | |
129 |
|
129 | |||
130 | just continue this time |
|
130 | just continue this time | |
131 | $ hg revert -r 'p1()' e |
|
131 | $ hg revert -r 'p1()' e |
@@ -182,7 +182,7 b' folding and creating no new change doesn' | |||||
182 | merging file |
|
182 | merging file | |
183 | warning: conflicts during merge. |
|
183 | warning: conflicts during merge. | |
184 | merging file incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
184 | merging file incomplete! (edit conflicts, then use 'hg resolve --mark') | |
185 |
|
|
185 | Fix up the change and run hg histedit --continue | |
186 | [255] |
|
186 | [255] | |
187 | There were conflicts, we keep P1 content. This |
|
187 | There were conflicts, we keep P1 content. This | |
188 | should effectively drop the changes from +6. |
|
188 | should effectively drop the changes from +6. | |
@@ -247,7 +247,7 b' dropped revision.' | |||||
247 | merging file |
|
247 | merging file | |
248 | warning: conflicts during merge. |
|
248 | warning: conflicts during merge. | |
249 | merging file incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
249 | merging file incomplete! (edit conflicts, then use 'hg resolve --mark') | |
250 |
|
|
250 | Fix up the change and run hg histedit --continue | |
251 | [255] |
|
251 | [255] | |
252 | $ cat > file << EOF |
|
252 | $ cat > file << EOF | |
253 | > 1 |
|
253 | > 1 |
@@ -92,7 +92,7 b' editing a changeset without any actual c' | |||||
92 | | edit e860deea161a 4 e |
|
92 | | edit e860deea161a 4 e | |
93 | | pick 652413bf663e 5 f |
|
93 | | pick 652413bf663e 5 f | |
94 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
94 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
95 |
|
|
95 | Make changes as needed, you may commit or record as needed now. | |
96 | When you are finished, run hg histedit --continue to resume. |
|
96 | When you are finished, run hg histedit --continue to resume. | |
97 | $ continueediting true "(leaving commit message unaltered)" |
|
97 | $ continueediting true "(leaving commit message unaltered)" | |
98 | % finalize changeset editing (leaving commit message unaltered) |
|
98 | % finalize changeset editing (leaving commit message unaltered) | |
@@ -145,12 +145,12 b' check state of working copy' | |||||
145 | | edit e860deea161a 4 e |
|
145 | | edit e860deea161a 4 e | |
146 | | pick 652413bf663e 5 f |
|
146 | | pick 652413bf663e 5 f | |
147 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
147 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
148 |
|
|
148 | Make changes as needed, you may commit or record as needed now. | |
149 | When you are finished, run hg histedit --continue to resume. |
|
149 | When you are finished, run hg histedit --continue to resume. | |
150 | $ continueediting true "(leaving commit message unaltered)" |
|
150 | $ continueediting true "(leaving commit message unaltered)" | |
151 | % finalize changeset editing (leaving commit message unaltered) |
|
151 | % finalize changeset editing (leaving commit message unaltered) | |
152 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
152 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
153 |
|
|
153 | Make changes as needed, you may commit or record as needed now. | |
154 | When you are finished, run hg histedit --continue to resume. |
|
154 | When you are finished, run hg histedit --continue to resume. | |
155 | $ graphlog "log after first edit" |
|
155 | $ graphlog "log after first edit" | |
156 | % log after first edit |
|
156 | % log after first edit |
@@ -79,7 +79,7 b' edit the history' | |||||
79 | merging e |
|
79 | merging e | |
80 | warning: conflicts during merge. |
|
80 | warning: conflicts during merge. | |
81 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
81 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
82 |
|
|
82 | Fix up the change and run hg histedit --continue | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | abort the edit |
|
85 | abort the edit |
@@ -92,7 +92,7 b' edit the history' | |||||
92 | merging e |
|
92 | merging e | |
93 | warning: conflicts during merge. |
|
93 | warning: conflicts during merge. | |
94 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
94 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
95 |
|
|
95 | Fix up the change and run hg histedit --continue | |
96 |
|
96 | |||
97 | abort the edit |
|
97 | abort the edit | |
98 | $ hg histedit --abort 2>&1 | fixbundle |
|
98 | $ hg histedit --abort 2>&1 | fixbundle | |
@@ -150,7 +150,7 b' edit the history' | |||||
150 | merging e |
|
150 | merging e | |
151 | warning: conflicts during merge. |
|
151 | warning: conflicts during merge. | |
152 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
152 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
153 |
|
|
153 | Fix up the change and run hg histedit --continue | |
154 |
|
154 | |||
155 | fix up |
|
155 | fix up | |
156 | $ echo 'I can haz no commute' > e |
|
156 | $ echo 'I can haz no commute' > e | |
@@ -160,7 +160,7 b' fix up' | |||||
160 | merging e |
|
160 | merging e | |
161 | warning: conflicts during merge. |
|
161 | warning: conflicts during merge. | |
162 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
162 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
163 |
|
|
163 | Fix up the change and run hg histedit --continue | |
164 |
|
164 | |||
165 | 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 | |
166 | former children. |
|
166 | former children. | |
@@ -236,7 +236,7 b' edit the history, this time with a fold ' | |||||
236 | merging e |
|
236 | merging e | |
237 | warning: conflicts during merge. |
|
237 | warning: conflicts during merge. | |
238 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
238 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
239 |
|
|
239 | Fix up the change and run hg histedit --continue | |
240 |
|
240 | |||
241 | $ echo 'I can haz no commute' > e |
|
241 | $ echo 'I can haz no commute' > e | |
242 | $ hg resolve --mark e |
|
242 | $ hg resolve --mark e | |
@@ -245,7 +245,7 b' edit the history, this time with a fold ' | |||||
245 | merging e |
|
245 | merging e | |
246 | warning: conflicts during merge. |
|
246 | warning: conflicts during merge. | |
247 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
247 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
248 |
|
|
248 | Fix up the change and run hg histedit --continue | |
249 | second edit also fails, but just continue |
|
249 | second edit also fails, but just continue | |
250 | $ hg revert -r 'p1()' e |
|
250 | $ hg revert -r 'p1()' e | |
251 | $ hg resolve --mark e |
|
251 | $ hg resolve --mark e |
@@ -139,7 +139,7 b' Test that rewriting leaving instability ' | |||||
139 | $ hg histedit -r '.' --commands commands.txt |
|
139 | $ hg histedit -r '.' --commands commands.txt | |
140 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
140 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
141 | adding c |
|
141 | adding c | |
142 |
|
|
142 | Make changes as needed, you may commit or record as needed now. | |
143 | When you are finished, run hg histedit --continue to resume. |
|
143 | When you are finished, run hg histedit --continue to resume. | |
144 | [255] |
|
144 | [255] | |
145 | $ echo c >> c |
|
145 | $ echo c >> c | |
@@ -278,7 +278,7 b' New-commit as draft (default)' | |||||
278 | $ hg histedit -r 'b449568bf7fc' --commands commands.txt |
|
278 | $ hg histedit -r 'b449568bf7fc' --commands commands.txt | |
279 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
279 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
280 | adding f |
|
280 | adding f | |
281 |
|
|
281 | Make changes as needed, you may commit or record as needed now. | |
282 | When you are finished, run hg histedit --continue to resume. |
|
282 | When you are finished, run hg histedit --continue to resume. | |
283 | [255] |
|
283 | [255] | |
284 | $ echo f >> f |
|
284 | $ echo f >> f | |
@@ -328,7 +328,7 b' New-commit as draft (default)' | |||||
328 | $ hg histedit -r 'b449568bf7fc' --commands commands.txt |
|
328 | $ hg histedit -r 'b449568bf7fc' --commands commands.txt | |
329 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
329 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
330 | adding f |
|
330 | adding f | |
331 |
|
|
331 | Make changes as needed, you may commit or record as needed now. | |
332 | When you are finished, run hg histedit --continue to resume. |
|
332 | When you are finished, run hg histedit --continue to resume. | |
333 | [255] |
|
333 | [255] | |
334 | $ echo f >> f |
|
334 | $ echo f >> f |
General Comments 0
You need to be logged in to leave comments.
Login now