Mercurial > evolve
comparison tests/test-stabilize-result.t @ 3737:5b0bd82ea914
evolve: add logic to continue interrupted content-divergence resolution
We continue the interrupted content-divergence using the logic to complete
content-divergence which we refactored in it's own function few patches ago.
We had to delete evolvestate file before using cmdutil.amend() because otherwise
we can't use the function. This leads to a hack which deletes the evolvestate
file, we may want to not to use the high level API function here. Also we had to
pass evolvestate also to _completecontentdivergent function because of this.
This patch also, adds a test which demonstrates that the logic works fine.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 29 Apr 2018 18:51:56 +0530 |
parents | f6979d64b9fb |
children | ed3f69fb67bf |
comparison
equal
deleted
inserted
replaced
3736:4b8c63d14f18 | 3737:5b0bd82ea914 |
---|---|
360 # reamend so that the case is not the first precursor. | 360 # reamend so that the case is not the first precursor. |
361 $ hg amend -m "More addition (2)" | 361 $ hg amend -m "More addition (2)" |
362 $ hg phase 'contentdivergent()' | 362 $ hg phase 'contentdivergent()' |
363 15: draft | 363 15: draft |
364 17: draft | 364 17: draft |
365 | |
366 $ glog | |
367 @ 17:0b336205a5d0@default(draft) bk:[] More addition (2) | |
368 | | |
369 | * 15:f344982e63c4@default(draft) bk:[] More addition | |
370 |/ | |
371 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | |
372 | | | |
373 o | 7:7bc2f5967f5e@default(draft) bk:[] add c | |
374 | | | |
375 | o 6:1cf0aacfd363@default(public) bk:[] newer a | |
376 |/ | |
377 o 5:66719795a494@default(public) bk:[changea] changea | |
378 | | |
379 o 0:07f494440405@default(public) bk:[] adda | |
380 | |
381 | |
365 $ hg evolve -qn --content-divergent | 382 $ hg evolve -qn --content-divergent |
366 hg update -c 0b336205a5d0 && | 383 hg update -c 0b336205a5d0 && |
367 hg merge f344982e63c4 && | 384 hg merge f344982e63c4 && |
368 hg commit -m "auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&& | 385 hg commit -m "auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&& |
369 hg up -C 3932c176bbaa && | 386 hg up -C 3932c176bbaa && |
384 /!\ * hg revert --all -r X | 401 /!\ * hg revert --all -r X |
385 /!\ * hg ci -m "same message as the amended changeset" => new cset Y | 402 /!\ * hg ci -m "same message as the amended changeset" => new cset Y |
386 /!\ * hg prune -n Y W Z | 403 /!\ * hg prune -n Y W Z |
387 ) | 404 ) |
388 [255] | 405 [255] |
406 | |
407 $ cat > a <<EOF | |
408 > jungle | |
409 > a | |
410 > flore | |
411 > arthur | |
412 > zephir | |
413 > some | |
414 > less | |
415 > conflict | |
416 > babar | |
417 > EOF | |
418 | |
419 $ hg resolve -m | |
420 (no more unresolved files) | |
421 continue: hg evolve --continue | |
422 $ hg evolve --continue | |
423 merge:[17] More addition (2) | |
424 with: [18] More addition (2) | |
425 base: [16] More addition | |
426 updating to "local" conflict | |
427 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
428 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
429 working directory is now at e015aa78acee | |
430 $ glog | |
431 @ 18:e015aa78acee@default(draft) bk:[] More addition (2) | |
432 | | |
433 | o 11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363: | |
434 | | | |
435 o | 7:7bc2f5967f5e@default(draft) bk:[] add c | |
436 | | | |
437 | o 6:1cf0aacfd363@default(public) bk:[] newer a | |
438 |/ | |
439 o 5:66719795a494@default(public) bk:[changea] changea | |
440 | | |
441 o 0:07f494440405@default(public) bk:[] adda | |
442 | |
443 $ hg exp | |
444 # HG changeset patch | |
445 # User test | |
446 # Date 0 0 | |
447 # Thu Jan 01 00:00:00 1970 +0000 | |
448 # Node ID e015aa78acee692d26215fafdb7f70974682739c | |
449 # Parent 7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced | |
450 More addition (2) | |
451 | |
452 diff -r 7bc2f5967f5e -r e015aa78acee a | |
453 --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
454 +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
455 @@ -1,1 +1,9 @@ | |
456 +jungle | |
457 a | |
458 +flore | |
459 +arthur | |
460 +zephir | |
461 +some | |
462 +less | |
463 +conflict | |
464 +babar |