comparison tests/test-evolve-content-divergence.t @ 3810:04fe01b0c0d0

tests: add more test of resolution of content-divergent changesets This patch adds test of resolution of content-divergent changesets when relocation is required and it leads to conflicts. The test shows that we are not doing the right thing. This will be fixed in upcoming patches.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 07 Jun 2018 22:45:54 +0530
parents f06ff8fee2f6
children 3273b178c202
comparison
equal deleted inserted replaced
3809:f06ff8fee2f6 3810:04fe01b0c0d0
591 diff -r be41fdcd0ee1 -r 6d515d1ffc69 y 591 diff -r be41fdcd0ee1 -r 6d515d1ffc69 y
592 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 592 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
593 +++ b/y Thu Jan 01 00:00:00 1970 +0000 593 +++ b/y Thu Jan 01 00:00:00 1970 +0000
594 @@ -0,0 +1,1 @@ 594 @@ -0,0 +1,1 @@
595 +bar 595 +bar
596
597 Testing when the relocation will result in conflicts and merging wont
598 ----------------------------------------------------------------------
599
600 $ hg glog
601 @ 20:bbaca013758a added y
602 | () [bar] draft
603 o 14:be41fdcd0ee1 added foo to x
604 | () [bar] draft
605 o 9:b6b20b8eefdc added d
606 | () [default] draft
607 o 8:7c46f743e62f added c
608 | () [default] draft
609 o 5:7ed0642d644b added b
610 | () [default] draft
611 o 1:c7586e2a9264 added a
612 | () [default] draft
613 o 0:8fa14d15e168 added hgignore
614 () [default] draft
615
616 $ hg up .^^^^
617 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
618
619 $ echo z > z
620 $ hg ci -Aqm "added z"
621 $ hg glog -r .
622 @ 21:884c9d1a1a84 added z
623 | () [default] draft
624 ~
625
626 $ echo foo > y
627 $ hg add y
628 $ hg amend
629
630 $ hg up 884c9d1a1a84 --hidden
631 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
632 updated to hidden changeset 884c9d1a1a84
633 (hidden revision '884c9d1a1a84' was rewritten as: 3e22a949fe7d)
634 working directory parent is obsolete! (884c9d1a1a84)
635 (use 'hg evolve' to update to its successor: 3e22a949fe7d)
636 $ hg rebase -r . -d bbaca013758a --config experimental.evolution.allowdivergence=True
637 rebasing 21:884c9d1a1a84 "added z"
638 2 new content-divergent changesets
639
640 $ hg glog
641 @ 23:478a0057fd1a added z
642 | () [bar] draft
643 | * 22:3e22a949fe7d added z
644 | | () [default] draft
645 o | 20:bbaca013758a added y
646 | | () [bar] draft
647 o | 14:be41fdcd0ee1 added foo to x
648 | | () [bar] draft
649 o | 9:b6b20b8eefdc added d
650 | | () [default] draft
651 o | 8:7c46f743e62f added c
652 |/ () [default] draft
653 o 5:7ed0642d644b added b
654 | () [default] draft
655 o 1:c7586e2a9264 added a
656 | () [default] draft
657 o 0:8fa14d15e168 added hgignore
658 () [default] draft
659
660 $ hg evolve --content-divergent
661 merge:[23] added z
662 with: [22] added z
663 base: [21] added z
664 rebasing "other" content-divergent changeset 3e22a949fe7d on bbaca013758a
665 merging y
666 warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
667 abort: unresolved merge conflicts (see hg help resolve)
668 [255]
669
670 $ hg diff
671 diff -r bbaca013758a y
672 --- a/y Thu Jan 01 00:00:00 1970 +0000
673 +++ b/y Thu Jan 01 00:00:00 1970 +0000
674 @@ -1,1 +1,5 @@
675 +<<<<<<< destination: bbaca013758a bar - test: added y
676 watbar
677 +=======
678 +foo
679 +>>>>>>> evolving: 3e22a949fe7d - test: added z
680 diff -r bbaca013758a z
681 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
682 +++ b/z Thu Jan 01 00:00:00 1970 +0000
683 @@ -0,0 +1,1 @@
684 +z
685
686 $ echo foo > y
687 $ hg resolve -m
688 (no more unresolved files)
689
690 XXX: wat?
691 $ hg evolve --continue
692 abort: no interrupted evolve to continue
693 [255]
694
695 $ hg glog
696 * 23:478a0057fd1a added z
697 | () [bar] draft
698 | * 22:3e22a949fe7d added z
699 | | () [default] draft
700 @ | 20:bbaca013758a added y
701 | | () [bar] draft
702 o | 14:be41fdcd0ee1 added foo to x
703 | | () [bar] draft
704 o | 9:b6b20b8eefdc added d
705 | | () [default] draft
706 o | 8:7c46f743e62f added c
707 |/ () [default] draft
708 o 5:7ed0642d644b added b
709 | () [default] draft
710 o 1:c7586e2a9264 added a
711 | () [default] draft
712 o 0:8fa14d15e168 added hgignore
713 () [default] draft