Show More
@@ -1643,3 +1643,138 b' Check output' | |||
|
1643 | 1643 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1644 | 1644 | o ea207398892e |
|
1645 | 1645 | |
|
1646 | Test templates with multiple pruned commits | |
|
1647 | =========================================== | |
|
1648 | ||
|
1649 | Test setup | |
|
1650 | ---------- | |
|
1651 | ||
|
1652 | $ hg init $TESTTMP/multiple-local-prune | |
|
1653 | $ cd $TESTTMP/multiple-local-prune | |
|
1654 | $ mkcommit ROOT | |
|
1655 | $ mkcommit A0 | |
|
1656 | $ hg commit --amend -m "A1" | |
|
1657 | $ hg debugobsolete --record-parent `getid "."` | |
|
1658 | obsoleted 1 changesets | |
|
1659 | ||
|
1660 | $ hg up -r "desc(A0)" --hidden | |
|
1661 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1662 | $ hg commit --amend -m "A2" | |
|
1663 | $ hg debugobsolete --record-parent `getid "."` | |
|
1664 | obsoleted 1 changesets | |
|
1665 | ||
|
1666 | Check output | |
|
1667 | ------------ | |
|
1668 | ||
|
1669 | $ hg up "desc(A0)" --hidden | |
|
1670 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1671 | $ hg tlog | |
|
1672 | @ 471f378eab4c | |
|
1673 | | | |
|
1674 | o ea207398892e | |
|
1675 | ||
|
1676 | # todo: the obsfate output is not ideal | |
|
1677 | $ hg fatelog | |
|
1678 | @ 471f378eab4c | |
|
1679 | | Obsfate: pruned; | |
|
1680 | o ea207398892e | |
|
1681 | ||
|
1682 | $ hg fatelog -v --hidden | |
|
1683 | x 65b757b745b9 | |
|
1684 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
|
1685 | | x fdf9bde5129a | |
|
1686 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
|
1687 | | @ 471f378eab4c | |
|
1688 | |/ Obsfate: rewritten as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
|
1689 | o ea207398892e | |
|
1690 | ||
|
1691 | ||
|
1692 | Test templates with splitted and pruned commit | |
|
1693 | ============================================== | |
|
1694 | ||
|
1695 | $ hg init $TESTTMP/templates-local-split-prune | |
|
1696 | $ cd $TESTTMP/templates-local-split-prune | |
|
1697 | $ mkcommit ROOT | |
|
1698 | $ echo 42 >> a | |
|
1699 | $ echo 43 >> b | |
|
1700 | $ hg commit -A -m "A0" | |
|
1701 | adding a | |
|
1702 | adding b | |
|
1703 | $ hg log --hidden -G | |
|
1704 | @ changeset: 1:471597cad322 | |
|
1705 | | tag: tip | |
|
1706 | | user: test | |
|
1707 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1708 | | summary: A0 | |
|
1709 | | | |
|
1710 | o changeset: 0:ea207398892e | |
|
1711 | user: test | |
|
1712 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1713 | summary: ROOT | |
|
1714 | ||
|
1715 | # Simulate split | |
|
1716 | $ hg up -r "desc(ROOT)" | |
|
1717 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
1718 | $ echo 42 >> a | |
|
1719 | $ hg commit -A -m "A1" | |
|
1720 | adding a | |
|
1721 | created new head | |
|
1722 | $ echo 43 >> b | |
|
1723 | $ hg commit -A -m "A2" | |
|
1724 | adding b | |
|
1725 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` | |
|
1726 | obsoleted 1 changesets | |
|
1727 | ||
|
1728 | # Simulate prune | |
|
1729 | $ hg debugobsolete --record-parent `getid "."` | |
|
1730 | obsoleted 1 changesets | |
|
1731 | ||
|
1732 | $ hg log --hidden -G | |
|
1733 | @ changeset: 3:0d0ef4bdf70e | |
|
1734 | | tag: tip | |
|
1735 | | user: test | |
|
1736 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1737 | | summary: A2 | |
|
1738 | | | |
|
1739 | o changeset: 2:617adc3a144c | |
|
1740 | | parent: 0:ea207398892e | |
|
1741 | | user: test | |
|
1742 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1743 | | summary: A1 | |
|
1744 | | | |
|
1745 | | x changeset: 1:471597cad322 | |
|
1746 | |/ user: test | |
|
1747 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1748 | | summary: A0 | |
|
1749 | | | |
|
1750 | o changeset: 0:ea207398892e | |
|
1751 | user: test | |
|
1752 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1753 | summary: ROOT | |
|
1754 | ||
|
1755 | Check templates | |
|
1756 | --------------- | |
|
1757 | ||
|
1758 | $ hg up 'desc("A0")' --hidden | |
|
1759 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1760 | ||
|
1761 | # todo: the obsfate output is not ideal | |
|
1762 | $ hg fatelog | |
|
1763 | o 617adc3a144c | |
|
1764 | | | |
|
1765 | | @ 471597cad322 | |
|
1766 | |/ Obsfate: pruned; | |
|
1767 | o ea207398892e | |
|
1768 | ||
|
1769 | $ hg up -r 'desc("A2")' --hidden | |
|
1770 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1771 | ||
|
1772 | $ hg fatelog --hidden | |
|
1773 | @ 0d0ef4bdf70e | |
|
1774 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
|
1775 | o 617adc3a144c | |
|
1776 | | | |
|
1777 | | x 471597cad322 | |
|
1778 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000); | |
|
1779 | o ea207398892e | |
|
1780 |
General Comments 0
You need to be logged in to leave comments.
Login now