Mercurial > evolve
comparison tests/test-evolve-content-divergent-interrupted.t @ 5786:c0122b98356c
divergence-resolution: [patch 1] fix a messed up test case
Because of logic change in divergence resolution which causes the order change
in picking the resolution parent this test case was messed up.
It was supposed to test that that it hits conflict while relocating the
divergent cset but because of some change in previous patches, relocation went
successful and it hits conflict while merging the two divergent csets.
This patch, by making some changes in files content make sure that we get
conflict during relocation.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 24 Jan 2021 19:47:17 +0530 |
parents | a119432bafc1 |
children | 32c0b2899fc4 |
comparison
equal
deleted
inserted
replaced
5785:a9ad01ed1539 | 5786:c0122b98356c |
---|---|
535 | 535 |
536 Content-divergence with parent-change which will result in conflicts while | 536 Content-divergence with parent-change which will result in conflicts while |
537 relocation | 537 relocation |
538 --------------------------------------------------------------------------- | 538 --------------------------------------------------------------------------- |
539 | 539 |
540 $ echo babar > c | 540 Making changes to make sure that it hits conflict while relocating |
541 $ hg add c | 541 $ hg up -r 3 |
542 c already tracked! | 542 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
543 $ hg amend | 543 $ echo "some_changes" >> a |
544 $ hg glog | 544 $ hg amend |
545 @ 8:2d664a4ab749 added d | 545 1 new orphan changesets |
546 $ hg next | |
547 move:[5] added d | |
548 atop:[8] added c | |
549 working directory is now at dc9ba677cba1 | |
550 $ echo "latest_changes" >> a | |
551 $ hg amend | |
552 $ hg glog | |
553 @ 10:0892835a581f added d | |
554 | () draft | |
555 o 8:33c16a2e0eb8 added c | |
546 | () draft | 556 | () draft |
547 | * 7:517d4375cb72 added d | 557 | * 7:517d4375cb72 added d |
548 | | () draft | |
549 o | 3:ca1b80f7960a added c | |
550 | | () draft | 558 | | () draft |
551 o | 2:b1661037fa25 added b | 559 o | 2:b1661037fa25 added b |
552 |/ () draft | 560 |/ () draft |
553 o 1:c7586e2a9264 added a | 561 o 1:c7586e2a9264 added a |
554 | () draft | 562 | () draft |
555 o 0:8fa14d15e168 added hgignore | 563 o 0:8fa14d15e168 added hgignore |
556 () draft | 564 () draft |
557 | 565 |
558 $ hg evolve --content-divergent | 566 $ hg evolve --content-divergent |
559 merge:[7] added d | 567 merge:[7] added d |
560 with: [8] added d | 568 with: [10] added d |
561 base: [4] added d | 569 base: [4] added d |
562 rebasing "other" content-divergent changeset 2d664a4ab749 on c7586e2a9264 | 570 rebasing "other" content-divergent changeset 0892835a581f on c7586e2a9264 |
563 file 'c' was deleted in local but was modified in other. | 571 merging a |
564 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | 572 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
565 What do you want to do? u | |
566 merging d | |
567 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
568 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
569 unresolved merge conflicts | 573 unresolved merge conflicts |
570 (see 'hg help evolve.interrupted') | 574 (see 'hg help evolve.interrupted') |
571 [240] | 575 [240] |
572 | 576 |
573 $ hg diff | 577 $ hg diff |
574 diff -r 517d4375cb72 c | 578 diff -r c7586e2a9264 a |
579 --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
580 +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
581 @@ -1,1 +1,6 @@ | |
582 foo | |
583 +<<<<<<< destination: c7586e2a9264 - test: added a | |
584 +======= | |
585 +some_changes | |
586 +latest_changes | |
587 +>>>>>>> evolving: 0892835a581f - test: added d | |
588 diff -r c7586e2a9264 d | |
575 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 589 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
576 +++ b/c Thu Jan 01 00:00:00 1970 +0000 | 590 +++ b/d Thu Jan 01 00:00:00 1970 +0000 |
577 @@ -0,0 +1,1 @@ | 591 @@ -0,0 +1,1 @@ |
578 +babar | |
579 diff -r 517d4375cb72 d | |
580 --- a/d Thu Jan 01 00:00:00 1970 +0000 | |
581 +++ b/d Thu Jan 01 00:00:00 1970 +0000 | |
582 @@ -1,1 +1,5 @@ | |
583 +<<<<<<< local: 517d4375cb72 - test: added d | |
584 foobar | |
585 +======= | |
586 +bar | 592 +bar |
587 +>>>>>>> other: e315463d94bd - test: added d | |
588 | 593 |
589 $ hg evolve --stop | 594 $ hg evolve --stop |
590 stopped the interrupted evolve | 595 stopped the interrupted evolve |
591 working directory is now at 2d664a4ab749 | 596 working directory is now at c7586e2a9264 |
592 | 597 |
593 XXX: we should have preserved the wdir to be at rev 8 | 598 XXX: we should have preserved the wdir to be at rev 10 |
594 $ hg glog | 599 $ hg glog |
595 @ 8:2d664a4ab749 added d | 600 * 10:0892835a581f added d |
601 | () draft | |
602 o 8:33c16a2e0eb8 added c | |
596 | () draft | 603 | () draft |
597 | * 7:517d4375cb72 added d | 604 | * 7:517d4375cb72 added d |
598 | | () draft | 605 | | () draft |
599 o | 3:ca1b80f7960a added c | |
600 | | () draft | |
601 o | 2:b1661037fa25 added b | 606 o | 2:b1661037fa25 added b |
602 |/ () draft | 607 |/ () draft |
603 o 1:c7586e2a9264 added a | 608 @ 1:c7586e2a9264 added a |
604 | () draft | 609 | () draft |
605 o 0:8fa14d15e168 added hgignore | 610 o 0:8fa14d15e168 added hgignore |
606 () draft | 611 () draft |
607 $ cd .. | 612 $ cd .. |