Show More
@@ -2951,7 +2951,7 b' def graft(ui, repo, *revs, **opts):' | |||||
2951 |
|
2951 | |||
2952 | See :hg:`help revisions` for more about specifying revisions. |
|
2952 | See :hg:`help revisions` for more about specifying revisions. | |
2953 |
|
2953 | |||
2954 | Returns 0 on successful completion. |
|
2954 | Returns 0 on successful completion, 1 if there are unresolved files. | |
2955 | ''' |
|
2955 | ''' | |
2956 | with repo.wlock(): |
|
2956 | with repo.wlock(): | |
2957 | return _dograft(ui, repo, *revs, **opts) |
|
2957 | return _dograft(ui, repo, *revs, **opts) | |
@@ -3212,10 +3212,9 b' def _dograft(ui, repo, *revs, **opts):' | |||||
3212 | statedata[b'nodes'] = nodes |
|
3212 | statedata[b'nodes'] = nodes | |
3213 | stateversion = 1 |
|
3213 | stateversion = 1 | |
3214 | graftstate.save(stateversion, statedata) |
|
3214 | graftstate.save(stateversion, statedata) | |
3215 |
|
|
3215 | ui.error(_(b"abort: unresolved conflicts, can't continue\n")) | |
3216 | raise error.Abort( |
|
3216 | ui.error(_(b"(use 'hg resolve' and 'hg graft --continue')\n")) | |
3217 | _(b"unresolved conflicts, can't continue"), hint=hint |
|
3217 | return 1 | |
3218 | ) |
|
|||
3219 | else: |
|
3218 | else: | |
3220 | cont = False |
|
3219 | cont = False | |
3221 |
|
3220 |
@@ -564,7 +564,7 b' test the same case, this time with updat' | |||||
564 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
564 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
565 | abort: unresolved conflicts, can't continue |
|
565 | abort: unresolved conflicts, can't continue | |
566 | (use 'hg resolve' and 'hg graft --continue') |
|
566 | (use 'hg resolve' and 'hg graft --continue') | |
567 |
[ |
|
567 | [1] | |
568 | $ hg bisect --reset |
|
568 | $ hg bisect --reset | |
569 | $ hg up -C . |
|
569 | $ hg up -C . | |
570 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
570 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -109,7 +109,7 b' BROKEN: This should succeed and merge th' | |||||
109 | What do you want to do? u |
|
109 | What do you want to do? u | |
110 | abort: unresolved conflicts, can't continue |
|
110 | abort: unresolved conflicts, can't continue | |
111 | (use 'hg resolve' and 'hg graft --continue') |
|
111 | (use 'hg resolve' and 'hg graft --continue') | |
112 |
[ |
|
112 | [1] | |
113 |
|
113 | |||
114 | Add x, remove it, then add it back, then rename x to y. Similar to the case |
|
114 | Add x, remove it, then add it back, then rename x to y. Similar to the case | |
115 | above, but here the break in history is before the rename. |
|
115 | above, but here the break in history is before the rename. | |
@@ -193,7 +193,7 b' BROKEN: This should succeed and merge th' | |||||
193 | What do you want to do? u |
|
193 | What do you want to do? u | |
194 | abort: unresolved conflicts, can't continue |
|
194 | abort: unresolved conflicts, can't continue | |
195 | (use 'hg resolve' and 'hg graft --continue') |
|
195 | (use 'hg resolve' and 'hg graft --continue') | |
196 |
[ |
|
196 | [1] | |
197 | #endif |
|
197 | #endif | |
198 | $ hg co -qC 2 |
|
198 | $ hg co -qC 2 | |
199 | BROKEN: This should succeed and merge the changes from x into y |
|
199 | BROKEN: This should succeed and merge the changes from x into y | |
@@ -204,7 +204,7 b' BROKEN: This should succeed and merge th' | |||||
204 | What do you want to do? u |
|
204 | What do you want to do? u | |
205 | abort: unresolved conflicts, can't continue |
|
205 | abort: unresolved conflicts, can't continue | |
206 | (use 'hg resolve' and 'hg graft --continue') |
|
206 | (use 'hg resolve' and 'hg graft --continue') | |
207 |
[ |
|
207 | [1] | |
208 |
|
208 | |||
209 | Add x, remove it, then add it back, rename x to y from the first commit. |
|
209 | Add x, remove it, then add it back, rename x to y from the first commit. | |
210 | Similar to the case above, but here the break in history is parallel to the |
|
210 | Similar to the case above, but here the break in history is parallel to the | |
@@ -278,7 +278,7 b' BROKEN: This should succeed and merge th' | |||||
278 | What do you want to do? u |
|
278 | What do you want to do? u | |
279 | abort: unresolved conflicts, can't continue |
|
279 | abort: unresolved conflicts, can't continue | |
280 | (use 'hg resolve' and 'hg graft --continue') |
|
280 | (use 'hg resolve' and 'hg graft --continue') | |
281 |
[ |
|
281 | [1] | |
282 |
|
282 | |||
283 | Add x on two branches, then rename x to y on one side. Similar to the case |
|
283 | Add x on two branches, then rename x to y on one side. Similar to the case | |
284 | above, but here the break in history is via the base commit. |
|
284 | above, but here the break in history is via the base commit. | |
@@ -361,7 +361,7 b' BROKEN: This should succeed and merge th' | |||||
361 | What do you want to do? u |
|
361 | What do you want to do? u | |
362 | abort: unresolved conflicts, can't continue |
|
362 | abort: unresolved conflicts, can't continue | |
363 | (use 'hg resolve' and 'hg graft --continue') |
|
363 | (use 'hg resolve' and 'hg graft --continue') | |
364 |
[ |
|
364 | [1] | |
365 | #endif |
|
365 | #endif | |
366 | $ hg co -qC 2 |
|
366 | $ hg co -qC 2 | |
367 | BROKEN: This should succeed and merge the changes from x into y |
|
367 | BROKEN: This should succeed and merge the changes from x into y | |
@@ -372,7 +372,7 b' BROKEN: This should succeed and merge th' | |||||
372 | What do you want to do? u |
|
372 | What do you want to do? u | |
373 | abort: unresolved conflicts, can't continue |
|
373 | abort: unresolved conflicts, can't continue | |
374 | (use 'hg resolve' and 'hg graft --continue') |
|
374 | (use 'hg resolve' and 'hg graft --continue') | |
375 |
[ |
|
375 | [1] | |
376 |
|
376 | |||
377 | Copies via null revision (there shouldn't be any) |
|
377 | Copies via null revision (there shouldn't be any) | |
378 | $ newrepo |
|
378 | $ newrepo |
@@ -32,7 +32,7 b' Testing the reading of old format grafts' | |||||
32 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
32 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
33 | abort: unresolved conflicts, can't continue |
|
33 | abort: unresolved conflicts, can't continue | |
34 | (use 'hg resolve' and 'hg graft --continue') |
|
34 | (use 'hg resolve' and 'hg graft --continue') | |
35 |
[ |
|
35 | [1] | |
36 |
|
36 | |||
37 | Writing the nodes in old format to graftstate |
|
37 | Writing the nodes in old format to graftstate | |
38 |
|
38 | |||
@@ -91,7 +91,7 b' running `hg graft --continue`' | |||||
91 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
91 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
92 | abort: unresolved conflicts, can't continue |
|
92 | abort: unresolved conflicts, can't continue | |
93 | (use 'hg resolve' and 'hg graft --continue') |
|
93 | (use 'hg resolve' and 'hg graft --continue') | |
94 |
[ |
|
94 | [1] | |
95 |
|
95 | |||
96 | $ echo wat > b |
|
96 | $ echo wat > b | |
97 | $ hg resolve -m |
|
97 | $ hg resolve -m | |
@@ -141,7 +141,7 b' Test that --date is preserved and reused' | |||||
141 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
141 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
142 | abort: unresolved conflicts, can't continue |
|
142 | abort: unresolved conflicts, can't continue | |
143 | (use 'hg resolve' and 'hg graft --continue') |
|
143 | (use 'hg resolve' and 'hg graft --continue') | |
144 |
[ |
|
144 | [1] | |
145 |
|
145 | |||
146 | $ echo foobar > b |
|
146 | $ echo foobar > b | |
147 | $ hg resolve -m |
|
147 | $ hg resolve -m | |
@@ -180,7 +180,7 b' Test that --log is preserved and reused ' | |||||
180 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
180 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
181 | abort: unresolved conflicts, can't continue |
|
181 | abort: unresolved conflicts, can't continue | |
182 | (use 'hg resolve' and 'hg graft --continue') |
|
182 | (use 'hg resolve' and 'hg graft --continue') | |
183 |
[ |
|
183 | [1] | |
184 |
|
184 | |||
185 | $ echo foobar > b |
|
185 | $ echo foobar > b | |
186 | $ hg resolve -m |
|
186 | $ hg resolve -m | |
@@ -246,7 +246,7 b' Testing the --stop flag of `hg graft` wh' | |||||
246 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
246 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
247 | abort: unresolved conflicts, can't continue |
|
247 | abort: unresolved conflicts, can't continue | |
248 | (use 'hg resolve' and 'hg graft --continue') |
|
248 | (use 'hg resolve' and 'hg graft --continue') | |
249 |
[ |
|
249 | [1] | |
250 |
|
250 | |||
251 | $ hg graft --stop --continue |
|
251 | $ hg graft --stop --continue | |
252 | abort: cannot use '--continue' and '--stop' together |
|
252 | abort: cannot use '--continue' and '--stop' together | |
@@ -283,7 +283,7 b' Testing the --stop flag of `hg graft` wh' | |||||
283 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
283 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
284 | abort: unresolved conflicts, can't continue |
|
284 | abort: unresolved conflicts, can't continue | |
285 | (use 'hg resolve' and 'hg graft --continue') |
|
285 | (use 'hg resolve' and 'hg graft --continue') | |
286 |
[ |
|
286 | [1] | |
287 |
|
287 | |||
288 | $ hg graft --stop |
|
288 | $ hg graft --stop | |
289 | stopped the interrupted graft |
|
289 | stopped the interrupted graft | |
@@ -352,7 +352,7 b' when stripping is required' | |||||
352 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
352 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
353 | abort: unresolved conflicts, can't continue |
|
353 | abort: unresolved conflicts, can't continue | |
354 | (use 'hg resolve' and 'hg graft --continue') |
|
354 | (use 'hg resolve' and 'hg graft --continue') | |
355 |
[ |
|
355 | [1] | |
356 |
|
356 | |||
357 | $ hg graft --continue --abort |
|
357 | $ hg graft --continue --abort | |
358 | abort: cannot use '--continue' and '--abort' together |
|
358 | abort: cannot use '--continue' and '--abort' together | |
@@ -399,7 +399,7 b' when stripping is not required' | |||||
399 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
399 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
400 | abort: unresolved conflicts, can't continue |
|
400 | abort: unresolved conflicts, can't continue | |
401 | (use 'hg resolve' and 'hg graft --continue') |
|
401 | (use 'hg resolve' and 'hg graft --continue') | |
402 |
[ |
|
402 | [1] | |
403 |
|
403 | |||
404 | $ hg abort |
|
404 | $ hg abort | |
405 | graft aborted |
|
405 | graft aborted | |
@@ -426,7 +426,7 b' when some of the changesets became publi' | |||||
426 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
426 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
427 | abort: unresolved conflicts, can't continue |
|
427 | abort: unresolved conflicts, can't continue | |
428 | (use 'hg resolve' and 'hg graft --continue') |
|
428 | (use 'hg resolve' and 'hg graft --continue') | |
429 |
[ |
|
429 | [1] | |
430 |
|
430 | |||
431 | $ hg log -GT "{rev}:{node|short} {desc}" |
|
431 | $ hg log -GT "{rev}:{node|short} {desc}" | |
432 | @ 6:6ec71c037d94 added x |
|
432 | @ 6:6ec71c037d94 added x | |
@@ -488,7 +488,7 b' when we created new changesets on top of' | |||||
488 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
488 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
489 | abort: unresolved conflicts, can't continue |
|
489 | abort: unresolved conflicts, can't continue | |
490 | (use 'hg resolve' and 'hg graft --continue') |
|
490 | (use 'hg resolve' and 'hg graft --continue') | |
491 |
[ |
|
491 | [1] | |
492 |
|
492 | |||
493 | $ cd .. |
|
493 | $ cd .. | |
494 | $ hg init pullrepo |
|
494 | $ hg init pullrepo | |
@@ -609,7 +609,7 b' Prepare wrdir to check --no-commit is re' | |||||
609 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
609 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
610 | abort: unresolved conflicts, can't continue |
|
610 | abort: unresolved conflicts, can't continue | |
611 | (use 'hg resolve' and 'hg graft --continue') |
|
611 | (use 'hg resolve' and 'hg graft --continue') | |
612 |
[ |
|
612 | [1] | |
613 |
|
613 | |||
614 | Resolve conflict: |
|
614 | Resolve conflict: | |
615 | $ echo A>a |
|
615 | $ echo A>a | |
@@ -648,7 +648,7 b' Check --no-commit is resepected when pas' | |||||
648 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
648 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
649 | abort: unresolved conflicts, can't continue |
|
649 | abort: unresolved conflicts, can't continue | |
650 | (use 'hg resolve' and 'hg graft --continue') |
|
650 | (use 'hg resolve' and 'hg graft --continue') | |
651 |
[ |
|
651 | [1] | |
652 |
|
652 | |||
653 | Resolve conflict: |
|
653 | Resolve conflict: | |
654 | $ echo A>a |
|
654 | $ echo A>a | |
@@ -688,7 +688,7 b' When there is conflict:' | |||||
688 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
688 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
689 | abort: unresolved conflicts, can't continue |
|
689 | abort: unresolved conflicts, can't continue | |
690 | (use 'hg resolve' and 'hg graft --continue') |
|
690 | (use 'hg resolve' and 'hg graft --continue') | |
691 |
[ |
|
691 | [1] | |
692 |
|
692 | |||
693 | $ echo A>a |
|
693 | $ echo A>a | |
694 | $ hg resolve --mark |
|
694 | $ hg resolve --mark |
@@ -260,7 +260,7 b' Graft out of order, skipping a merge and' | |||||
260 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
260 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
261 | abort: unresolved conflicts, can't continue |
|
261 | abort: unresolved conflicts, can't continue | |
262 | (use 'hg resolve' and 'hg graft --continue') |
|
262 | (use 'hg resolve' and 'hg graft --continue') | |
263 |
[ |
|
263 | [1] | |
264 |
|
264 | |||
265 | Summary should mention graft: |
|
265 | Summary should mention graft: | |
266 |
|
266 | |||
@@ -317,7 +317,7 b' Graft again:' | |||||
317 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
317 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
318 | abort: unresolved conflicts, can't continue |
|
318 | abort: unresolved conflicts, can't continue | |
319 | (use 'hg resolve' and 'hg graft --continue') |
|
319 | (use 'hg resolve' and 'hg graft --continue') | |
320 |
[ |
|
320 | [1] | |
321 |
|
321 | |||
322 | Continue without resolve should fail: |
|
322 | Continue without resolve should fail: | |
323 |
|
323 | |||
@@ -511,7 +511,7 b' Resolve conflicted graft' | |||||
511 | grafting 1:5d205f8b35b6 "1" |
|
511 | grafting 1:5d205f8b35b6 "1" | |
512 | abort: unresolved conflicts, can't continue |
|
512 | abort: unresolved conflicts, can't continue | |
513 | (use 'hg resolve' and 'hg graft --continue') |
|
513 | (use 'hg resolve' and 'hg graft --continue') | |
514 |
[ |
|
514 | [1] | |
515 | $ hg resolve --all |
|
515 | $ hg resolve --all | |
516 | merging a |
|
516 | merging a | |
517 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
517 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
@@ -551,7 +551,7 b' Resolve conflicted graft with rename' | |||||
551 | grafting 2:5c095ad7e90f "2" |
|
551 | grafting 2:5c095ad7e90f "2" | |
552 | abort: unresolved conflicts, can't continue |
|
552 | abort: unresolved conflicts, can't continue | |
553 | (use 'hg resolve' and 'hg graft --continue') |
|
553 | (use 'hg resolve' and 'hg graft --continue') | |
554 |
[ |
|
554 | [1] | |
555 | $ hg resolve --all |
|
555 | $ hg resolve --all | |
556 | merging a and b to b |
|
556 | merging a and b to b | |
557 | (no more unresolved files) |
|
557 | (no more unresolved files) | |
@@ -839,7 +839,7 b' graft --continue after --force' | |||||
839 | grafting 24:2e7ea477be26 "24" |
|
839 | grafting 24:2e7ea477be26 "24" | |
840 | abort: unresolved conflicts, can't continue |
|
840 | abort: unresolved conflicts, can't continue | |
841 | (use 'hg resolve' and 'hg graft --continue') |
|
841 | (use 'hg resolve' and 'hg graft --continue') | |
842 |
[ |
|
842 | [1] | |
843 | $ hg resolve --all |
|
843 | $ hg resolve --all | |
844 | merging a |
|
844 | merging a | |
845 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
845 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
@@ -74,7 +74,7 b' https://bz.mercurial-scm.org/show_bug.cg' | |||||
74 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
74 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
75 | abort: unresolved conflicts, can't continue |
|
75 | abort: unresolved conflicts, can't continue | |
76 | (use 'hg resolve' and 'hg graft --continue') |
|
76 | (use 'hg resolve' and 'hg graft --continue') | |
77 |
[ |
|
77 | [1] | |
78 | $ echo a > b |
|
78 | $ echo a > b | |
79 | $ echo b3 >> b |
|
79 | $ echo b3 >> b | |
80 | $ hg resolve --mark b |
|
80 | $ hg resolve --mark b |
General Comments 0
You need to be logged in to leave comments.
Login now