1416 parent: 2:155349b645be |
1416 parent: 2:155349b645be |
1417 user: test |
1417 user: test |
1418 date: Thu Jan 01 00:00:00 1970 +0000 |
1418 date: Thu Jan 01 00:00:00 1970 +0000 |
1419 summary: added d |
1419 summary: added d |
1420 |
1420 |
|
1421 |
|
1422 $ cd .. |
|
1423 |
|
1424 Test a pratical "rebase" case |
|
1425 ============================= |
|
1426 |
|
1427 Initial setup |
|
1428 |
|
1429 $ hg init rebase-divergence |
|
1430 $ cd rebase-divergence |
|
1431 $ echo root >> root |
|
1432 $ hg add root |
|
1433 $ hg commit -m root |
|
1434 $ for x in c_A c_B c_C c_D; do |
|
1435 > echo $x >> $x |
|
1436 > hg add $x |
|
1437 > hg commit -m $x |
|
1438 > done |
|
1439 |
|
1440 $ hg up 'desc("c_A")' |
|
1441 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1442 |
|
1443 $ for x in c_E c_F; do |
|
1444 > echo $x >> $x |
|
1445 > hg add $x |
|
1446 > hg commit -m $x |
|
1447 > done |
|
1448 created new head |
|
1449 |
|
1450 (creating divergence locally for simplicity) |
|
1451 |
|
1452 $ node=`hg log --rev 'desc("c_E")' -T '{node}'` |
|
1453 $ hg rebase -s $node -d 'desc("c_B")' |
|
1454 rebasing 5:4ab2719bbab9 "c_E" |
|
1455 rebasing 6:77ccbf8d837e "c_F" (tip) |
|
1456 $ hg phase --public tip |
|
1457 $ hg rebase --hidden -s $node -d 'desc("c_C")' --config experimental.evolution.allowdivergence=yes |
|
1458 rebasing 5:4ab2719bbab9 "c_E" |
|
1459 rebasing 6:77ccbf8d837e "c_F" |
|
1460 2 new content-divergent changesets |
|
1461 |
|
1462 $ hg sum |
|
1463 parent: 8:a52ac76b45f5 |
|
1464 c_F |
|
1465 branch: default |
|
1466 commit: (clean) |
|
1467 update: 4 new changesets, 3 branch heads (merge) |
|
1468 phases: 4 draft |
|
1469 content-divergent: 2 changesets |
|
1470 $ hg evolve --list |
|
1471 b4a584aea4bd: c_E |
|
1472 content-divergent: c7d2d47c7240 (public) (precursor 4ab2719bbab9) |
|
1473 |
|
1474 8ae8db670b4a: c_F |
|
1475 content-divergent: a52ac76b45f5 (public) (precursor 77ccbf8d837e) |
|
1476 |
|
1477 $ hg log -G --patch |
|
1478 * changeset: 10:8ae8db670b4a |
|
1479 | tag: tip |
|
1480 | user: test |
|
1481 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1482 | instability: content-divergent |
|
1483 | summary: c_F |
|
1484 | |
|
1485 | diff -r b4a584aea4bd -r 8ae8db670b4a c_F |
|
1486 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1487 | +++ b/c_F Thu Jan 01 00:00:00 1970 +0000 |
|
1488 | @@ -0,0 +1,1 @@ |
|
1489 | +c_F |
|
1490 | |
|
1491 * changeset: 9:b4a584aea4bd |
|
1492 | parent: 3:abb77b893f28 |
|
1493 | user: test |
|
1494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1495 | instability: content-divergent |
|
1496 | summary: c_E |
|
1497 | |
|
1498 | diff -r abb77b893f28 -r b4a584aea4bd c_E |
|
1499 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1500 | +++ b/c_E Thu Jan 01 00:00:00 1970 +0000 |
|
1501 | @@ -0,0 +1,1 @@ |
|
1502 | +c_E |
|
1503 | |
|
1504 | @ changeset: 8:a52ac76b45f5 |
|
1505 | | user: test |
|
1506 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1507 | | summary: c_F |
|
1508 | | |
|
1509 | | diff -r c7d2d47c7240 -r a52ac76b45f5 c_F |
|
1510 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1511 | | +++ b/c_F Thu Jan 01 00:00:00 1970 +0000 |
|
1512 | | @@ -0,0 +1,1 @@ |
|
1513 | | +c_F |
|
1514 | | |
|
1515 | o changeset: 7:c7d2d47c7240 |
|
1516 | | parent: 2:eb1b4e1205b8 |
|
1517 | | user: test |
|
1518 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1519 | | summary: c_E |
|
1520 | | |
|
1521 | | diff -r eb1b4e1205b8 -r c7d2d47c7240 c_E |
|
1522 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1523 | | +++ b/c_E Thu Jan 01 00:00:00 1970 +0000 |
|
1524 | | @@ -0,0 +1,1 @@ |
|
1525 | | +c_E |
|
1526 | | |
|
1527 +---o changeset: 4:dbb960d6c97c |
|
1528 | | user: test |
|
1529 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1530 | | summary: c_D |
|
1531 | | |
|
1532 | | diff -r abb77b893f28 -r dbb960d6c97c c_D |
|
1533 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1534 | | +++ b/c_D Thu Jan 01 00:00:00 1970 +0000 |
|
1535 | | @@ -0,0 +1,1 @@ |
|
1536 | | +c_D |
|
1537 | | |
|
1538 o | changeset: 3:abb77b893f28 |
|
1539 |/ user: test |
|
1540 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1541 | summary: c_C |
|
1542 | |
|
1543 | diff -r eb1b4e1205b8 -r abb77b893f28 c_C |
|
1544 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1545 | +++ b/c_C Thu Jan 01 00:00:00 1970 +0000 |
|
1546 | @@ -0,0 +1,1 @@ |
|
1547 | +c_C |
|
1548 | |
|
1549 o changeset: 2:eb1b4e1205b8 |
|
1550 | user: test |
|
1551 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1552 | summary: c_B |
|
1553 | |
|
1554 | diff -r e31751786014 -r eb1b4e1205b8 c_B |
|
1555 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1556 | +++ b/c_B Thu Jan 01 00:00:00 1970 +0000 |
|
1557 | @@ -0,0 +1,1 @@ |
|
1558 | +c_B |
|
1559 | |
|
1560 o changeset: 1:e31751786014 |
|
1561 | user: test |
|
1562 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1563 | summary: c_A |
|
1564 | |
|
1565 | diff -r 1e4be0697311 -r e31751786014 c_A |
|
1566 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1567 | +++ b/c_A Thu Jan 01 00:00:00 1970 +0000 |
|
1568 | @@ -0,0 +1,1 @@ |
|
1569 | +c_A |
|
1570 | |
|
1571 o changeset: 0:1e4be0697311 |
|
1572 user: test |
|
1573 date: Thu Jan 01 00:00:00 1970 +0000 |
|
1574 summary: root |
|
1575 |
|
1576 diff -r 000000000000 -r 1e4be0697311 root |
|
1577 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1578 +++ b/root Thu Jan 01 00:00:00 1970 +0000 |
|
1579 @@ -0,0 +1,1 @@ |
|
1580 +root |
|
1581 |
|
1582 |
|
1583 Run automatic evolution |
|
1584 |
|
1585 $ hg evolve --content-divergent --rev 'not public() and desc("c_E")::' |
|
1586 merge:[7] c_E |
|
1587 with: [9] c_E |
|
1588 base: [5] c_E |
|
1589 rebasing "other" content-divergent changeset b4a584aea4bd on eb1b4e1205b8 |
|
1590 updating to "local" side of the conflict: c7d2d47c7240 |
|
1591 merging "other" content-divergent changeset '0773642cfa95' |
|
1592 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1593 1 new orphan changesets |
|
1594 merge:[8] c_F |
|
1595 with: [10] c_F |
|
1596 base: [6] c_F |
|
1597 rebasing "other" content-divergent changeset 8ae8db670b4a on c7d2d47c7240 |
|
1598 updating to "local" side of the conflict: a52ac76b45f5 |
|
1599 merging "other" content-divergent changeset '6a87ed4aa317' |
|
1600 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1601 $ hg sum |
|
1602 parent: 8:a52ac76b45f5 tip |
|
1603 c_F |
|
1604 branch: default |
|
1605 commit: (clean) |
|
1606 update: 2 new changesets, 2 branch heads (merge) |
|
1607 phases: 2 draft |
|
1608 |
|
1609 $ hg evolve --list |
|
1610 |
|
1611 $ hg log -G --patch |
|
1612 @ changeset: 8:a52ac76b45f5 |
|
1613 | tag: tip |
|
1614 | user: test |
|
1615 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1616 | summary: c_F |
|
1617 | |
|
1618 | diff -r c7d2d47c7240 -r a52ac76b45f5 c_F |
|
1619 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1620 | +++ b/c_F Thu Jan 01 00:00:00 1970 +0000 |
|
1621 | @@ -0,0 +1,1 @@ |
|
1622 | +c_F |
|
1623 | |
|
1624 o changeset: 7:c7d2d47c7240 |
|
1625 | parent: 2:eb1b4e1205b8 |
|
1626 | user: test |
|
1627 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1628 | summary: c_E |
|
1629 | |
|
1630 | diff -r eb1b4e1205b8 -r c7d2d47c7240 c_E |
|
1631 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1632 | +++ b/c_E Thu Jan 01 00:00:00 1970 +0000 |
|
1633 | @@ -0,0 +1,1 @@ |
|
1634 | +c_E |
|
1635 | |
|
1636 | o changeset: 4:dbb960d6c97c |
|
1637 | | user: test |
|
1638 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1639 | | summary: c_D |
|
1640 | | |
|
1641 | | diff -r abb77b893f28 -r dbb960d6c97c c_D |
|
1642 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1643 | | +++ b/c_D Thu Jan 01 00:00:00 1970 +0000 |
|
1644 | | @@ -0,0 +1,1 @@ |
|
1645 | | +c_D |
|
1646 | | |
|
1647 | o changeset: 3:abb77b893f28 |
|
1648 |/ user: test |
|
1649 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1650 | summary: c_C |
|
1651 | |
|
1652 | diff -r eb1b4e1205b8 -r abb77b893f28 c_C |
|
1653 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1654 | +++ b/c_C Thu Jan 01 00:00:00 1970 +0000 |
|
1655 | @@ -0,0 +1,1 @@ |
|
1656 | +c_C |
|
1657 | |
|
1658 o changeset: 2:eb1b4e1205b8 |
|
1659 | user: test |
|
1660 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1661 | summary: c_B |
|
1662 | |
|
1663 | diff -r e31751786014 -r eb1b4e1205b8 c_B |
|
1664 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1665 | +++ b/c_B Thu Jan 01 00:00:00 1970 +0000 |
|
1666 | @@ -0,0 +1,1 @@ |
|
1667 | +c_B |
|
1668 | |
|
1669 o changeset: 1:e31751786014 |
|
1670 | user: test |
|
1671 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1672 | summary: c_A |
|
1673 | |
|
1674 | diff -r 1e4be0697311 -r e31751786014 c_A |
|
1675 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1676 | +++ b/c_A Thu Jan 01 00:00:00 1970 +0000 |
|
1677 | @@ -0,0 +1,1 @@ |
|
1678 | +c_A |
|
1679 | |
|
1680 o changeset: 0:1e4be0697311 |
|
1681 user: test |
|
1682 date: Thu Jan 01 00:00:00 1970 +0000 |
|
1683 summary: root |
|
1684 |
|
1685 diff -r 000000000000 -r 1e4be0697311 root |
|
1686 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1687 +++ b/root Thu Jan 01 00:00:00 1970 +0000 |
|
1688 @@ -0,0 +1,1 @@ |
|
1689 +root |
|
1690 |
|
1691 $ hg export tip |
|
1692 # HG changeset patch |
|
1693 # User test |
|
1694 # Date 0 0 |
|
1695 # Thu Jan 01 00:00:00 1970 +0000 |
|
1696 # Node ID a52ac76b45f523a039fc4a938d79874f4bdb1a85 |
|
1697 # Parent c7d2d47c7240562be5cbd1a24080dd0396178709 |
|
1698 c_F |
|
1699 |
|
1700 diff -r c7d2d47c7240 -r a52ac76b45f5 c_F |
|
1701 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1702 +++ b/c_F Thu Jan 01 00:00:00 1970 +0000 |
|
1703 @@ -0,0 +1,1 @@ |
|
1704 +c_F |
|
1705 |
|
1706 $ hg obslog --rev a52ac76b45f5 |
|
1707 @ a52ac76b45f5 (8) c_F |
|
1708 |\ |
|
1709 x | 6a87ed4aa317 (12) c_F |
|
1710 | | rewritten as a52ac76b45f5 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) |
|
1711 | | |
|
1712 x | 8ae8db670b4a (10) c_F |
|
1713 |/ rewritten(parent) as 6a87ed4aa317 using evolve by test (Thu Jan 01 00:00:00 1970 +0000) |
|
1714 | |
|
1715 x 77ccbf8d837e (6) c_F |
|
1716 rewritten(parent) as 8ae8db670b4a using rebase by test (Thu Jan 01 00:00:00 1970 +0000) |
|
1717 rewritten(parent) as a52ac76b45f5 using rebase by test (Thu Jan 01 00:00:00 1970 +0000) |
|
1718 |