1588 $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden |
1588 $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden |
1589 @ 1:ab832e43dd5a added a (book) |
1589 @ 1:ab832e43dd5a added a (book) |
1590 |
1590 |
1591 x 0:f7ad41964313 added a () |
1591 x 0:f7ad41964313 added a () |
1592 |
1592 |
|
1593 $ cd .. |
|
1594 |
|
1595 Test which shows that orphanmerge evolution can result to crash because of |
|
1596 lastsolved not being updated in case of orphanmerge: |
|
1597 (It will be fixed in next patch) |
|
1598 |
|
1599 Prepare the repo: |
|
1600 $ hg init orphanmergerepo |
|
1601 $ cd orphanmergerepo |
|
1602 $ echo a > a |
|
1603 $ for fn in a b c; do echo foo > $fn; hg ci -Am "added "$fn; done; |
|
1604 adding a |
|
1605 adding b |
|
1606 adding c |
|
1607 Lets create a merge commit so that we can create orhpan merge later: |
|
1608 $ hg up 1 -q |
|
1609 $ echo feature > f |
|
1610 $ hg ci -Am "added feature f" |
|
1611 adding f |
|
1612 created new head |
|
1613 $ hg merge |
|
1614 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1615 (branch merge, don't forget to commit) |
|
1616 $ hg ci -m "merge feature branch" |
|
1617 $ glog |
|
1618 @ 4:2c0a98d38026@default(draft) merge feature branch |
|
1619 |\ |
|
1620 | o 3:4c33e511041e@default(draft) added feature f |
|
1621 | | |
|
1622 o | 2:8be98ac1a569@default(draft) added c |
|
1623 |/ |
|
1624 o 1:80e6d2c47cfe@default(draft) added b |
|
1625 | |
|
1626 o 0:f7ad41964313@default(draft) added a |
|
1627 |
|
1628 |
|
1629 Now make the parents of merge commit obsolete to get a orphan merge: |
|
1630 $ hg up 2 -q |
|
1631 $ echo "fixit" > c |
|
1632 $ hg ci --amend -m "updated c" |
|
1633 1 new orphan changesets |
|
1634 $ hg up 3 -q |
|
1635 $ echo "fixit" > c |
|
1636 $ hg ci --amend -m "updated f" |
|
1637 $ glog |
|
1638 @ 6:086d9bedcd75@default(draft) updated f |
|
1639 | |
|
1640 | o 5:f84f2c548fbc@default(draft) updated c |
|
1641 |/ |
|
1642 | * 4:2c0a98d38026@default(draft) merge feature branch |
|
1643 | |\ |
|
1644 +---x 3:4c33e511041e@default(draft) added feature f |
|
1645 | | |
|
1646 | x 2:8be98ac1a569@default(draft) added c |
|
1647 |/ |
|
1648 o 1:80e6d2c47cfe@default(draft) added b |
|
1649 | |
|
1650 o 0:f7ad41964313@default(draft) added a |
|
1651 |
|
1652 |
|
1653 To check `lastsolved` contain right value after completion of orphan-merge |
|
1654 resolution there should be one more trouble to be evolved; lets create one: |
|
1655 $ hg up 1 -q |
|
1656 $ echo d > d |
|
1657 $ hg ci -Am "added d" |
|
1658 adding c |
|
1659 adding d |
|
1660 created new head |
|
1661 $ echo e > e |
|
1662 $ hg ci -Am "added e" |
|
1663 adding e |
|
1664 $ hg up .^ |
|
1665 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1666 $ echo "updated d" >> d |
|
1667 $ hg ci --amend -m "updated d" |
|
1668 1 new orphan changesets |
|
1669 $ glog |
|
1670 @ 9:7c4d1834c346@default(draft) updated d |
|
1671 | |
|
1672 | * 8:421f7614462a@default(draft) added e |
|
1673 | | |
|
1674 | x 7:afe5acea1990@default(draft) added d |
|
1675 |/ |
|
1676 | o 6:086d9bedcd75@default(draft) updated f |
|
1677 |/ |
|
1678 | o 5:f84f2c548fbc@default(draft) updated c |
|
1679 |/ |
|
1680 | * 4:2c0a98d38026@default(draft) merge feature branch |
|
1681 | |\ |
|
1682 +---x 3:4c33e511041e@default(draft) added feature f |
|
1683 | | |
|
1684 | x 2:8be98ac1a569@default(draft) added c |
|
1685 |/ |
|
1686 o 1:80e6d2c47cfe@default(draft) added b |
|
1687 | |
|
1688 o 0:f7ad41964313@default(draft) added a |
|
1689 |
|
1690 Now we have one orphan merge and one more orphan cset that we just created. |
|
1691 Lets evolve: |
|
1692 $ hg evolve --all --any |
|
1693 move:[4] merge feature branch |
|
1694 atop:[5] updated c |
|
1695 move:[10] merge feature branch |
|
1696 atop:[6] updated f |
|
1697 move:[8] added e |
|
1698 atop:[9] updated d |
|
1699 working directory is now at 7c67cee06242 |