Mercurial > evolve
comparison tests/test-evolve.t @ 4577:bcd52ce0916d
evolve: don't update after instability resolution by default (BC)
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 24 Apr 2019 15:59:02 +0200 |
parents | 96ce1030d2fb |
children | e6d7d261ca4a |
comparison
equal
deleted
inserted
replaced
4576:96ce1030d2fb | 4577:bcd52ce0916d |
---|---|
366 568a468b60fc99a42d5d4ddbe181caff1eef308d ba0ec09b1babf3489b567853807f452edd46704f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | 366 568a468b60fc99a42d5d4ddbe181caff1eef308d ba0ec09b1babf3489b567853807f452edd46704f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} |
367 $ hg evolve | 367 $ hg evolve |
368 move:[3] another feature (child of 568a468b60fc) | 368 move:[3] another feature (child of 568a468b60fc) |
369 atop:[4] a nifty feature | 369 atop:[4] a nifty feature |
370 merging main-file-1 | 370 merging main-file-1 |
371 working directory is now at 99833d22b0c6 | |
372 $ hg log | 371 $ hg log |
373 5 feature-B: another feature (child of ba0ec09b1bab) - test | 372 5 feature-B: another feature (child of ba0ec09b1bab) - test |
374 4 feature-A: a nifty feature - test | 373 4 feature-A: a nifty feature - test |
375 0 : base - test | 374 0 : base - test |
376 | 375 |
377 Test commit -o options | 376 Test commit -o options |
378 | 377 |
379 $ hg up -r "desc('a nifty feature')" | 378 $ hg up -r "desc('a nifty feature')" |
380 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 379 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
381 $ hg revert -r "desc('another feature')" --all | 380 $ hg revert -r "desc('another feature')" --all |
382 reverting main-file-1 | 381 reverting main-file-1 |
383 adding file-from-B | 382 adding file-from-B |
384 $ sed -i'' -e s/Zwei/deux/ main-file-1 | 383 $ sed -i'' -e s/Zwei/deux/ main-file-1 |
385 $ hg commit -m 'another feature that rox' -o 5 | 384 $ hg commit -m 'another feature that rox' -o 5 |
465 move:[8] dansk 2! | 464 move:[8] dansk 2! |
466 atop:[10] dansk! | 465 atop:[10] dansk! |
467 merging main-file-1 | 466 merging main-file-1 |
468 move:[9] dansk 3! | 467 move:[9] dansk 3! |
469 merging main-file-1 | 468 merging main-file-1 |
470 working directory is now at 96abb1319a47 | |
471 $ hg log -G | 469 $ hg log -G |
472 @ 12 : dansk 3! - test | 470 o 12 : dansk 3! - test |
473 | | 471 | |
474 o 11 : dansk 2! - test | 472 o 11 : dansk 2! - test |
475 | | 473 | |
476 o 10 feature-B: dansk! - test | 474 @ 10 feature-B: dansk! - test |
477 | | 475 | |
478 o 5 : another feature (child of ba0ec09b1bab) - test | 476 o 5 : another feature (child of ba0ec09b1bab) - test |
479 | | 477 | |
480 o 4 feature-A: a nifty feature - test | 478 o 4 feature-A: a nifty feature - test |
481 | | 479 | |
836 R a | 834 R a |
837 | 835 |
838 Test fold with commit messages | 836 Test fold with commit messages |
839 | 837 |
840 $ cd ../work | 838 $ cd ../work |
839 $ hg up | |
840 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
841 $ hg fold --from .^ --message "Folding with custom commit message" | 841 $ hg fold --from .^ --message "Folding with custom commit message" |
842 2 changesets folded | 842 2 changesets folded |
843 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 843 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
844 $ glog | 844 $ glog |
845 @ 13:284c0d45770d@default(draft) Folding with custom commit message | 845 @ 13:284c0d45770d@default(draft) Folding with custom commit message |
905 1 new orphan changesets | 905 1 new orphan changesets |
906 | 906 |
907 $ hg evolve | 907 $ hg evolve |
908 move:[3] a3 | 908 move:[3] a3 |
909 atop:[4] a2 | 909 atop:[4] a2 |
910 working directory is now at 7c5649f73d11 | |
911 | 910 |
912 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | 911 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' |
913 @ 5 [mybranch] a3 | 912 o 5 [mybranch] a3 |
914 | | 913 | |
915 o 4 [mybranch] a2 | 914 @ 4 [mybranch] a2 |
916 | | 915 | |
917 o 1 [default] a1 | 916 o 1 [default] a1 |
918 | | 917 | |
919 o 0 [default] a0 | 918 o 0 [default] a0 |
920 | 919 |
926 $ hg amend -m 'a1_' | 925 $ hg amend -m 'a1_' |
927 2 new orphan changesets | 926 2 new orphan changesets |
928 $ hg evolve | 927 $ hg evolve |
929 move:[4] a2 | 928 move:[4] a2 |
930 atop:[6] a1_ | 929 atop:[6] a1_ |
931 working directory is now at eb07e22a0e63 | |
932 $ hg evolve | 930 $ hg evolve |
933 move:[5] a3 | 931 move:[5] a3 |
934 atop:[7] a2 | 932 atop:[7] a2 |
935 working directory is now at 777c26ca5e78 | |
936 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | 933 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' |
937 @ 8 [mybranch] a3 | 934 o 8 [mybranch] a3 |
938 | | 935 | |
939 o 7 [mybranch] a2 | 936 o 7 [mybranch] a2 |
940 | | 937 | |
941 o 6 [default] a1_ | 938 @ 6 [default] a1_ |
942 | | 939 | |
943 o 0 [default] a0 | 940 o 0 [default] a0 |
944 | 941 |
945 | 942 |
946 Evolve from the middle of a stack pick the right changesets. | 943 Evolve from the middle of a stack pick the right changesets. |
947 | 944 |
948 $ hg up -r "desc('a1_')" | |
949 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
950 $ hg ci --amend -m 'a1__' | 945 $ hg ci --amend -m 'a1__' |
951 2 new orphan changesets | 946 2 new orphan changesets |
952 | 947 |
953 $ hg up -r "desc('a2')" | 948 $ hg up -r "desc('a2')" |
954 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 949 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
979 .hg/bookmarks.* (glob) | 974 .hg/bookmarks.* (glob) |
980 $ hg evolve | 975 $ hg evolve |
981 move:[7] a2 | 976 move:[7] a2 |
982 atop:[9] a1__ | 977 atop:[9] a1__ |
983 (leaving bookmark testbookmark) | 978 (leaving bookmark testbookmark) |
984 working directory is now at d952e93add6f | |
985 $ ls .hg/bookmarks* | 979 $ ls .hg/bookmarks* |
986 .hg/bookmarks | 980 .hg/bookmarks |
987 $ glog | 981 $ glog |
988 @ 10:d952e93add6f@mybranch(draft) a2 | 982 o 10:d952e93add6f@mybranch(draft) a2 |
989 | | 983 | |
990 o 9:9f8b83c2e7f3@default(draft) a1__ | 984 @ 9:9f8b83c2e7f3@default(draft) a1__ |
991 | | 985 | |
992 | * 8:777c26ca5e78@mybranch(draft) a3 | 986 | * 8:777c26ca5e78@mybranch(draft) a3 |
993 | | | 987 | | |
994 | x 7:eb07e22a0e63@mybranch(draft) a2 | 988 | x 7:eb07e22a0e63@mybranch(draft) a2 |
995 | | | 989 | | |
998 o 0:07c1c36d9ef0@default(draft) a0 | 992 o 0:07c1c36d9ef0@default(draft) a0 |
999 | 993 |
1000 | 994 |
1001 Possibility to select what instability to solve first, asking for | 995 Possibility to select what instability to solve first, asking for |
1002 phase-divergent before content-divergent | 996 phase-divergent before content-divergent |
1003 $ hg up -r "desc('a1__')" | |
1004 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1005 $ hg revert -r d952e93add6f --all | 997 $ hg revert -r d952e93add6f --all |
1006 reverting a | 998 reverting a |
1007 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | 999 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' |
1008 o 10 [mybranch] a2 | 1000 o 10 [mybranch] a2 |
1009 | | 1001 | |
1062 committed as a8bb31d4b7f2 | 1054 committed as a8bb31d4b7f2 |
1063 working directory is now at a8bb31d4b7f2 | 1055 working directory is now at a8bb31d4b7f2 |
1064 $ hg evolve --any | 1056 $ hg evolve --any |
1065 move:[8] a3 | 1057 move:[8] a3 |
1066 atop:[12] phase-divergent update to d952e93add6f: | 1058 atop:[12] phase-divergent update to d952e93add6f: |
1067 working directory is now at b88539ad24d7 | |
1068 $ glog | 1059 $ glog |
1069 @ 13:b88539ad24d7@default(draft) a3 | 1060 o 13:b88539ad24d7@default(draft) a3 |
1070 | | 1061 | |
1071 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: | 1062 @ 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: |
1072 | | 1063 | |
1073 o 10:d952e93add6f@mybranch(public) a2 | 1064 o 10:d952e93add6f@mybranch(public) a2 |
1074 | | 1065 | |
1075 o 9:9f8b83c2e7f3@default(public) a1__ | 1066 o 9:9f8b83c2e7f3@default(public) a1__ |
1076 | | 1067 | |
1077 o 0:07c1c36d9ef0@default(public) a0 | 1068 o 0:07c1c36d9ef0@default(public) a0 |
1078 | 1069 |
1079 | 1070 |
1080 Check that we can resolve instabilities in a revset with more than one commit | 1071 Check that we can resolve instabilities in a revset with more than one commit |
1081 $ hg up b88539ad24d7 -C | 1072 $ hg up b88539ad24d7 -C |
1082 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1073 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1083 $ mkcommit gg | 1074 $ mkcommit gg |
1084 $ hg up b88539ad24d7 | 1075 $ hg up b88539ad24d7 |
1085 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1076 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1086 $ mkcommit gh | 1077 $ mkcommit gh |
1087 created new head | 1078 created new head |
1135 $ hg evolve --rev "b88539ad24d7::" --orphan | 1126 $ hg evolve --rev "b88539ad24d7::" --orphan |
1136 move:[14] add gg | 1127 move:[14] add gg |
1137 atop:[16] a3 | 1128 atop:[16] a3 |
1138 move:[15] add gh | 1129 move:[15] add gh |
1139 atop:[16] a3 | 1130 atop:[16] a3 |
1140 working directory is now at 0c049e4e5422 | |
1141 $ glog | 1131 $ glog |
1142 @ 18:0c049e4e5422@default(draft) add gh | 1132 o 18:0c049e4e5422@default(draft) add gh |
1143 | | 1133 | |
1144 | o 17:98e171e2f272@default(draft) add gg | 1134 | o 17:98e171e2f272@default(draft) add gg |
1145 |/ | 1135 |/ |
1146 o 16:0cf3707e8971@default(draft) a3 | 1136 @ 16:0cf3707e8971@default(draft) a3 |
1147 | | 1137 | |
1148 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: | 1138 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: |
1149 | | 1139 | |
1150 o 10:d952e93add6f@mybranch(public) a2 | 1140 o 10:d952e93add6f@mybranch(public) a2 |
1151 | | 1141 | |
1181 [255] | 1171 [255] |
1182 | 1172 |
1183 Shows "use 'hg evolve' to..." hints iff the evolve command is enabled | 1173 Shows "use 'hg evolve' to..." hints iff the evolve command is enabled |
1184 | 1174 |
1185 $ hg --hidden up 14 | 1175 $ hg --hidden up 14 |
1186 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1176 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1187 updated to hidden changeset 484fb3cfa7f2 | 1177 updated to hidden changeset 484fb3cfa7f2 |
1188 (hidden revision '484fb3cfa7f2' was rewritten as: 98e171e2f272) | 1178 (hidden revision '484fb3cfa7f2' was rewritten as: 98e171e2f272) |
1189 working directory parent is obsolete! (484fb3cfa7f2) | 1179 working directory parent is obsolete! (484fb3cfa7f2) |
1190 $ cat >> $HGRCPATH <<EOF | 1180 $ cat >> $HGRCPATH <<EOF |
1191 > [experimental] | 1181 > [experimental] |
1285 [2] | 1275 [2] |
1286 $ hg evolve --all --any | 1276 $ hg evolve --all --any |
1287 move:[20] add j2 | 1277 move:[20] add j2 |
1288 atop:[23] add j1 | 1278 atop:[23] add j1 |
1289 move:[21] add j3 | 1279 move:[21] add j3 |
1290 working directory is now at 0d9203b74542 | |
1291 $ glog -r "0cf3707e8971::" | 1280 $ glog -r "0cf3707e8971::" |
1292 @ 25:0d9203b74542@default(draft) add j3 | 1281 o 25:0d9203b74542@default(draft) add j3 |
1293 | | 1282 | |
1294 o 24:f1b85956c48c@default(draft) add j2 | 1283 o 24:f1b85956c48c@default(draft) add j2 |
1295 | | 1284 | |
1296 o 23:0ef9ff75f8e2@default(draft) add j1 | 1285 o 23:0ef9ff75f8e2@default(draft) add j1 |
1297 | | 1286 | |
1298 | o 18:0c049e4e5422@default(draft) add gh | 1287 | @ 18:0c049e4e5422@default(draft) add gh |
1299 | | | 1288 | | |
1300 o | 17:98e171e2f272@default(draft) add gg | 1289 o | 17:98e171e2f272@default(draft) add gg |
1301 |/ | 1290 |/ |
1302 o 16:0cf3707e8971@default(draft) a3 | 1291 o 16:0cf3707e8971@default(draft) a3 |
1303 | | 1292 | |
1304 ~ | 1293 ~ |
1305 $ hg up 98e171e2f272 | 1294 $ hg up 98e171e2f272 |
1306 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 1295 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
1307 $ mkcommit c5_ | 1296 $ mkcommit c5_ |
1308 created new head | 1297 created new head |
1309 $ hg prune '0ef9ff75f8e2 + f1b85956c48c' | 1298 $ hg prune '0ef9ff75f8e2 + f1b85956c48c' |
1310 abort: prune will orphan 1 descendants | 1299 abort: prune will orphan 1 descendants |
1311 (see 'hg help evolution.instability') | 1300 (see 'hg help evolution.instability') |
1624 atop:[5] updated c | 1613 atop:[5] updated c |
1625 move:[10] merge feature branch | 1614 move:[10] merge feature branch |
1626 atop:[6] updated f | 1615 atop:[6] updated f |
1627 move:[8] added e | 1616 move:[8] added e |
1628 atop:[9] updated d | 1617 atop:[9] updated d |
1629 working directory is now at 7c67cee06242 |