tests/test-evolve.t
changeset 4585 d871c8a92dee
parent 4580 3ef96578da43
child 4586 1b91a518d10c
equal deleted inserted replaced
4584:fd8dada76730 4585:d871c8a92dee
  1338   ~
  1338   ~
  1339 
  1339 
  1340   $ hg fold --exact "98e171e2f272::"
  1340   $ hg fold --exact "98e171e2f272::"
  1341   2 changesets folded
  1341   2 changesets folded
  1342 
  1342 
  1343 Check that evolve shows error while handling split commits
  1343 Check that dirstate changes are kept at failure for conflicts (issue4966)
  1344 --------------------------------------
  1344 ----------------------------------------
  1345 
  1345 
  1346   $ cat >> $HGRCPATH <<EOF
  1346   $ cat >> $HGRCPATH <<EOF
  1347   > [experimental]
  1347   > [experimental]
  1348   > evolution=all
  1348   > evolution=all
  1349   > EOF
  1349   > EOF
  1350 
  1350 
  1351   $ glog -r "0cf3707e8971::"
       
  1352   o  28:92ca6f3984de@default(draft) add gg
       
  1353   |
       
  1354   | @  27:2d1b55e10be9@default(draft) add unstableifparentisfolded
       
  1355   |/
       
  1356   | o  18:0c049e4e5422@default(draft) add gh
       
  1357   |/
       
  1358   o  16:0cf3707e8971@default(draft) a3
       
  1359   |
       
  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 2d1b55e10be9
       
  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')" --split
       
  1378   1 changesets pruned
       
  1379   1 new orphan changesets
       
  1380   $ glog -r "0cf3707e8971::"
       
  1381   @  32:c7dbf668e9d5@default(draft) _pp
       
  1382   |
       
  1383   o  31:2b5a32114b3d@default(draft) _oo
       
  1384   |
       
  1385   | *  30:4d122571f3b6@default(draft) add uu
       
  1386   | |
       
  1387   | x  29:7da3e73df8a5@default(draft) oo+pp
       
  1388   |/
       
  1389   | o  28:92ca6f3984de@default(draft) add gg
       
  1390   | |
       
  1391   o |  27:2d1b55e10be9@default(draft) add unstableifparentisfolded
       
  1392   |/
       
  1393   | o  18:0c049e4e5422@default(draft) add gh
       
  1394   |/
       
  1395   o  16:0cf3707e8971@default(draft) a3
       
  1396   |
       
  1397   ~
       
  1398   $ hg evolve --rev "0cf3707e8971::" --update
       
  1399   move:[30] add uu
       
  1400   atop:[32] _pp
       
  1401   working directory is now at be23044af550
       
  1402 
       
  1403 
       
  1404 Check that dirstate changes are kept at failure for conflicts (issue4966)
       
  1405 ----------------------------------------
       
  1406 
       
  1407   $ echo "will be amended" > newfile
  1351   $ echo "will be amended" > newfile
  1408   $ hg commit -m "will be amended"
  1352   $ hg commit -m "will be amended"
  1409   $ hg parents
  1353   $ hg parents
  1410   34	: will be amended - test
  1354   29	: will be amended - test
  1411 
  1355 
  1412   $ echo "will be evolved safely" >> a
  1356   $ echo "will be evolved safely" >> a
  1413   $ hg commit -m "will be evolved safely"
  1357   $ hg commit -m "will be evolved safely"
  1414 
  1358 
  1415   $ echo "will cause conflict at evolve" > newfile
  1359   $ echo "will cause conflict at evolve" > newfile
  1416   $ echo "newly added" > newlyadded
  1360   $ echo "newly added" > newlyadded
  1417   $ hg add newlyadded
  1361   $ hg add newlyadded
  1418   $ hg commit -m "will cause conflict at evolve"
  1362   $ hg commit -m "will cause conflict at evolve"
  1419 
  1363 
  1420   $ glog -r "0cf3707e8971::"
  1364   $ glog -r "0cf3707e8971::"
  1421   @  36:59c37c5bebd1@default(draft) will cause conflict at evolve
  1365   @  31:5be050657ca5@default(draft) will cause conflict at evolve
  1422   |
  1366   |
  1423   o  35:7cc12c6c7862@default(draft) will be evolved safely
  1367   o  30:748126f98ff1@default(draft) will be evolved safely
  1424   |
  1368   |
  1425   o  34:98c7ab460e6b@default(draft) will be amended
  1369   o  29:4548f3a8db2c@default(draft) will be amended
  1426   |
       
  1427   o  33:be23044af550@default(draft) add uu
       
  1428   |
       
  1429   o  32:c7dbf668e9d5@default(draft) _pp
       
  1430   |
       
  1431   o  31:2b5a32114b3d@default(draft) _oo
       
  1432   |
  1370   |
  1433   | o  28:92ca6f3984de@default(draft) add gg
  1371   | o  28:92ca6f3984de@default(draft) add gg
  1434   | |
  1372   | |
  1435   o |  27:2d1b55e10be9@default(draft) add unstableifparentisfolded
  1373   o |  27:2d1b55e10be9@default(draft) add unstableifparentisfolded
  1436   |/
  1374   |/
  1438   |/
  1376   |/
  1439   o  16:0cf3707e8971@default(draft) a3
  1377   o  16:0cf3707e8971@default(draft) a3
  1440   |
  1378   |
  1441   ~
  1379   ~
  1442 
  1380 
  1443   $ hg update -q 98c7ab460e6b
  1381   $ hg update -q -r "desc('will be amended')"
  1444   $ echo "amended" > newfile
  1382   $ echo "amended" > newfile
  1445   $ hg amend -m "amended"
  1383   $ hg amend -m "amended"
  1446   2 new orphan changesets
  1384   2 new orphan changesets
  1447 
  1385 
  1448   $ hg evolve --rev "98c7ab460e6b::"
  1386   $ hg evolve --rev "desc('will be amended')::"
  1449   move:[35] will be evolved safely
  1387   move:[30] will be evolved safely
  1450   atop:[37] amended
  1388   atop:[32] amended
  1451   move:[36] will cause conflict at evolve
  1389   move:[31] will cause conflict at evolve
  1452   merging newfile
  1390   merging newfile
  1453   warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
  1391   warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
  1454   fix conflicts and see `hg help evolve.interrupted`
  1392   fix conflicts and see `hg help evolve.interrupted`
  1455   [1]
  1393   [1]
  1456 
  1394 
  1457   $ glog -r "be23044af550::" --hidden
  1395   $ glog -r "desc('add unstableifparentisfolded')::" --hidden
  1458   @  38:61abd81de026@default(draft) will be evolved safely
  1396   @  33:b9acdb1af6d5@default(draft) will be evolved safely
  1459   |
  1397   |
  1460   o  37:df89d30f23e2@default(draft) amended
  1398   o  32:6ec468e4cb98@default(draft) amended
  1461   |
  1399   |
  1462   | @  36:59c37c5bebd1@default(draft) will cause conflict at evolve
  1400   | @  31:5be050657ca5@default(draft) will cause conflict at evolve
  1463   | |
  1401   | |
  1464   | x  35:7cc12c6c7862@default(draft) will be evolved safely
  1402   | x  30:748126f98ff1@default(draft) will be evolved safely
  1465   | |
  1403   | |
  1466   | x  34:98c7ab460e6b@default(draft) will be amended
  1404   | x  29:4548f3a8db2c@default(draft) will be amended
  1467   |/
  1405   |/
  1468   o  33:be23044af550@default(draft) add uu
  1406   o  27:2d1b55e10be9@default(draft) add unstableifparentisfolded
  1469   |
  1407   |
  1470   ~
  1408   ~
  1471 
  1409 
  1472   $ hg status newlyadded
  1410   $ hg status newlyadded
  1473   A newlyadded
  1411   A newlyadded