Mercurial > evolve
comparison tests/test-evolve-content-divergence.t @ 3849:a17d4934c5ce
tests: fix a test case to not create conflicts
This is the test case where we are testing about divergence resolution of stack
of patches. If the stack is as follows:
C1 C2
| |
B1 B2
| |
A1 A2
\/
base
And A1-A2, B1-B2 and C1-C2 are content-divergent, and merging A1-A2 results in
conflicts.
Now if you resolve conflicts and continue resoling B1-B2, the conflicts of A1-A2
will still be there. We need somehow to understand the work we has done and not
create conflicts again.
To test the evolution functionality for now, we make sure conflicts does not
occur.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 14 Jun 2018 01:39:11 +0530 |
parents | f9dad99a90d5 |
children | 340cf6fbe9e9 |
comparison
equal
deleted
inserted
replaced
3848:90f1a64875ad | 3849:a17d4934c5ce |
---|---|
786 $ hg up c7586e2a9264 | 786 $ hg up c7586e2a9264 |
787 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 787 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
788 $ echo bar > a | 788 $ echo bar > a |
789 $ hg amend -m "watbar to a" | 789 $ hg amend -m "watbar to a" |
790 3 new orphan changesets | 790 3 new orphan changesets |
791 $ echo wat > a | |
792 $ hg amend -m "watbar to a" | |
791 $ hg evolve --all | 793 $ hg evolve --all |
792 move:[2] added b | 794 move:[2] added b |
793 atop:[5] watbar to a | 795 atop:[6] watbar to a |
794 move:[3] added c | 796 move:[3] added c |
795 atop:[6] added b | 797 atop:[7] added b |
796 move:[4] added d | 798 move:[4] added d |
797 atop:[7] added c | 799 atop:[8] added c |
798 working directory is now at 513e3267034e | 800 working directory is now at 15c781f93cac |
799 $ hg glog | 801 $ hg glog |
800 @ 8:513e3267034e added d | 802 @ 9:15c781f93cac added d |
801 | () [default] draft | 803 | () [default] draft |
802 o 7:accb7a2b6ae9 added c | 804 o 8:9e5fb1d5b955 added c |
803 | () [default] draft | 805 | () [default] draft |
804 o 6:60280764eb0e added b | 806 o 7:88516dccf68a added b |
805 | () [default] draft | 807 | () [default] draft |
806 o 5:2587cb3ef1fe watbar to a | 808 o 6:82b74d5dc678 watbar to a |
807 | () [default] draft | 809 | () [default] draft |
808 o 0:8fa14d15e168 added hgignore | 810 o 0:8fa14d15e168 added hgignore |
809 () [default] draft | 811 () [default] draft |
810 | 812 |
811 $ cd ../stacktest | 813 $ cd ../stacktest |
838 pulling from ../stack2 | 840 pulling from ../stack2 |
839 searching for changes | 841 searching for changes |
840 adding changesets | 842 adding changesets |
841 adding manifests | 843 adding manifests |
842 adding file changes | 844 adding file changes |
843 added 4 changesets with 1 changes to 4 files (+1 heads) | 845 added 4 changesets with 0 changes to 4 files (+1 heads) |
844 4 new obsolescence markers | 846 5 new obsolescence markers |
845 8 new content-divergent changesets | 847 8 new content-divergent changesets |
846 new changesets 2587cb3ef1fe:513e3267034e | 848 new changesets 82b74d5dc678:15c781f93cac |
847 (run 'hg heads' to see heads, 'hg merge' to merge) | 849 (run 'hg heads' to see heads, 'hg merge' to merge) |
848 | 850 |
849 $ hg glog | 851 $ hg glog |
850 * 12:513e3267034e added d | 852 * 12:15c781f93cac added d |
851 | () [default] draft | 853 | () [default] draft |
852 * 11:accb7a2b6ae9 added c | 854 * 11:9e5fb1d5b955 added c |
853 | () [default] draft | 855 | () [default] draft |
854 * 10:60280764eb0e added b | 856 * 10:88516dccf68a added b |
855 | () [default] draft | 857 | () [default] draft |
856 * 9:2587cb3ef1fe watbar to a | 858 * 9:82b74d5dc678 watbar to a |
857 | () [default] draft | 859 | () [default] draft |
858 | @ 8:c72d2885eb51 added d | 860 | @ 8:c72d2885eb51 added d |
859 | | () [default] draft | 861 | | () [default] draft |
860 | * 7:3ce4be6d8e5e added c | 862 | * 7:3ce4be6d8e5e added c |
861 | | () [default] draft | 863 | | () [default] draft |
864 | * 5:8e222f257bbf watbar to a | 866 | * 5:8e222f257bbf watbar to a |
865 |/ () [default] draft | 867 |/ () [default] draft |
866 o 0:8fa14d15e168 added hgignore | 868 o 0:8fa14d15e168 added hgignore |
867 () [default] draft | 869 () [default] draft |
868 | 870 |
869 XXX: we are not resolving divergence in the correct order here | |
870 $ hg evolve --all --content-divergent | 871 $ hg evolve --all --content-divergent |
871 merge:[5] watbar to a | 872 merge:[5] watbar to a |
872 with: [9] watbar to a | 873 with: [9] watbar to a |
873 base: [1] added a | 874 base: [1] added a |
874 updating to "local" side of the conflict: 8e222f257bbf | 875 updating to "local" side of the conflict: 8e222f257bbf |
875 merging "other" content-divergent changeset '2587cb3ef1fe' | 876 merging "other" content-divergent changeset '82b74d5dc678' |
876 merging a | 877 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
877 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
878 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
879 abort: fix conflicts and see `hg help evolve.interrupted` | |
880 [255] | |
881 | |
882 $ echo watbar > a | |
883 $ hg resolve -m | |
884 (no more unresolved files) | |
885 continue: hg evolve --continue | |
886 | |
887 $ hg evolve --continue | |
888 6 new orphan changesets | 878 6 new orphan changesets |
889 skipping d5f148423c16: have a different parent than 60280764eb0e (not handled yet) | 879 skipping d5f148423c16: have a different parent than 88516dccf68a (not handled yet) |
890 | d5f148423c16, 60280764eb0e are not based on the same changeset. | 880 | d5f148423c16, 88516dccf68a are not based on the same changeset. |
891 | With the current state of its implementation, | 881 | With the current state of its implementation, |
892 | evolve does not work in that case. | 882 | evolve does not work in that case. |
893 | rebase one of them next to the other and run | 883 | rebase one of them next to the other and run |
894 | this command again. | 884 | this command again. |
895 | - either: hg rebase --dest 'p1(d5f148423c16)' -r 60280764eb0e | 885 | - either: hg rebase --dest 'p1(d5f148423c16)' -r 88516dccf68a |
896 | - or: hg rebase --dest 'p1(60280764eb0e)' -r d5f148423c16 | 886 | - or: hg rebase --dest 'p1(88516dccf68a)' -r d5f148423c16 |
897 skipping 3ce4be6d8e5e: have a different parent than accb7a2b6ae9 (not handled yet) | 887 skipping 3ce4be6d8e5e: have a different parent than 9e5fb1d5b955 (not handled yet) |
898 | 3ce4be6d8e5e, accb7a2b6ae9 are not based on the same changeset. | 888 | 3ce4be6d8e5e, 9e5fb1d5b955 are not based on the same changeset. |
899 | With the current state of its implementation, | 889 | With the current state of its implementation, |
900 | evolve does not work in that case. | 890 | evolve does not work in that case. |
901 | rebase one of them next to the other and run | 891 | rebase one of them next to the other and run |
902 | this command again. | 892 | this command again. |
903 | - either: hg rebase --dest 'p1(3ce4be6d8e5e)' -r accb7a2b6ae9 | 893 | - either: hg rebase --dest 'p1(3ce4be6d8e5e)' -r 9e5fb1d5b955 |
904 | - or: hg rebase --dest 'p1(accb7a2b6ae9)' -r 3ce4be6d8e5e | 894 | - or: hg rebase --dest 'p1(9e5fb1d5b955)' -r 3ce4be6d8e5e |
905 skipping c72d2885eb51: have a different parent than 513e3267034e (not handled yet) | 895 skipping c72d2885eb51: have a different parent than 15c781f93cac (not handled yet) |
906 | c72d2885eb51, 513e3267034e are not based on the same changeset. | 896 | c72d2885eb51, 15c781f93cac are not based on the same changeset. |
907 | With the current state of its implementation, | 897 | With the current state of its implementation, |
908 | evolve does not work in that case. | 898 | evolve does not work in that case. |
909 | rebase one of them next to the other and run | 899 | rebase one of them next to the other and run |
910 | this command again. | 900 | this command again. |
911 | - either: hg rebase --dest 'p1(c72d2885eb51)' -r 513e3267034e | 901 | - either: hg rebase --dest 'p1(c72d2885eb51)' -r 15c781f93cac |
912 | - or: hg rebase --dest 'p1(513e3267034e)' -r c72d2885eb51 | 902 | - or: hg rebase --dest 'p1(15c781f93cac)' -r c72d2885eb51 |
913 working directory is now at b9f381e183a3 | 903 working directory is now at f66f262fff6c |
914 | 904 |
915 $ hg glog | 905 $ hg glog |
916 @ 13:b9f381e183a3 watbar to a | 906 @ 13:f66f262fff6c watbar to a |
917 | () [default] draft | 907 | () [default] draft |
918 | * 12:513e3267034e added d | 908 | * 12:15c781f93cac added d |
919 | | () [default] draft | 909 | | () [default] draft |
920 | * 11:accb7a2b6ae9 added c | 910 | * 11:9e5fb1d5b955 added c |
921 | | () [default] draft | 911 | | () [default] draft |
922 | * 10:60280764eb0e added b | 912 | * 10:88516dccf68a added b |
923 | | () [default] draft | 913 | | () [default] draft |
924 | x 9:2587cb3ef1fe watbar to a | 914 | x 9:82b74d5dc678 watbar to a |
925 |/ () [default] draft | 915 |/ () [default] draft |
926 | * 8:c72d2885eb51 added d | 916 | * 8:c72d2885eb51 added d |
927 | | () [default] draft | 917 | | () [default] draft |
928 | * 7:3ce4be6d8e5e added c | 918 | * 7:3ce4be6d8e5e added c |
929 | | () [default] draft | 919 | | () [default] draft |