885 atop:[10] a1__ |
951 atop:[10] a1__ |
886 (leaving bookmark testbookmark) |
952 (leaving bookmark testbookmark) |
887 working directory is now at f37ed7a60f43 |
953 working directory is now at f37ed7a60f43 |
888 $ ls .hg/bookmarks* |
954 $ ls .hg/bookmarks* |
889 .hg/bookmarks |
955 .hg/bookmarks |
|
956 |
|
957 Possibility to select what trouble to solve first, asking for bumped before |
|
958 divergent |
|
959 $ hg up 10 |
|
960 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
961 $ hg revert -r 11 --all |
|
962 reverting a |
|
963 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' |
|
964 o 11 [mybranch] a2 |
|
965 | |
|
966 @ 10 [default] a1__ |
|
967 | |
|
968 | o 9 [mybranch] a3 |
|
969 | | |
|
970 | x 8 [mybranch] a2 |
|
971 | | |
|
972 | x 7 [default] a1_ |
|
973 |/ |
|
974 o 0 [default] a0 |
|
975 |
|
976 $ echo "hello world" > newfile |
|
977 $ hg add newfile |
|
978 $ hg commit -m "add new file bumped" -o 11 |
|
979 $ hg phase --public --hidden 11 |
|
980 1 new bumped changesets |
|
981 $ hg glog |
|
982 @ 12 : add new file bumped - test |
|
983 | |
|
984 | o 11 : a2 - test |
|
985 |/ |
|
986 o 10 testbookmark: a1__ - test |
|
987 | |
|
988 | o 9 : a3 - test |
|
989 | | |
|
990 | x 8 : a2 - test |
|
991 | | |
|
992 | x 7 : a1_ - test |
|
993 |/ |
|
994 o 0 : a0 - test |
|
995 |
|
996 |
|
997 Now we have a bumped and an unstable changeset, we solve the bumped first |
|
998 normally the unstable changeset would be solve first |
|
999 |
|
1000 $ hg glog |
|
1001 @ 12 : add new file bumped - test |
|
1002 | |
|
1003 | o 11 : a2 - test |
|
1004 |/ |
|
1005 o 10 testbookmark: a1__ - test |
|
1006 | |
|
1007 | o 9 : a3 - test |
|
1008 | | |
|
1009 | x 8 : a2 - test |
|
1010 | | |
|
1011 | x 7 : a1_ - test |
|
1012 |/ |
|
1013 o 0 : a0 - test |
|
1014 |
|
1015 $ hg evolve -r 12 --bumped |
|
1016 recreate:[12] add new file bumped |
|
1017 atop:[11] a2 |
|
1018 computing new diff |
|
1019 committed as d66b1e328488 |
|
1020 working directory is now at d66b1e328488 |
|
1021 $ hg evolve --any |
|
1022 move:[9] a3 |
|
1023 atop:[13] bumped update to f37ed7a60f43: |
|
1024 working directory is now at 7d2ce5f38f9b |
|
1025 Check that we can resolve troubles in a revset with more than one commit |
|
1026 $ hg up 14 -C |
|
1027 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1028 $ mkcommit gg |
|
1029 $ hg up 14 |
|
1030 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1031 $ mkcommit gh |
|
1032 created new head |
|
1033 $ hg up 14 |
|
1034 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1035 $ printf "newline\nnewline\n" >> a |
|
1036 $ hg glog |
|
1037 o 16 : add gh - test |
|
1038 | |
|
1039 | o 15 : add gg - test |
|
1040 |/ |
|
1041 @ 14 : a3 - test |
|
1042 | |
|
1043 o 13 : bumped update to f37ed7a60f43: - test |
|
1044 | |
|
1045 o 11 : a2 - test |
|
1046 | |
|
1047 o 10 testbookmark: a1__ - test |
|
1048 | |
|
1049 o 0 : a0 - test |
|
1050 |
|
1051 $ hg amend |
|
1052 2 new unstable changesets |
|
1053 $ hg glog |
|
1054 @ 18 : a3 - test |
|
1055 | |
|
1056 | o 16 : add gh - test |
|
1057 | | |
|
1058 | | o 15 : add gg - test |
|
1059 | |/ |
|
1060 | x 14 : a3 - test |
|
1061 |/ |
|
1062 o 13 : bumped update to f37ed7a60f43: - test |
|
1063 | |
|
1064 o 11 : a2 - test |
|
1065 | |
|
1066 o 10 testbookmark: a1__ - test |
|
1067 | |
|
1068 o 0 : a0 - test |
|
1069 |
|
1070 |
|
1071 Evolving an empty revset should do nothing |
|
1072 $ hg evolve --rev "16 and 15" |
|
1073 set of specified revisions is empty |
|
1074 [1] |
|
1075 |
|
1076 $ hg evolve --rev "14::" --bumped |
|
1077 no bumped changesets in specified revisions |
|
1078 (do you want to use --unstable) |
|
1079 [2] |
|
1080 $ hg evolve --rev "14::" --unstable |
|
1081 move:[15] add gg |
|
1082 atop:[18] a3 |
|
1083 move:[16] add gh |
|
1084 atop:[18] a3 |
|
1085 working directory is now at db3d894869b0 |
|
1086 $ hg glog |
|
1087 @ 20 : add gh - test |
|
1088 | |
|
1089 | o 19 : add gg - test |
|
1090 |/ |
|
1091 o 18 : a3 - test |
|
1092 | |
|
1093 o 13 : bumped update to f37ed7a60f43: - test |
|
1094 | |
|
1095 o 11 : a2 - test |
|
1096 | |
|
1097 o 10 testbookmark: a1__ - test |
|
1098 | |
|
1099 o 0 : a0 - test |
|
1100 |
|
1101 Enabling commands selectively, no command enabled, next and fold and unknown |
|
1102 $ cat >> $HGRCPATH <<EOF |
|
1103 > [experimental] |
|
1104 > evolution=createmarkers |
|
1105 > EOF |
|
1106 $ hg next |
|
1107 hg: unknown command 'next' |
|
1108 Mercurial Distributed SCM |
|
1109 |
|
1110 basic commands: |
|
1111 |
|
1112 add add the specified files on the next commit |
|
1113 annotate show changeset information by line for each file |
|
1114 clone make a copy of an existing repository |
|
1115 commit commit the specified files or all outstanding changes |
|
1116 diff diff repository (or selected files) |
|
1117 export dump the header and diffs for one or more changesets |
|
1118 forget forget the specified files on the next commit |
|
1119 init create a new repository in the given directory |
|
1120 log show revision history of entire repository or files |
|
1121 merge merge another revision into working directory |
|
1122 pull pull changes from the specified source |
|
1123 push push changes to the specified destination |
|
1124 remove remove the specified files on the next commit |
|
1125 serve start stand-alone webserver |
|
1126 status show changed files in the working directory |
|
1127 summary summarize working directory state |
|
1128 update update working directory (or switch revisions) |
|
1129 |
|
1130 (use "hg help" for the full list of commands or "hg -v" for details) |
|
1131 [255] |
|
1132 $ hg fold |
|
1133 hg: unknown command 'fold' |
|
1134 Mercurial Distributed SCM |
|
1135 |
|
1136 basic commands: |
|
1137 |
|
1138 add add the specified files on the next commit |
|
1139 annotate show changeset information by line for each file |
|
1140 clone make a copy of an existing repository |
|
1141 commit commit the specified files or all outstanding changes |
|
1142 diff diff repository (or selected files) |
|
1143 export dump the header and diffs for one or more changesets |
|
1144 forget forget the specified files on the next commit |
|
1145 init create a new repository in the given directory |
|
1146 log show revision history of entire repository or files |
|
1147 merge merge another revision into working directory |
|
1148 pull pull changes from the specified source |
|
1149 push push changes to the specified destination |
|
1150 remove remove the specified files on the next commit |
|
1151 serve start stand-alone webserver |
|
1152 status show changed files in the working directory |
|
1153 summary summarize working directory state |
|
1154 update update working directory (or switch revisions) |
|
1155 |
|
1156 (use "hg help" for the full list of commands or "hg -v" for details) |
|
1157 [255] |
|
1158 Enabling commands selectively, only fold enabled, next is still unknown |
|
1159 $ cat >> $HGRCPATH <<EOF |
|
1160 > [experimental] |
|
1161 > evolution=createmarkers |
|
1162 > evolutioncommands=fold |
|
1163 > EOF |
|
1164 $ hg fold |
|
1165 abort: no revisions specified |
|
1166 [255] |
|
1167 $ hg next |
|
1168 hg: unknown command 'next' |
|
1169 Mercurial Distributed SCM |
|
1170 |
|
1171 basic commands: |
|
1172 |
|
1173 add add the specified files on the next commit |
|
1174 annotate show changeset information by line for each file |
|
1175 clone make a copy of an existing repository |
|
1176 commit commit the specified files or all outstanding changes |
|
1177 diff diff repository (or selected files) |
|
1178 export dump the header and diffs for one or more changesets |
|
1179 fold fold multiple revisions into a single one |
|
1180 forget forget the specified files on the next commit |
|
1181 init create a new repository in the given directory |
|
1182 log show revision history of entire repository or files |
|
1183 merge merge another revision into working directory |
|
1184 pull pull changes from the specified source |
|
1185 push push changes to the specified destination |
|
1186 remove remove the specified files on the next commit |
|
1187 serve start stand-alone webserver |
|
1188 status show changed files in the working directory |
|
1189 summary summarize working directory state |
|
1190 update update working directory (or switch revisions) |
|
1191 |
|
1192 (use "hg help" for the full list of commands or "hg -v" for details) |
|
1193 [255] |
|
1194 |
|
1195 Restore all of the evolution features |
|
1196 |
|
1197 $ cat >> $HGRCPATH <<EOF |
|
1198 > [experimental] |
|
1199 > evolution=all |
|
1200 > EOF |
|
1201 |
|
1202 Check hg evolve --rev on singled out commit |
|
1203 $ hg up 19 -C |
|
1204 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1205 $ mkcommit j1 |
|
1206 $ mkcommit j2 |
|
1207 $ mkcommit j3 |
|
1208 $ hg up .^^ |
|
1209 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1210 $ echo "hello" > j4 |
|
1211 $ hg add j4 |
|
1212 $ hg amend |
|
1213 2 new unstable changesets |
|
1214 $ glog -r "18::" |
|
1215 @ 25:4c0bc042ef3b@default(draft) add j1 |
|
1216 | |
|
1217 | o 23:c70048fd3350@default(draft) add j3 |
|
1218 | | |
|
1219 | o 22:714e60ca57b7@default(draft) add j2 |
|
1220 | | |
|
1221 | x 21:b430835af718@default(draft) add j1 |
|
1222 |/ |
|
1223 | o 20:db3d894869b0@default(draft) add gh |
|
1224 | | |
|
1225 o | 19:10ffdd7e3cc9@default(draft) add gg |
|
1226 |/ |
|
1227 o 18:0bb66d4c1968@default(draft) a3 |
|
1228 | |
|
1229 |
|
1230 $ hg evolve --rev 23 --any |
|
1231 abort: cannot specify both "--rev" and "--any" |
|
1232 [255] |
|
1233 $ hg evolve --rev 23 |
|
1234 cannot solve instability of c70048fd3350, skipping |
|
1235 |
|
1236 Check that uncommit respects the allowunstable option |
|
1237 With only createmarkers we can only uncommit on a head |
|
1238 $ cat >> $HGRCPATH <<EOF |
|
1239 > [experimental] |
|
1240 > evolution=createmarkers, allnewcommands |
|
1241 > EOF |
|
1242 $ hg up 4c0bc042ef3b^ |
|
1243 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1244 $ hg uncommit --all |
|
1245 abort: cannot uncommit in the middle of a stack |
|
1246 [255] |
|
1247 $ hg up 4c0bc042ef3b |
|
1248 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1249 $ hg uncommit --all |
|
1250 new changeset is empty |
|
1251 (use "hg prune ." to remove it) |
|
1252 $ glog -r "18::" |
|
1253 @ 26:04b32348803e@default(draft) add j1 |
|
1254 | |
|
1255 | o 23:c70048fd3350@default(draft) add j3 |
|
1256 | | |
|
1257 | o 22:714e60ca57b7@default(draft) add j2 |
|
1258 | | |
|
1259 | x 21:b430835af718@default(draft) add j1 |
|
1260 |/ |
|
1261 | o 20:db3d894869b0@default(draft) add gh |
|
1262 | | |
|
1263 o | 19:10ffdd7e3cc9@default(draft) add gg |
|
1264 |/ |
|
1265 o 18:0bb66d4c1968@default(draft) a3 |
|
1266 | |
|
1267 |
|
1268 Check that prune respects the allowunstable option |
|
1269 $ hg up -C . |
|
1270 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1271 $ hg up 20 |
|
1272 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1273 $ hg evolve --all |
|
1274 nothing to evolve on current working copy parent |
|
1275 (2 other unstable in the repository, do you want --any or --rev) |
|
1276 [2] |
|
1277 $ hg evolve --all --any |
|
1278 move:[22] add j2 |
|
1279 atop:[26] add j1 |
|
1280 move:[23] add j3 |
|
1281 atop:[27] add j2 |
|
1282 working directory is now at 920a35e8dbd0 |
|
1283 $ glog -r "18::" |
|
1284 @ 28:920a35e8dbd0@default(draft) add j3 |
|
1285 | |
|
1286 o 27:31e050d895dd@default(draft) add j2 |
|
1287 | |
|
1288 o 26:04b32348803e@default(draft) add j1 |
|
1289 | |
|
1290 | o 20:db3d894869b0@default(draft) add gh |
|
1291 | | |
|
1292 o | 19:10ffdd7e3cc9@default(draft) add gg |
|
1293 |/ |
|
1294 o 18:0bb66d4c1968@default(draft) a3 |
|
1295 | |
|
1296 $ hg up 19 |
|
1297 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1298 $ mkcommit c5_ |
|
1299 created new head |
|
1300 $ hg prune '26 + 27' |
|
1301 abort: cannot prune in the middle of a stack |
|
1302 [255] |
|
1303 $ hg prune '19::28' |
|
1304 abort: cannot prune in the middle of a stack |
|
1305 [255] |
|
1306 $ hg prune '26::' |
|
1307 3 changesets pruned |
|
1308 $ glog -r "18::" |
|
1309 @ 29:5a6c53544778@default(draft) add c5_ |
|
1310 | |
|
1311 | o 20:db3d894869b0@default(draft) add gh |
|
1312 | | |
|
1313 o | 19:10ffdd7e3cc9@default(draft) add gg |
|
1314 |/ |
|
1315 o 18:0bb66d4c1968@default(draft) a3 |
|
1316 | |
|
1317 |
|
1318 Check that fold respects the allowunstable option |
|
1319 $ hg up 0bb66d4c1968 |
|
1320 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1321 $ mkcommit unstableifparentisfolded |
|
1322 created new head |
|
1323 $ glog -r "18::" |
|
1324 @ 30:30ecefd67c0a@default(draft) add unstableifparentisfolded |
|
1325 | |
|
1326 | o 29:5a6c53544778@default(draft) add c5_ |
|
1327 | | |
|
1328 +---o 20:db3d894869b0@default(draft) add gh |
|
1329 | | |
|
1330 | o 19:10ffdd7e3cc9@default(draft) add gg |
|
1331 |/ |
|
1332 o 18:0bb66d4c1968@default(draft) a3 |
|
1333 | |
|
1334 |
|
1335 $ hg fold --exact "19 + 18" |
|
1336 abort: cannot fold chain not ending with a head or with branching |
|
1337 [255] |
|
1338 $ hg fold --exact "18::29" |
|
1339 abort: cannot fold chain not ending with a head or with branching |
|
1340 [255] |
|
1341 $ hg fold --exact "19::" |
|
1342 2 changesets folded |
|
1343 |
|
1344 Check that evolve shows error while handling split commits |
|
1345 -------------------------------------- |
|
1346 |
|
1347 $ cat >> $HGRCPATH <<EOF |
|
1348 > [experimental] |
|
1349 > evolution=all |
|
1350 > EOF |
|
1351 |
|
1352 $ glog -r "18::" |
|
1353 o 31:5cc6eda0f00d@default(draft) add gg |
|
1354 | |
|
1355 | @ 30:30ecefd67c0a@default(draft) add unstableifparentisfolded |
|
1356 |/ |
|
1357 | o 20:db3d894869b0@default(draft) add gh |
|
1358 |/ |
|
1359 o 18:0bb66d4c1968@default(draft) a3 |
|
1360 | |
|
1361 |
|
1362 Create a split commit |
|
1363 $ printf "oo" > oo; |
|
1364 $ printf "pp" > pp; |
|
1365 $ hg add oo pp |
|
1366 $ hg commit -m "oo+pp" |
|
1367 $ mkcommit uu |
|
1368 $ hg up 30 |
|
1369 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1370 $ printf "oo" > oo; |
|
1371 $ hg add oo |
|
1372 $ hg commit -m "_oo" |
|
1373 created new head |
|
1374 $ printf "pp" > pp; |
|
1375 $ hg add pp |
|
1376 $ hg commit -m "_pp" |
|
1377 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" |
|
1378 1 changesets pruned |
|
1379 1 new unstable changesets |
|
1380 $ glog -r "18::" |
|
1381 @ 35:072908d77206@default(draft) _pp |
|
1382 | |
|
1383 o 34:68e429987343@default(draft) _oo |
|
1384 | |
|
1385 | o 33:030868870864@default(draft) add uu |
|
1386 | | |
|
1387 | x 32:7e9688cf0a1b@default(draft) oo+pp |
|
1388 |/ |
|
1389 | o 31:5cc6eda0f00d@default(draft) add gg |
|
1390 | | |
|
1391 o | 30:30ecefd67c0a@default(draft) add unstableifparentisfolded |
|
1392 |/ |
|
1393 | o 20:db3d894869b0@default(draft) add gh |
|
1394 |/ |
|
1395 o 18:0bb66d4c1968@default(draft) a3 |
|
1396 | |
|
1397 $ hg evolve --rev "18::" |
|
1398 does not handle split parents yet |
|
1399 |
|
1400 |