comparison tests/test-evolve.t @ 3374:612b3bd31499

evolve: use new trouble names in commit messages There is case when we add trouble to the commit message while using `hg evolve`. This match makes sure, we use the new trouble names. The hash changed because it depends on commit messages.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 05 Jan 2018 17:15:43 +0530
parents ae6fddf39933
children e1f3e43a50a4
comparison
equal deleted inserted replaced
3373:3ff0da45d4c7 3374:612b3bd31499
408 408
409 $ hg evolve --any --traceback --phase-divergent 409 $ hg evolve --any --traceback --phase-divergent
410 recreate:[6] another feature that rox 410 recreate:[6] another feature that rox
411 atop:[5] another feature (child of ba0ec09b1bab) 411 atop:[5] another feature (child of ba0ec09b1bab)
412 computing new diff 412 computing new diff
413 committed as 6707c5e1c49d 413 committed as aca219761afb
414 working directory is now at 6707c5e1c49d 414 working directory is now at aca219761afb
415 $ glog 415 $ glog
416 @ 7:6707c5e1c49d@default(draft) bumped update to 99833d22b0c6: 416 @ 7:aca219761afb@default(draft) phase-divergent update to 99833d22b0c6:
417 | 417 |
418 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 418 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
419 | 419 |
420 o 4:ba0ec09b1bab@default(public) a nifty feature 420 o 4:ba0ec09b1bab@default(public) a nifty feature
421 | 421 |
422 o 0:e55e0562ee93@default(public) base 422 o 0:e55e0562ee93@default(public) base
423 423
424 $ hg diff --hidden -r 6707c5e1c49d -r 47d52a103155 424 $ hg diff --hidden -r aca219761afb -r 47d52a103155
425 $ hg diff -r 6707c5e1c49d^ -r 6707c5e1c49d 425 $ hg diff -r aca219761afb^ -r aca219761afb
426 diff --git a/main-file-1 b/main-file-1 426 diff --git a/main-file-1 b/main-file-1
427 --- a/main-file-1 427 --- a/main-file-1
428 +++ b/main-file-1 428 +++ b/main-file-1
429 @@ -3,1 +3,1 @@ 429 @@ -3,1 +3,1 @@
430 -Zwei 430 -Zwei
434 test evolve --all 434 test evolve --all
435 $ sed -i'' -e s/deux/to/ main-file-1 435 $ sed -i'' -e s/deux/to/ main-file-1
436 $ hg commit -m 'dansk 2!' 436 $ hg commit -m 'dansk 2!'
437 $ sed -i'' -e s/Three/tre/ main-file-1 437 $ sed -i'' -e s/Three/tre/ main-file-1
438 $ hg commit -m 'dansk 3!' 438 $ hg commit -m 'dansk 3!'
439 $ hg update 6707c5e1c49d 439 $ hg update aca219761afb
440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 $ sed -i'' -e s/Un/Én/ main-file-1 441 $ sed -i'' -e s/Un/Én/ main-file-1
442 $ hg commit --amend -m 'dansk!' 442 $ hg commit --amend -m 'dansk!'
443 2 new orphan changesets 443 2 new orphan changesets
444 444
468 atop:[10] dansk! 468 atop:[10] dansk!
469 merging main-file-1 469 merging main-file-1
470 move:[9] dansk 3! 470 move:[9] dansk 3!
471 atop:[11] dansk 2! 471 atop:[11] dansk 2!
472 merging main-file-1 472 merging main-file-1
473 working directory is now at 68557e4f0048 473 working directory is now at 96abb1319a47
474 $ hg log -G 474 $ hg log -G
475 @ 12 : dansk 3! - test 475 @ 12 : dansk 3! - test
476 | 476 |
477 o 11 : dansk 2! - test 477 o 11 : dansk 2! - test
478 | 478 |
842 $ cd ../work 842 $ cd ../work
843 $ hg fold --from .^ --message "Folding with custom commit message" 843 $ hg fold --from .^ --message "Folding with custom commit message"
844 2 changesets folded 844 2 changesets folded
845 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 845 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
846 $ glog 846 $ glog
847 @ 13:98cb758db56d@default(draft) Folding with custom commit message 847 @ 13:284c0d45770d@default(draft) Folding with custom commit message
848 | 848 |
849 o 10:0a2f9b959bb4@default(draft) dansk! 849 o 10:9975c016fe7b@default(draft) dansk!
850 | 850 |
851 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 851 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
852 | 852 |
853 o 4:ba0ec09b1bab@default(public) a nifty feature 853 o 4:ba0ec09b1bab@default(public) a nifty feature
854 | 854 |
861 861
862 $ hg fold --from .^ --logfile commit-message 862 $ hg fold --from .^ --logfile commit-message
863 2 changesets folded 863 2 changesets folded
864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
865 $ hg qlog 865 $ hg qlog
866 14 - a00182c58888 A longer 866 14 - 8693d0f277b8 A longer
867 commit message (draft) 867 commit message (draft)
868 5 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public) 868 5 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public)
869 4 - ba0ec09b1bab a nifty feature (public) 869 4 - ba0ec09b1bab a nifty feature (public)
870 0 - e55e0562ee93 base (public) 870 0 - e55e0562ee93 base (public)
871 871
1060 1060
1061 $ hg evolve -r "desc('add new file bumped')" --phase-divergent 1061 $ hg evolve -r "desc('add new file bumped')" --phase-divergent
1062 recreate:[11] add new file bumped 1062 recreate:[11] add new file bumped
1063 atop:[10] a2 1063 atop:[10] a2
1064 computing new diff 1064 computing new diff
1065 committed as f15d32934071 1065 committed as a8bb31d4b7f2
1066 working directory is now at f15d32934071 1066 working directory is now at a8bb31d4b7f2
1067 $ hg evolve --any 1067 $ hg evolve --any
1068 move:[8] a3 1068 move:[8] a3
1069 atop:[12] bumped update to d952e93add6f: 1069 atop:[12] phase-divergent update to d952e93add6f:
1070 working directory is now at cce26b684bfe 1070 working directory is now at b88539ad24d7
1071 $ glog 1071 $ glog
1072 @ 13:cce26b684bfe@default(draft) a3 1072 @ 13:b88539ad24d7@default(draft) a3
1073 | 1073 |
1074 o 12:f15d32934071@default(draft) bumped update to d952e93add6f: 1074 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f:
1075 | 1075 |
1076 o 10:d952e93add6f@mybranch(public) a2 1076 o 10:d952e93add6f@mybranch(public) a2
1077 | 1077 |
1078 o 9:9f8b83c2e7f3@default(public) a1__ 1078 o 9:9f8b83c2e7f3@default(public) a1__
1079 | 1079 |
1080 o 0:07c1c36d9ef0@default(public) a0 1080 o 0:07c1c36d9ef0@default(public) a0
1081 1081
1082 1082
1083 Check that we can resolve troubles in a revset with more than one commit 1083 Check that we can resolve troubles in a revset with more than one commit
1084 $ hg up cce26b684bfe -C 1084 $ hg up b88539ad24d7 -C
1085 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1085 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1086 $ mkcommit gg 1086 $ mkcommit gg
1087 $ hg up cce26b684bfe 1087 $ hg up b88539ad24d7
1088 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 1088 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1089 $ mkcommit gh 1089 $ mkcommit gh
1090 created new head 1090 created new head
1091 $ hg up cce26b684bfe 1091 $ hg up b88539ad24d7
1092 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 1092 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1093 $ printf "newline\nnewline\n" >> a 1093 $ printf "newline\nnewline\n" >> a
1094 $ hg log -G 1094 $ hg log -G
1095 o 15 : add gh - test 1095 o 15 : add gh - test
1096 | 1096 |
1097 | o 14 : add gg - test 1097 | o 14 : add gg - test
1098 |/ 1098 |/
1099 @ 13 : a3 - test 1099 @ 13 : a3 - test
1100 | 1100 |
1101 o 12 : bumped update to d952e93add6f: - test 1101 o 12 : phase-divergent update to d952e93add6f: - test
1102 | 1102 |
1103 o 10 : a2 - test 1103 o 10 : a2 - test
1104 | 1104 |
1105 o 9 testbookmark: a1__ - test 1105 o 9 testbookmark: a1__ - test
1106 | 1106 |
1107 o 0 : a0 - test 1107 o 0 : a0 - test
1108 1108
1109 $ hg amend 1109 $ hg amend
1110 2 new orphan changesets 1110 2 new orphan changesets
1111 $ glog 1111 $ glog
1112 @ 16:edc3c9de504e@default(draft) a3 1112 @ 16:0cf3707e8971@default(draft) a3
1113 | 1113 |
1114 | * 15:beb41503aa3e@default(draft) add gh 1114 | * 15:daa1ff1c7fbd@default(draft) add gh
1115 | | 1115 | |
1116 | | * 14:27247fcb2df6@default(draft) add gg 1116 | | * 14:484fb3cfa7f2@default(draft) add gg
1117 | |/ 1117 | |/
1118 | x 13:cce26b684bfe@default(draft) a3 1118 | x 13:b88539ad24d7@default(draft) a3
1119 |/ 1119 |/
1120 o 12:f15d32934071@default(draft) bumped update to d952e93add6f: 1120 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f:
1121 | 1121 |
1122 o 10:d952e93add6f@mybranch(public) a2 1122 o 10:d952e93add6f@mybranch(public) a2
1123 | 1123 |
1124 o 9:9f8b83c2e7f3@default(public) a1__ 1124 o 9:9f8b83c2e7f3@default(public) a1__
1125 | 1125 |
1126 o 0:07c1c36d9ef0@default(public) a0 1126 o 0:07c1c36d9ef0@default(public) a0
1127 1127
1128 1128
1129 Evolving an empty revset should do nothing 1129 Evolving an empty revset should do nothing
1130 $ hg evolve --rev "beb41503aa3e and 27247fcb2df6" 1130 $ hg evolve --rev "daa1ff1c7fbd and 484fb3cfa7f2"
1131 set of specified revisions is empty 1131 set of specified revisions is empty
1132 [1] 1132 [1]
1133 1133
1134 $ hg evolve --rev "cce26b684bfe::" --phase-divergent 1134 $ hg evolve --rev "b88539ad24d7::" --phase-divergent
1135 no phasedivergent changesets in specified revisions 1135 no phasedivergent changesets in specified revisions
1136 (do you want to use --orphan) 1136 (do you want to use --orphan)
1137 [2] 1137 [2]
1138 $ hg evolve --rev "cce26b684bfe::" --orphan 1138 $ hg evolve --rev "b88539ad24d7::" --orphan
1139 move:[14] add gg 1139 move:[14] add gg
1140 atop:[16] a3 1140 atop:[16] a3
1141 move:[15] add gh 1141 move:[15] add gh
1142 atop:[16] a3 1142 atop:[16] a3
1143 working directory is now at e02107f98737 1143 working directory is now at 0c049e4e5422
1144 $ glog 1144 $ glog
1145 @ 18:e02107f98737@default(draft) add gh 1145 @ 18:0c049e4e5422@default(draft) add gh
1146 | 1146 |
1147 | o 17:24e63b319adf@default(draft) add gg 1147 | o 17:98e171e2f272@default(draft) add gg
1148 |/ 1148 |/
1149 o 16:edc3c9de504e@default(draft) a3 1149 o 16:0cf3707e8971@default(draft) a3
1150 | 1150 |
1151 o 12:f15d32934071@default(draft) bumped update to d952e93add6f: 1151 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f:
1152 | 1152 |
1153 o 10:d952e93add6f@mybranch(public) a2 1153 o 10:d952e93add6f@mybranch(public) a2
1154 | 1154 |
1155 o 9:9f8b83c2e7f3@default(public) a1__ 1155 o 9:9f8b83c2e7f3@default(public) a1__
1156 | 1156 |
1256 > [experimental] 1256 > [experimental]
1257 > evolution=all 1257 > evolution=all
1258 > EOF 1258 > EOF
1259 1259
1260 Check hg evolve --rev on singled out commit 1260 Check hg evolve --rev on singled out commit
1261 $ hg up 24e63b319adf -C 1261 $ hg up 98e171e2f272 -C
1262 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 1262 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1263 $ mkcommit j1 1263 $ mkcommit j1
1264 $ mkcommit j2 1264 $ mkcommit j2
1265 $ mkcommit j3 1265 $ mkcommit j3
1266 $ hg up .^^ 1266 $ hg up .^^
1267 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1267 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1268 $ echo "hello" > j4 1268 $ echo "hello" > j4
1269 $ hg add j4 1269 $ hg add j4
1270 $ hg amend 1270 $ hg amend
1271 2 new orphan changesets 1271 2 new orphan changesets
1272 $ glog -r "edc3c9de504e::" 1272 $ glog -r "0cf3707e8971::"
1273 @ 22:8dc373be86d9@default(draft) add j1 1273 @ 22:274b6cd0c101@default(draft) add j1
1274 | 1274 |
1275 | * 21:d7eadcf6eccd@default(draft) add j3 1275 | * 21:89e4f7e8feb5@default(draft) add j3
1276 | | 1276 | |
1277 | * 20:2223ea564144@default(draft) add j2 1277 | * 20:4cd61236beca@default(draft) add j2
1278 | | 1278 | |
1279 | x 19:48490698b269@default(draft) add j1 1279 | x 19:0fd8bfb02de4@default(draft) add j1
1280 |/ 1280 |/
1281 | o 18:e02107f98737@default(draft) add gh 1281 | o 18:0c049e4e5422@default(draft) add gh
1282 | | 1282 | |
1283 o | 17:24e63b319adf@default(draft) add gg 1283 o | 17:98e171e2f272@default(draft) add gg
1284 |/ 1284 |/
1285 o 16:edc3c9de504e@default(draft) a3 1285 o 16:0cf3707e8971@default(draft) a3
1286 | 1286 |
1287 ~ 1287 ~
1288 1288
1289 $ hg evolve --rev d7eadcf6eccd --any 1289 $ hg evolve --rev 89e4f7e8feb5 --any
1290 abort: cannot specify both "--rev" and "--any" 1290 abort: cannot specify both "--rev" and "--any"
1291 [255] 1291 [255]
1292 $ hg evolve --rev d7eadcf6eccd 1292 $ hg evolve --rev 89e4f7e8feb5
1293 cannot solve instability of d7eadcf6eccd, skipping 1293 cannot solve instability of 89e4f7e8feb5, skipping
1294 1294
1295 Check that uncommit respects the allowunstable option 1295 Check that uncommit respects the allowunstable option
1296 With only createmarkers we can only uncommit on a head 1296 With only createmarkers we can only uncommit on a head
1297 $ cat >> $HGRCPATH <<EOF 1297 $ cat >> $HGRCPATH <<EOF
1298 > [experimental] 1298 > [experimental]
1299 > evolution=createmarkers, allnewcommands 1299 > evolution=createmarkers, allnewcommands
1300 > EOF 1300 > EOF
1301 $ hg up 8dc373be86d9^ 1301 $ hg up 274b6cd0c101^
1302 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1302 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1303 $ hg uncommit --all 1303 $ hg uncommit --all
1304 abort: uncommit will orphan 4 descendants 1304 abort: uncommit will orphan 4 descendants
1305 (see 'hg help evolution.instability') 1305 (see 'hg help evolution.instability')
1306 [255] 1306 [255]
1307 $ hg up 8dc373be86d9 1307 $ hg up 274b6cd0c101
1308 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 1308 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1309 $ hg uncommit --all 1309 $ hg uncommit --all
1310 new changeset is empty 1310 new changeset is empty
1311 (use 'hg prune .' to remove it) 1311 (use 'hg prune .' to remove it)
1312 $ glog -r "edc3c9de504e::" 1312 $ glog -r "0cf3707e8971::"
1313 @ 23:044804d0c10d@default(draft) add j1 1313 @ 23:0ef9ff75f8e2@default(draft) add j1
1314 | 1314 |
1315 | * 21:d7eadcf6eccd@default(draft) add j3 1315 | * 21:89e4f7e8feb5@default(draft) add j3
1316 | | 1316 | |
1317 | * 20:2223ea564144@default(draft) add j2 1317 | * 20:4cd61236beca@default(draft) add j2
1318 | | 1318 | |
1319 | x 19:48490698b269@default(draft) add j1 1319 | x 19:0fd8bfb02de4@default(draft) add j1
1320 |/ 1320 |/
1321 | o 18:e02107f98737@default(draft) add gh 1321 | o 18:0c049e4e5422@default(draft) add gh
1322 | | 1322 | |
1323 o | 17:24e63b319adf@default(draft) add gg 1323 o | 17:98e171e2f272@default(draft) add gg
1324 |/ 1324 |/
1325 o 16:edc3c9de504e@default(draft) a3 1325 o 16:0cf3707e8971@default(draft) a3
1326 | 1326 |
1327 ~ 1327 ~
1328 1328
1329 Check that prune respects the allowunstable option 1329 Check that prune respects the allowunstable option
1330 $ hg up -C . 1330 $ hg up -C .
1331 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1331 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1332 $ hg up e02107f98737 1332 $ hg up 0c049e4e5422
1333 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 1333 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1334 $ hg evolve --all 1334 $ hg evolve --all
1335 nothing to evolve on current working copy parent 1335 nothing to evolve on current working copy parent
1336 (2 other orphan in the repository, do you want --any or --rev) 1336 (2 other orphan in the repository, do you want --any or --rev)
1337 [2] 1337 [2]
1338 $ hg evolve --all --any 1338 $ hg evolve --all --any
1339 move:[20] add j2 1339 move:[20] add j2
1340 atop:[23] add j1 1340 atop:[23] add j1
1341 move:[21] add j3 1341 move:[21] add j3
1342 atop:[24] add j2 1342 atop:[24] add j2
1343 working directory is now at c9a20e2d74aa 1343 working directory is now at 0d9203b74542
1344 $ glog -r "edc3c9de504e::" 1344 $ glog -r "0cf3707e8971::"
1345 @ 25:c9a20e2d74aa@default(draft) add j3 1345 @ 25:0d9203b74542@default(draft) add j3
1346 | 1346 |
1347 o 24:b0e3066231e2@default(draft) add j2 1347 o 24:f1b85956c48c@default(draft) add j2
1348 | 1348 |
1349 o 23:044804d0c10d@default(draft) add j1 1349 o 23:0ef9ff75f8e2@default(draft) add j1
1350 | 1350 |
1351 | o 18:e02107f98737@default(draft) add gh 1351 | o 18:0c049e4e5422@default(draft) add gh
1352 | | 1352 | |
1353 o | 17:24e63b319adf@default(draft) add gg 1353 o | 17:98e171e2f272@default(draft) add gg
1354 |/ 1354 |/
1355 o 16:edc3c9de504e@default(draft) a3 1355 o 16:0cf3707e8971@default(draft) a3
1356 | 1356 |
1357 ~ 1357 ~
1358 $ hg up 24e63b319adf 1358 $ hg up 98e171e2f272
1359 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1359 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1360 $ mkcommit c5_ 1360 $ mkcommit c5_
1361 created new head 1361 created new head
1362 $ hg prune '044804d0c10d + b0e3066231e2' 1362 $ hg prune '0ef9ff75f8e2 + f1b85956c48c'
1363 abort: touch will orphan 1 descendants 1363 abort: touch will orphan 1 descendants
1364 (see 'hg help evolution.instability') 1364 (see 'hg help evolution.instability')
1365 [255] 1365 [255]
1366 $ hg prune '24e63b319adf::c9a20e2d74aa' 1366 $ hg prune '98e171e2f272::0d9203b74542'
1367 abort: touch will orphan 1 descendants 1367 abort: touch will orphan 1 descendants
1368 (see 'hg help evolution.instability') 1368 (see 'hg help evolution.instability')
1369 [255] 1369 [255]
1370 $ hg prune '044804d0c10d::' 1370 $ hg prune '0ef9ff75f8e2::'
1371 3 changesets pruned 1371 3 changesets pruned
1372 $ glog -r "edc3c9de504e::" 1372 $ glog -r "0cf3707e8971::"
1373 @ 26:2251801b6c91@default(draft) add c5_ 1373 @ 26:4c6f6f6d1976@default(draft) add c5_
1374 | 1374 |
1375 | o 18:e02107f98737@default(draft) add gh 1375 | o 18:0c049e4e5422@default(draft) add gh
1376 | | 1376 | |
1377 o | 17:24e63b319adf@default(draft) add gg 1377 o | 17:98e171e2f272@default(draft) add gg
1378 |/ 1378 |/
1379 o 16:edc3c9de504e@default(draft) a3 1379 o 16:0cf3707e8971@default(draft) a3
1380 | 1380 |
1381 ~ 1381 ~
1382 1382
1383 Check that fold respects the allowunstable option 1383 Check that fold respects the allowunstable option
1384 1384
1385 (most of this has been moved to test-fold.t) 1385 (most of this has been moved to test-fold.t)
1386 1386
1387 $ hg up edc3c9de504e 1387 $ hg up 0cf3707e8971
1388 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1388 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1389 $ mkcommit unstableifparentisfolded 1389 $ mkcommit unstableifparentisfolded
1390 created new head 1390 created new head
1391 $ glog -r "edc3c9de504e::" 1391 $ glog -r "0cf3707e8971::"
1392 @ 27:68330ac625b8@default(draft) add unstableifparentisfolded 1392 @ 27:2d1b55e10be9@default(draft) add unstableifparentisfolded
1393 | 1393 |
1394 | o 26:2251801b6c91@default(draft) add c5_ 1394 | o 26:4c6f6f6d1976@default(draft) add c5_
1395 | | 1395 | |
1396 +---o 18:e02107f98737@default(draft) add gh 1396 +---o 18:0c049e4e5422@default(draft) add gh
1397 | | 1397 | |
1398 | o 17:24e63b319adf@default(draft) add gg 1398 | o 17:98e171e2f272@default(draft) add gg
1399 |/ 1399 |/
1400 o 16:edc3c9de504e@default(draft) a3 1400 o 16:0cf3707e8971@default(draft) a3
1401 | 1401 |
1402 ~ 1402 ~
1403 1403
1404 $ hg fold --exact "24e63b319adf::" 1404 $ hg fold --exact "98e171e2f272::"
1405 2 changesets folded 1405 2 changesets folded
1406 1406
1407 Check that evolve shows error while handling split commits 1407 Check that evolve shows error while handling split commits
1408 -------------------------------------- 1408 --------------------------------------
1409 1409
1410 $ cat >> $HGRCPATH <<EOF 1410 $ cat >> $HGRCPATH <<EOF
1411 > [experimental] 1411 > [experimental]
1412 > evolution=all 1412 > evolution=all
1413 > EOF 1413 > EOF
1414 1414
1415 $ glog -r "edc3c9de504e::" 1415 $ glog -r "0cf3707e8971::"
1416 o 28:580886d07058@default(draft) add gg 1416 o 28:92ca6f3984de@default(draft) add gg
1417 | 1417 |
1418 | @ 27:68330ac625b8@default(draft) add unstableifparentisfolded 1418 | @ 27:2d1b55e10be9@default(draft) add unstableifparentisfolded
1419 |/ 1419 |/
1420 | o 18:e02107f98737@default(draft) add gh 1420 | o 18:0c049e4e5422@default(draft) add gh
1421 |/ 1421 |/
1422 o 16:edc3c9de504e@default(draft) a3 1422 o 16:0cf3707e8971@default(draft) a3
1423 | 1423 |
1424 ~ 1424 ~
1425 1425
1426 Create a split commit 1426 Create a split commit
1427 $ printf "oo" > oo; 1427 $ printf "oo" > oo;
1428 $ printf "pp" > pp; 1428 $ printf "pp" > pp;
1429 $ hg add oo pp 1429 $ hg add oo pp
1430 $ hg commit -m "oo+pp" 1430 $ hg commit -m "oo+pp"
1431 $ mkcommit uu 1431 $ mkcommit uu
1432 $ hg up 68330ac625b8 1432 $ hg up 2d1b55e10be9
1433 0 files updated, 0 files merged, 3 files removed, 0 files unresolved 1433 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
1434 $ printf "oo" > oo; 1434 $ printf "oo" > oo;
1435 $ hg add oo 1435 $ hg add oo
1436 $ hg commit -m "_oo" 1436 $ hg commit -m "_oo"
1437 created new head 1437 created new head
1439 $ hg add pp 1439 $ hg add pp
1440 $ hg commit -m "_pp" 1440 $ hg commit -m "_pp"
1441 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split 1441 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
1442 1 changesets pruned 1442 1 changesets pruned
1443 1 new orphan changesets 1443 1 new orphan changesets
1444 $ glog -r "edc3c9de504e::" 1444 $ glog -r "0cf3707e8971::"
1445 @ 32:7a555adf2b4a@default(draft) _pp 1445 @ 32:c7dbf668e9d5@default(draft) _pp
1446 | 1446 |
1447 o 31:2be4d2d5bf34@default(draft) _oo 1447 o 31:2b5a32114b3d@default(draft) _oo
1448 | 1448 |
1449 | * 30:53f0c003e03e@default(draft) add uu 1449 | * 30:4d122571f3b6@default(draft) add uu
1450 | | 1450 | |
1451 | x 29:1bf2152f4f82@default(draft) oo+pp 1451 | x 29:7da3e73df8a5@default(draft) oo+pp
1452 |/ 1452 |/
1453 | o 28:580886d07058@default(draft) add gg 1453 | o 28:92ca6f3984de@default(draft) add gg
1454 | | 1454 | |
1455 o | 27:68330ac625b8@default(draft) add unstableifparentisfolded 1455 o | 27:2d1b55e10be9@default(draft) add unstableifparentisfolded
1456 |/ 1456 |/
1457 | o 18:e02107f98737@default(draft) add gh 1457 | o 18:0c049e4e5422@default(draft) add gh
1458 |/ 1458 |/
1459 o 16:edc3c9de504e@default(draft) a3 1459 o 16:0cf3707e8971@default(draft) a3
1460 | 1460 |
1461 ~ 1461 ~
1462 $ hg evolve --rev "edc3c9de504e::" 1462 $ hg evolve --rev "0cf3707e8971::"
1463 move:[30] add uu 1463 move:[30] add uu
1464 atop:[32] _pp 1464 atop:[32] _pp
1465 working directory is now at 43c3f5ef149f 1465 working directory is now at be23044af550
1466 1466
1467 1467
1468 Check that dirstate changes are kept at failure for conflicts (issue4966) 1468 Check that dirstate changes are kept at failure for conflicts (issue4966)
1469 ---------------------------------------- 1469 ----------------------------------------
1470 1470
1479 $ echo "will cause conflict at evolve" > newfile 1479 $ echo "will cause conflict at evolve" > newfile
1480 $ echo "newly added" > newlyadded 1480 $ echo "newly added" > newlyadded
1481 $ hg add newlyadded 1481 $ hg add newlyadded
1482 $ hg commit -m "will cause conflict at evolve" 1482 $ hg commit -m "will cause conflict at evolve"
1483 1483
1484 $ glog -r "edc3c9de504e::" 1484 $ glog -r "0cf3707e8971::"
1485 @ 36:02e943732647@default(draft) will cause conflict at evolve 1485 @ 36:59c37c5bebd1@default(draft) will cause conflict at evolve
1486 | 1486 |
1487 o 35:f8e30e9317aa@default(draft) will be evolved safely 1487 o 35:7cc12c6c7862@default(draft) will be evolved safely
1488 | 1488 |
1489 o 34:36030b147271@default(draft) will be amended 1489 o 34:98c7ab460e6b@default(draft) will be amended
1490 | 1490 |
1491 o 33:43c3f5ef149f@default(draft) add uu 1491 o 33:be23044af550@default(draft) add uu
1492 | 1492 |
1493 o 32:7a555adf2b4a@default(draft) _pp 1493 o 32:c7dbf668e9d5@default(draft) _pp
1494 | 1494 |
1495 o 31:2be4d2d5bf34@default(draft) _oo 1495 o 31:2b5a32114b3d@default(draft) _oo
1496 | 1496 |
1497 | o 28:580886d07058@default(draft) add gg 1497 | o 28:92ca6f3984de@default(draft) add gg
1498 | | 1498 | |
1499 o | 27:68330ac625b8@default(draft) add unstableifparentisfolded 1499 o | 27:2d1b55e10be9@default(draft) add unstableifparentisfolded
1500 |/ 1500 |/
1501 | o 18:e02107f98737@default(draft) add gh 1501 | o 18:0c049e4e5422@default(draft) add gh
1502 |/ 1502 |/
1503 o 16:edc3c9de504e@default(draft) a3 1503 o 16:0cf3707e8971@default(draft) a3
1504 | 1504 |
1505 ~ 1505 ~
1506 1506
1507 $ hg update -q 36030b147271 1507 $ hg update -q 98c7ab460e6b
1508 $ echo "amended" > newfile 1508 $ echo "amended" > newfile
1509 $ hg amend -m "amended" 1509 $ hg amend -m "amended"
1510 2 new orphan changesets 1510 2 new orphan changesets
1511 1511
1512 $ hg evolve --rev "36030b147271::" 1512 $ hg evolve --rev "98c7ab460e6b::"
1513 move:[35] will be evolved safely 1513 move:[35] will be evolved safely
1514 atop:[37] amended 1514 atop:[37] amended
1515 move:[36] will cause conflict at evolve 1515 move:[36] will cause conflict at evolve
1516 atop:[38] will be evolved safely 1516 atop:[38] will be evolved safely
1517 merging newfile 1517 merging newfile
1519 evolve failed! 1519 evolve failed!
1520 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort 1520 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort
1521 abort: unresolved merge conflicts (see hg help resolve) 1521 abort: unresolved merge conflicts (see hg help resolve)
1522 [255] 1522 [255]
1523 1523
1524 $ glog -r "43c3f5ef149f::" --hidden 1524 $ glog -r "be23044af550::" --hidden
1525 @ 38:c904da5245b0@default(draft) will be evolved safely 1525 @ 38:61abd81de026@default(draft) will be evolved safely
1526 | 1526 |
1527 o 37:34ae045ec400@default(draft) amended 1527 o 37:df89d30f23e2@default(draft) amended
1528 | 1528 |
1529 | * 36:02e943732647@default(draft) will cause conflict at evolve 1529 | * 36:59c37c5bebd1@default(draft) will cause conflict at evolve
1530 | | 1530 | |
1531 | x 35:f8e30e9317aa@default(draft) will be evolved safely 1531 | x 35:7cc12c6c7862@default(draft) will be evolved safely
1532 | | 1532 | |
1533 | x 34:36030b147271@default(draft) will be amended 1533 | x 34:98c7ab460e6b@default(draft) will be amended
1534 |/ 1534 |/
1535 o 33:43c3f5ef149f@default(draft) add uu 1535 o 33:be23044af550@default(draft) add uu
1536 | 1536 |
1537 ~ 1537 ~
1538 1538
1539 $ hg status newlyadded 1539 $ hg status newlyadded
1540 A newlyadded 1540 A newlyadded