comparison tests/test-evolve.t @ 1325:1fe3da0b4601

evolve: add --rev option to the evolve command This patch is part of a series of patches to refactor the evolve method and make it more readable. We introduce a new --rev flag to specify a revset where to solve the troubles instead of looking from the parent changeset. All add a test checks that --rev works with several commits
author Laurent Charignon <lcharignon@fb.com>
date Tue, 05 May 2015 14:25:59 -0700
parents 35d8789ea7a8
children 5e82d78f5872
comparison
equal deleted inserted replaced
1324:739208d1ee62 1325:1fe3da0b4601
885 atop:[10] a1__ 885 atop:[10] a1__
886 (leaving bookmark testbookmark) 886 (leaving bookmark testbookmark)
887 working directory is now at f37ed7a60f43 887 working directory is now at f37ed7a60f43
888 $ ls .hg/bookmarks* 888 $ ls .hg/bookmarks*
889 .hg/bookmarks 889 .hg/bookmarks
890
891 Possibility to select what trouble to solve first, asking for bumped before
892 divergent
893 $ hg up 10
894 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
895 $ hg revert -r 11 --all
896 reverting a
897 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
898 o 11 [mybranch] a2
899 |
900 @ 10 [default] a1__
901 |
902 | o 9 [mybranch] a3
903 | |
904 | x 8 [mybranch] a2
905 | |
906 | x 7 [default] a1_
907 |/
908 o 0 [default] a0
909
910 $ echo "hello world" > newfile
911 $ hg add newfile
912 $ hg commit -m "add new file bumped" -o 11
913 $ hg phase --public --hidden 11
914 1 new bumped changesets
915 $ hg glog
916 @ 12 : add new file bumped - test
917 |
918 | o 11 : a2 - test
919 |/
920 o 10 testbookmark: a1__ - test
921 |
922 | o 9 : a3 - test
923 | |
924 | x 8 : a2 - test
925 | |
926 | x 7 : a1_ - test
927 |/
928 o 0 : a0 - test
929
930
931 Now we have a bumped and an unstable changeset, we solve the bumped first
932 normally the unstable changeset would be solve first
933
934 $ hg glog
935 @ 12 : add new file bumped - test
936 |
937 | o 11 : a2 - test
938 |/
939 o 10 testbookmark: a1__ - test
940 |
941 | o 9 : a3 - test
942 | |
943 | x 8 : a2 - test
944 | |
945 | x 7 : a1_ - test
946 |/
947 o 0 : a0 - test
948
949 $ hg evolve -r 12
950 recreate:[12] add new file bumped
951 atop:[11] a2
952 computing new diff
953 committed as d66b1e328488
954 working directory is now at d66b1e328488
955 $ hg evolve --any
956 move:[9] a3
957 atop:[13] bumped update to f37ed7a60f43:
958 working directory is now at 7d2ce5f38f9b
959 Check that we can resolve troubles in a revset with more than one commit
960 $ hg up 14 -C
961 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
962 $ mkcommit gg
963 $ hg up 14
964 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
965 $ mkcommit gh
966 created new head
967 $ hg up 14
968 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
969 $ echo "newline\nnewline" >> a
970 $ hg glog
971 o 16 : add gh - test
972 |
973 | o 15 : add gg - test
974 |/
975 @ 14 : a3 - test
976 |
977 o 13 : bumped update to f37ed7a60f43: - test
978 |
979 o 11 : a2 - test
980 |
981 o 10 testbookmark: a1__ - test
982 |
983 o 0 : a0 - test
984
985 $ hg amend
986 2 new unstable changesets
987 $ hg glog
988 @ 18 : a3 - test
989 |
990 | o 16 : add gh - test
991 | |
992 | | o 15 : add gg - test
993 | |/
994 | x 14 : a3 - test
995 |/
996 o 13 : bumped update to f37ed7a60f43: - test
997 |
998 o 11 : a2 - test
999 |
1000 o 10 testbookmark: a1__ - test
1001 |
1002 o 0 : a0 - test
1003
1004 $ hg evolve --rev "14::"
1005 move:[16] add gh
1006 atop:[18] a3
1007 move:[15] add gg
1008 atop:[18] a3
1009 working directory is now at 10ffdd7e3cc9
1010 $ hg glog
1011 @ 20 : add gg - test
1012 |
1013 | o 19 : add gh - test
1014 |/
1015 o 18 : a3 - test
1016 |
1017 o 13 : bumped update to f37ed7a60f43: - test
1018 |
1019 o 11 : a2 - test
1020 |
1021 o 10 testbookmark: a1__ - test
1022 |
1023 o 0 : a0 - test
1024
1025
1026