Show More
@@ -1745,6 +1745,9 b' def _makelogrevset(repo, pats, opts, rev' | |||
|
1745 | 1745 | else: |
|
1746 | 1746 | slowpath = False |
|
1747 | 1747 | |
|
1748 | fpats = ('_patsfollow', '_patsfollowfirst') | |
|
1749 | fnopats = (('_ancestors', '_fancestors'), | |
|
1750 | ('_descendants', '_fdescendants')) | |
|
1748 | 1751 | if slowpath: |
|
1749 | 1752 | # See walkchangerevs() slow path. |
|
1750 | 1753 | # |
@@ -1763,11 +1766,10 b' def _makelogrevset(repo, pats, opts, rev' | |||
|
1763 | 1766 | matchargs.append('x:' + p) |
|
1764 | 1767 | matchargs = ','.join(('%r' % p) for p in matchargs) |
|
1765 | 1768 | opts['_matchfiles'] = matchargs |
|
1769 | if follow: | |
|
1770 | opts[fnopats[0][followfirst]] = '.' | |
|
1766 | 1771 | else: |
|
1767 | 1772 | if follow: |
|
1768 | fpats = ('_patsfollow', '_patsfollowfirst') | |
|
1769 | fnopats = (('_ancestors', '_fancestors'), | |
|
1770 | ('_descendants', '_fdescendants')) | |
|
1771 | 1773 | if pats: |
|
1772 | 1774 | # follow() revset interprets its file argument as a |
|
1773 | 1775 | # manifest entry, so use match.files(), not pats. |
@@ -1658,13 +1658,17 b' Test --follow on a directory' | |||
|
1658 | 1658 | $ testlog -f dir |
|
1659 | 1659 | [] |
|
1660 | 1660 | (group |
|
1661 | (and | |
|
1661 | 1662 | (func |
|
1662 | 1663 | ('symbol', '_matchfiles') |
|
1663 | 1664 | (list |
|
1664 | 1665 | (list |
|
1665 | 1666 | ('string', 'r:') |
|
1666 | 1667 | ('string', 'd:relpath')) |
|
1667 |
('string', 'p:dir'))) |
|
|
1668 | ('string', 'p:dir'))) | |
|
1669 | (func | |
|
1670 | ('symbol', 'ancestors') | |
|
1671 | ('symbol', '.')))) | |
|
1668 | 1672 | $ hg up -q tip |
|
1669 | 1673 | |
|
1670 | 1674 | Test --follow on file not in parent revision |
@@ -1679,13 +1683,17 b' Test --follow and patterns' | |||
|
1679 | 1683 | $ testlog -f 'glob:*' |
|
1680 | 1684 | [] |
|
1681 | 1685 | (group |
|
1686 | (and | |
|
1682 | 1687 | (func |
|
1683 | 1688 | ('symbol', '_matchfiles') |
|
1684 | 1689 | (list |
|
1685 | 1690 | (list |
|
1686 | 1691 | ('string', 'r:') |
|
1687 | 1692 | ('string', 'd:relpath')) |
|
1688 |
('string', 'p:glob:*'))) |
|
|
1693 | ('string', 'p:glob:*'))) | |
|
1694 | (func | |
|
1695 | ('symbol', 'ancestors') | |
|
1696 | ('symbol', '.')))) | |
|
1689 | 1697 | |
|
1690 | 1698 | Test --follow on a single rename |
|
1691 | 1699 | |
@@ -1852,13 +1860,17 b' Test --removed' | |||
|
1852 | 1860 | $ testlog --removed --follow a |
|
1853 | 1861 | [] |
|
1854 | 1862 | (group |
|
1863 | (and | |
|
1855 | 1864 | (func |
|
1856 | 1865 | ('symbol', '_matchfiles') |
|
1857 | 1866 | (list |
|
1858 | 1867 | (list |
|
1859 | 1868 | ('string', 'r:') |
|
1860 | 1869 | ('string', 'd:relpath')) |
|
1861 |
('string', 'p:a'))) |
|
|
1870 | ('string', 'p:a'))) | |
|
1871 | (func | |
|
1872 | ('symbol', 'ancestors') | |
|
1873 | ('symbol', '.')))) | |
|
1862 | 1874 | |
|
1863 | 1875 | Test --patch and --stat with --follow and --follow-first |
|
1864 | 1876 |
@@ -1543,3 +1543,24 b' issue3772: hg log -r :null showing revis' | |||
|
1543 | 1543 | |
|
1544 | 1544 | |
|
1545 | 1545 | $ cd .. |
|
1546 | ||
|
1547 | hg log -f dir across branches | |
|
1548 | ||
|
1549 | $ hg init acrossbranches | |
|
1550 | $ cd acrossbranches | |
|
1551 | $ mkdir d | |
|
1552 | $ echo a > d/a && hg ci -Aqm a | |
|
1553 | $ echo b > d/a && hg ci -Aqm b | |
|
1554 | $ hg up -q 0 | |
|
1555 | $ echo b > d/a && hg ci -Aqm c | |
|
1556 | $ hg log -f d -T '{desc}' -G | |
|
1557 | @ c | |
|
1558 | | | |
|
1559 | o a | |
|
1560 | ||
|
1561 | $ hg log -f d/a -T '{desc}' -G | |
|
1562 | o b | |
|
1563 | | | |
|
1564 | o a | |
|
1565 | ||
|
1566 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now