comparison tests/test-evolve.t @ 1510:b86eea66ed02

evolve: be more complete about copying extra from old revisions For 'hg evolve' we want to copy all extra-level metadata except for branch. This keeps the experimental topics extension from getting obliterated by evolve runs. Many hashes in tests changed due to some extra data coming along for the ride in various places, but no functionality that was tested. It's plausible that this copies too much metadata - maybe we should be dropping rebase_src or convert_revision as well. Right now no tools do that, so I'm biasing towards preserving everything except branch when copying metadata for now.
author Augie Fackler <raf@durin42.com>
date Tue, 29 Sep 2015 15:40:28 -0400
parents 3c0aebe73482
children c4f8a2916e43
comparison
equal deleted inserted replaced
1509:405be3783fbc 1510:b86eea66ed02
333 c296b79833d1d497f33144786174bf35e04e44a3 0 {568a468b60fc99a42d5d4ddbe181caff1eef308d} (*) {'user': 'test'} (glob) 333 c296b79833d1d497f33144786174bf35e04e44a3 0 {568a468b60fc99a42d5d4ddbe181caff1eef308d} (*) {'user': 'test'} (glob)
334 $ hg evolve 334 $ hg evolve
335 move:[4] another feature (child of 568a468b60fc) 335 move:[4] another feature (child of 568a468b60fc)
336 atop:[6] a nifty feature 336 atop:[6] a nifty feature
337 merging main-file-1 337 merging main-file-1
338 working directory is now at 5c9c8d9c2e4e 338 working directory is now at 99833d22b0c6
339 $ hg log 339 $ hg log
340 7 feature-B: another feature (child of ba0ec09b1bab) - test 340 7 feature-B: another feature (child of ba0ec09b1bab) - test
341 6 feature-A: a nifty feature - test 341 6 feature-A: a nifty feature - test
342 0 : base - test 342 0 : base - test
343 343
374 374
375 $ hg evolve --any --traceback --bumped 375 $ hg evolve --any --traceback --bumped
376 recreate:[8] another feature that rox 376 recreate:[8] another feature that rox
377 atop:[7] another feature (child of ba0ec09b1bab) 377 atop:[7] another feature (child of ba0ec09b1bab)
378 computing new diff 378 computing new diff
379 committed as 476d0454d60e 379 committed as 2d8c5414e9f0
380 working directory is now at 476d0454d60e 380 working directory is now at 2d8c5414e9f0
381 $ hg glog 381 $ hg glog
382 @ 9 feature-B: bumped update to 5c9c8d9c2e4e: - test 382 @ 9 feature-B: bumped update to 99833d22b0c6: - test
383 | 383 |
384 o 7 : another feature (child of ba0ec09b1bab) - test 384 o 7 : another feature (child of ba0ec09b1bab) - test
385 | 385 |
386 o 6 feature-A: a nifty feature - test 386 o 6 feature-A: a nifty feature - test
387 | 387 |
434 atop:[13] dansk! 434 atop:[13] dansk!
435 merging main-file-1 435 merging main-file-1
436 move:[11] dansk 3! 436 move:[11] dansk 3!
437 atop:[14] dansk 2! 437 atop:[14] dansk 2!
438 merging main-file-1 438 merging main-file-1
439 working directory is now at cfb5ebed336d 439 working directory is now at 536984593824
440 $ hg glog 440 $ hg glog
441 @ 15 : dansk 3! - test 441 @ 15 : dansk 3! - test
442 | 442 |
443 o 14 : dansk 2! - test 443 o 14 : dansk 2! - test
444 | 444 |
807 $ cd ../work 807 $ cd ../work
808 $ hg fold .^ --message "Folding with custom commit message" 808 $ hg fold .^ --message "Folding with custom commit message"
809 2 changesets folded 809 2 changesets folded
810 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 810 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
811 $ glog 811 $ glog
812 @ 16:d6239ff09c9f@default(draft) Folding with custom commit message 812 @ 16:d1297ecc971f@default(draft) Folding with custom commit message
813 | 813 |
814 o 13:56ade053f46d@default(draft) dansk! 814 o 13:27b934eaf1f9@default(draft) dansk!
815 | 815 |
816 o 7:5c9c8d9c2e4e@default(public) another feature (child of ba0ec09b1bab) 816 o 7:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
817 | 817 |
818 o 6:ba0ec09b1bab@default(public) a nifty feature 818 o 6:ba0ec09b1bab@default(public) a nifty feature
819 | 819 |
820 o 0:e55e0562ee93@default(public) base 820 o 0:e55e0562ee93@default(public) base
821 821
826 826
827 $ hg fold .^ --logfile commit-message 827 $ hg fold .^ --logfile commit-message
828 2 changesets folded 828 2 changesets folded
829 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 829 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
830 $ hg qlog 830 $ hg qlog
831 17 - dba606655966 A longer 831 17 - 0b1eca0e871b A longer
832 commit message (draft) 832 commit message (draft)
833 7 - 5c9c8d9c2e4e another feature (child of ba0ec09b1bab) (public) 833 7 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public)
834 6 - ba0ec09b1bab a nifty feature (public) 834 6 - ba0ec09b1bab a nifty feature (public)
835 0 - e55e0562ee93 base (public) 835 0 - e55e0562ee93 base (public)
836 836
837 $ cd .. 837 $ cd ..
838 838
893 $ hg amend -m 'a1_' 893 $ hg amend -m 'a1_'
894 2 new unstable changesets 894 2 new unstable changesets
895 $ hg evolve 895 $ hg evolve
896 move:[5] a2 896 move:[5] a2
897 atop:[7] a1_ 897 atop:[7] a1_
898 working directory is now at 5406c5cfee42 898 working directory is now at eb07e22a0e63
899 $ hg evolve 899 $ hg evolve
900 move:[6] a3 900 move:[6] a3
901 atop:[8] a2 901 atop:[8] a2
902 working directory is now at c7661e655801 902 working directory is now at 777c26ca5e78
903 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 903 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
904 @ 9 [mybranch] a3 904 @ 9 [mybranch] a3
905 | 905 |
906 o 8 [mybranch] a2 906 o 8 [mybranch] a2
907 | 907 |
946 .hg/bookmarks.* (glob) 946 .hg/bookmarks.* (glob)
947 $ hg evolve 947 $ hg evolve
948 move:[8] a2 948 move:[8] a2
949 atop:[10] a1__ 949 atop:[10] a1__
950 (leaving bookmark testbookmark) 950 (leaving bookmark testbookmark)
951 working directory is now at f37ed7a60f43 951 working directory is now at d952e93add6f
952 $ ls .hg/bookmarks* 952 $ ls .hg/bookmarks*
953 .hg/bookmarks 953 .hg/bookmarks
954 954
955 Possibility to select what trouble to solve first, asking for bumped before 955 Possibility to select what trouble to solve first, asking for bumped before
956 divergent 956 divergent
1012 1012
1013 $ hg evolve -r 12 --bumped 1013 $ hg evolve -r 12 --bumped
1014 recreate:[12] add new file bumped 1014 recreate:[12] add new file bumped
1015 atop:[11] a2 1015 atop:[11] a2
1016 computing new diff 1016 computing new diff
1017 committed as d66b1e328488 1017 committed as f15d32934071
1018 working directory is now at d66b1e328488 1018 working directory is now at f15d32934071
1019 $ hg evolve --any 1019 $ hg evolve --any
1020 move:[9] a3 1020 move:[9] a3
1021 atop:[13] bumped update to f37ed7a60f43: 1021 atop:[13] bumped update to d952e93add6f:
1022 working directory is now at 7d2ce5f38f9b 1022 working directory is now at cce26b684bfe
1023 Check that we can resolve troubles in a revset with more than one commit 1023 Check that we can resolve troubles in a revset with more than one commit
1024 $ hg up 14 -C 1024 $ hg up 14 -C
1025 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1025 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1026 $ mkcommit gg 1026 $ mkcommit gg
1027 $ hg up 14 1027 $ hg up 14
1036 | 1036 |
1037 | o 15 : add gg - test 1037 | o 15 : add gg - test
1038 |/ 1038 |/
1039 @ 14 : a3 - test 1039 @ 14 : a3 - test
1040 | 1040 |
1041 o 13 : bumped update to f37ed7a60f43: - test 1041 o 13 : bumped update to d952e93add6f: - test
1042 | 1042 |
1043 o 11 : a2 - test 1043 o 11 : a2 - test
1044 | 1044 |
1045 o 10 testbookmark: a1__ - test 1045 o 10 testbookmark: a1__ - test
1046 | 1046 |
1055 | | 1055 | |
1056 | | o 15 : add gg - test 1056 | | o 15 : add gg - test
1057 | |/ 1057 | |/
1058 | x 14 : a3 - test 1058 | x 14 : a3 - test
1059 |/ 1059 |/
1060 o 13 : bumped update to f37ed7a60f43: - test 1060 o 13 : bumped update to d952e93add6f: - test
1061 | 1061 |
1062 o 11 : a2 - test 1062 o 11 : a2 - test
1063 | 1063 |
1064 o 10 testbookmark: a1__ - test 1064 o 10 testbookmark: a1__ - test
1065 | 1065 |
1078 $ hg evolve --rev "14::" --unstable 1078 $ hg evolve --rev "14::" --unstable
1079 move:[15] add gg 1079 move:[15] add gg
1080 atop:[18] a3 1080 atop:[18] a3
1081 move:[16] add gh 1081 move:[16] add gh
1082 atop:[18] a3 1082 atop:[18] a3
1083 working directory is now at db3d894869b0 1083 working directory is now at e02107f98737
1084 $ hg glog 1084 $ hg glog
1085 @ 20 : add gh - test 1085 @ 20 : add gh - test
1086 | 1086 |
1087 | o 19 : add gg - test 1087 | o 19 : add gg - test
1088 |/ 1088 |/
1089 o 18 : a3 - test 1089 o 18 : a3 - test
1090 | 1090 |
1091 o 13 : bumped update to f37ed7a60f43: - test 1091 o 13 : bumped update to d952e93add6f: - test
1092 | 1092 |
1093 o 11 : a2 - test 1093 o 11 : a2 - test
1094 | 1094 |
1095 o 10 testbookmark: a1__ - test 1095 o 10 testbookmark: a1__ - test
1096 | 1096 |
1208 $ echo "hello" > j4 1208 $ echo "hello" > j4
1209 $ hg add j4 1209 $ hg add j4
1210 $ hg amend 1210 $ hg amend
1211 2 new unstable changesets 1211 2 new unstable changesets
1212 $ glog -r "18::" 1212 $ glog -r "18::"
1213 @ 25:4c0bc042ef3b@default(draft) add j1 1213 @ 25:8dc373be86d9@default(draft) add j1
1214 | 1214 |
1215 | o 23:c70048fd3350@default(draft) add j3 1215 | o 23:d7eadcf6eccd@default(draft) add j3
1216 | | 1216 | |
1217 | o 22:714e60ca57b7@default(draft) add j2 1217 | o 22:2223ea564144@default(draft) add j2
1218 | | 1218 | |
1219 | x 21:b430835af718@default(draft) add j1 1219 | x 21:48490698b269@default(draft) add j1
1220 |/ 1220 |/
1221 | o 20:db3d894869b0@default(draft) add gh 1221 | o 20:e02107f98737@default(draft) add gh
1222 | | 1222 | |
1223 o | 19:10ffdd7e3cc9@default(draft) add gg 1223 o | 19:24e63b319adf@default(draft) add gg
1224 |/ 1224 |/
1225 o 18:0bb66d4c1968@default(draft) a3 1225 o 18:edc3c9de504e@default(draft) a3
1226 | 1226 |
1227 1227
1228 $ hg evolve --rev 23 --any 1228 $ hg evolve --rev 23 --any
1229 abort: cannot specify both "--rev" and "--any" 1229 abort: cannot specify both "--rev" and "--any"
1230 [255] 1230 [255]
1231 $ hg evolve --rev 23 1231 $ hg evolve --rev 23
1232 cannot solve instability of c70048fd3350, skipping 1232 cannot solve instability of d7eadcf6eccd, skipping
1233 1233
1234 Check that uncommit respects the allowunstable option 1234 Check that uncommit respects the allowunstable option
1235 With only createmarkers we can only uncommit on a head 1235 With only createmarkers we can only uncommit on a head
1236 $ cat >> $HGRCPATH <<EOF 1236 $ cat >> $HGRCPATH <<EOF
1237 > [experimental] 1237 > [experimental]
1238 > evolution=createmarkers, allnewcommands 1238 > evolution=createmarkers, allnewcommands
1239 > EOF 1239 > EOF
1240 $ hg up 4c0bc042ef3b^ 1240 $ hg up 8dc373be86d9^
1241 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1241 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1242 $ hg uncommit --all 1242 $ hg uncommit --all
1243 abort: cannot uncommit in the middle of a stack 1243 abort: cannot uncommit in the middle of a stack
1244 [255] 1244 [255]
1245 $ hg up 4c0bc042ef3b 1245 $ hg up 8dc373be86d9
1246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 1246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1247 $ hg uncommit --all 1247 $ hg uncommit --all
1248 new changeset is empty 1248 new changeset is empty
1249 (use "hg prune ." to remove it) 1249 (use "hg prune ." to remove it)
1250 $ glog -r "18::" 1250 $ glog -r "18::"
1251 @ 26:04b32348803e@default(draft) add j1 1251 @ 26:044804d0c10d@default(draft) add j1
1252 | 1252 |
1253 | o 23:c70048fd3350@default(draft) add j3 1253 | o 23:d7eadcf6eccd@default(draft) add j3
1254 | | 1254 | |
1255 | o 22:714e60ca57b7@default(draft) add j2 1255 | o 22:2223ea564144@default(draft) add j2
1256 | | 1256 | |
1257 | x 21:b430835af718@default(draft) add j1 1257 | x 21:48490698b269@default(draft) add j1
1258 |/ 1258 |/
1259 | o 20:db3d894869b0@default(draft) add gh 1259 | o 20:e02107f98737@default(draft) add gh
1260 | | 1260 | |
1261 o | 19:10ffdd7e3cc9@default(draft) add gg 1261 o | 19:24e63b319adf@default(draft) add gg
1262 |/ 1262 |/
1263 o 18:0bb66d4c1968@default(draft) a3 1263 o 18:edc3c9de504e@default(draft) a3
1264 | 1264 |
1265 1265
1266 Check that prune respects the allowunstable option 1266 Check that prune respects the allowunstable option
1267 $ hg up -C . 1267 $ hg up -C .
1268 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1268 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1275 $ hg evolve --all --any 1275 $ hg evolve --all --any
1276 move:[22] add j2 1276 move:[22] add j2
1277 atop:[26] add j1 1277 atop:[26] add j1
1278 move:[23] add j3 1278 move:[23] add j3
1279 atop:[27] add j2 1279 atop:[27] add j2
1280 working directory is now at 920a35e8dbd0 1280 working directory is now at c9a20e2d74aa
1281 $ glog -r "18::" 1281 $ glog -r "18::"
1282 @ 28:920a35e8dbd0@default(draft) add j3 1282 @ 28:c9a20e2d74aa@default(draft) add j3
1283 | 1283 |
1284 o 27:31e050d895dd@default(draft) add j2 1284 o 27:b0e3066231e2@default(draft) add j2
1285 | 1285 |
1286 o 26:04b32348803e@default(draft) add j1 1286 o 26:044804d0c10d@default(draft) add j1
1287 | 1287 |
1288 | o 20:db3d894869b0@default(draft) add gh 1288 | o 20:e02107f98737@default(draft) add gh
1289 | | 1289 | |
1290 o | 19:10ffdd7e3cc9@default(draft) add gg 1290 o | 19:24e63b319adf@default(draft) add gg
1291 |/ 1291 |/
1292 o 18:0bb66d4c1968@default(draft) a3 1292 o 18:edc3c9de504e@default(draft) a3
1293 | 1293 |
1294 $ hg up 19 1294 $ hg up 19
1295 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1295 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1296 $ mkcommit c5_ 1296 $ mkcommit c5_
1297 created new head 1297 created new head
1302 abort: cannot prune in the middle of a stack 1302 abort: cannot prune in the middle of a stack
1303 [255] 1303 [255]
1304 $ hg prune '26::' 1304 $ hg prune '26::'
1305 3 changesets pruned 1305 3 changesets pruned
1306 $ glog -r "18::" 1306 $ glog -r "18::"
1307 @ 29:5a6c53544778@default(draft) add c5_ 1307 @ 29:2251801b6c91@default(draft) add c5_
1308 | 1308 |
1309 | o 20:db3d894869b0@default(draft) add gh 1309 | o 20:e02107f98737@default(draft) add gh
1310 | | 1310 | |
1311 o | 19:10ffdd7e3cc9@default(draft) add gg 1311 o | 19:24e63b319adf@default(draft) add gg
1312 |/ 1312 |/
1313 o 18:0bb66d4c1968@default(draft) a3 1313 o 18:edc3c9de504e@default(draft) a3
1314 | 1314 |
1315 1315
1316 Check that fold respects the allowunstable option 1316 Check that fold respects the allowunstable option
1317 $ hg up 0bb66d4c1968 1317 $ hg up edc3c9de504e
1318 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1318 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1319 $ mkcommit unstableifparentisfolded 1319 $ mkcommit unstableifparentisfolded
1320 created new head 1320 created new head
1321 $ glog -r "18::" 1321 $ glog -r "18::"
1322 @ 30:30ecefd67c0a@default(draft) add unstableifparentisfolded 1322 @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1323 | 1323 |
1324 | o 29:5a6c53544778@default(draft) add c5_ 1324 | o 29:2251801b6c91@default(draft) add c5_
1325 | | 1325 | |
1326 +---o 20:db3d894869b0@default(draft) add gh 1326 +---o 20:e02107f98737@default(draft) add gh
1327 | | 1327 | |
1328 | o 19:10ffdd7e3cc9@default(draft) add gg 1328 | o 19:24e63b319adf@default(draft) add gg
1329 |/ 1329 |/
1330 o 18:0bb66d4c1968@default(draft) a3 1330 o 18:edc3c9de504e@default(draft) a3
1331 | 1331 |
1332 1332
1333 $ hg fold --exact "19 + 18" 1333 $ hg fold --exact "19 + 18"
1334 abort: cannot fold chain not ending with a head or with branching 1334 abort: cannot fold chain not ending with a head or with branching
1335 [255] 1335 [255]
1346 > [experimental] 1346 > [experimental]
1347 > evolution=all 1347 > evolution=all
1348 > EOF 1348 > EOF
1349 1349
1350 $ glog -r "18::" 1350 $ glog -r "18::"
1351 o 31:5cc6eda0f00d@default(draft) add gg 1351 o 31:580886d07058@default(draft) add gg
1352 | 1352 |
1353 | @ 30:30ecefd67c0a@default(draft) add unstableifparentisfolded 1353 | @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1354 |/ 1354 |/
1355 | o 20:db3d894869b0@default(draft) add gh 1355 | o 20:e02107f98737@default(draft) add gh
1356 |/ 1356 |/
1357 o 18:0bb66d4c1968@default(draft) a3 1357 o 18:edc3c9de504e@default(draft) a3
1358 | 1358 |
1359 1359
1360 Create a split commit 1360 Create a split commit
1361 $ printf "oo" > oo; 1361 $ printf "oo" > oo;
1362 $ printf "pp" > pp; 1362 $ printf "pp" > pp;
1374 $ hg commit -m "_pp" 1374 $ hg commit -m "_pp"
1375 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split 1375 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
1376 1 changesets pruned 1376 1 changesets pruned
1377 1 new unstable changesets 1377 1 new unstable changesets
1378 $ glog -r "18::" 1378 $ glog -r "18::"
1379 @ 35:072908d77206@default(draft) _pp 1379 @ 35:7a555adf2b4a@default(draft) _pp
1380 | 1380 |
1381 o 34:68e429987343@default(draft) _oo 1381 o 34:2be4d2d5bf34@default(draft) _oo
1382 | 1382 |
1383 | o 33:030868870864@default(draft) add uu 1383 | o 33:53f0c003e03e@default(draft) add uu
1384 | | 1384 | |
1385 | x 32:7e9688cf0a1b@default(draft) oo+pp 1385 | x 32:1bf2152f4f82@default(draft) oo+pp
1386 |/ 1386 |/
1387 | o 31:5cc6eda0f00d@default(draft) add gg 1387 | o 31:580886d07058@default(draft) add gg
1388 | | 1388 | |
1389 o | 30:30ecefd67c0a@default(draft) add unstableifparentisfolded 1389 o | 30:68330ac625b8@default(draft) add unstableifparentisfolded
1390 |/ 1390 |/
1391 | o 20:db3d894869b0@default(draft) add gh 1391 | o 20:e02107f98737@default(draft) add gh
1392 |/ 1392 |/
1393 o 18:0bb66d4c1968@default(draft) a3 1393 o 18:edc3c9de504e@default(draft) a3
1394 | 1394 |
1395 $ hg evolve --rev "18::" 1395 $ hg evolve --rev "18::"
1396 move:[33] add uu 1396 move:[33] add uu
1397 atop:[35] _pp 1397 atop:[35] _pp
1398 working directory is now at 04fae07745d4 1398 working directory is now at 43c3f5ef149f
1399 1399
1400 1400