Show More
@@ -1745,6 +1745,9 b' def _makelogrevset(repo, pats, opts, rev' | |||||
1745 | else: |
|
1745 | else: | |
1746 | slowpath = False |
|
1746 | slowpath = False | |
1747 |
|
1747 | |||
|
1748 | fpats = ('_patsfollow', '_patsfollowfirst') | |||
|
1749 | fnopats = (('_ancestors', '_fancestors'), | |||
|
1750 | ('_descendants', '_fdescendants')) | |||
1748 | if slowpath: |
|
1751 | if slowpath: | |
1749 | # See walkchangerevs() slow path. |
|
1752 | # See walkchangerevs() slow path. | |
1750 | # |
|
1753 | # | |
@@ -1763,11 +1766,10 b' def _makelogrevset(repo, pats, opts, rev' | |||||
1763 | matchargs.append('x:' + p) |
|
1766 | matchargs.append('x:' + p) | |
1764 | matchargs = ','.join(('%r' % p) for p in matchargs) |
|
1767 | matchargs = ','.join(('%r' % p) for p in matchargs) | |
1765 | opts['_matchfiles'] = matchargs |
|
1768 | opts['_matchfiles'] = matchargs | |
|
1769 | if follow: | |||
|
1770 | opts[fnopats[0][followfirst]] = '.' | |||
1766 | else: |
|
1771 | else: | |
1767 | if follow: |
|
1772 | if follow: | |
1768 | fpats = ('_patsfollow', '_patsfollowfirst') |
|
|||
1769 | fnopats = (('_ancestors', '_fancestors'), |
|
|||
1770 | ('_descendants', '_fdescendants')) |
|
|||
1771 | if pats: |
|
1773 | if pats: | |
1772 | # follow() revset interprets its file argument as a |
|
1774 | # follow() revset interprets its file argument as a | |
1773 | # manifest entry, so use match.files(), not pats. |
|
1775 | # manifest entry, so use match.files(), not pats. | |
@@ -1793,7 +1795,7 b' def _makelogrevset(repo, pats, opts, rev' | |||||
1793 | filematcher = lambda rev: match |
|
1795 | filematcher = lambda rev: match | |
1794 |
|
1796 | |||
1795 | expr = [] |
|
1797 | expr = [] | |
1796 | for op, val in opts.iteritems(): |
|
1798 | for op, val in sorted(opts.iteritems()): | |
1797 | if not val: |
|
1799 | if not val: | |
1798 | continue |
|
1800 | continue | |
1799 | if op not in opt2revset: |
|
1801 | if op not in opt2revset: |
@@ -1658,13 +1658,17 b' Test --follow on a directory' | |||||
1658 | $ testlog -f dir |
|
1658 | $ testlog -f dir | |
1659 | [] |
|
1659 | [] | |
1660 | (group |
|
1660 | (group | |
1661 |
( |
|
1661 | (and | |
1662 | ('symbol', '_matchfiles') |
|
1662 | (func | |
1663 | (list |
|
1663 | ('symbol', 'ancestors') | |
|
1664 | ('symbol', '.')) | |||
|
1665 | (func | |||
|
1666 | ('symbol', '_matchfiles') | |||
1664 | (list |
|
1667 | (list | |
1665 |
( |
|
1668 | (list | |
1666 |
('string', ' |
|
1669 | ('string', 'r:') | |
1667 |
('string', ' |
|
1670 | ('string', 'd:relpath')) | |
|
1671 | ('string', 'p:dir'))))) | |||
1668 | $ hg up -q tip |
|
1672 | $ hg up -q tip | |
1669 |
|
1673 | |||
1670 | Test --follow on file not in parent revision |
|
1674 | Test --follow on file not in parent revision | |
@@ -1679,13 +1683,17 b' Test --follow and patterns' | |||||
1679 | $ testlog -f 'glob:*' |
|
1683 | $ testlog -f 'glob:*' | |
1680 | [] |
|
1684 | [] | |
1681 | (group |
|
1685 | (group | |
1682 |
( |
|
1686 | (and | |
1683 | ('symbol', '_matchfiles') |
|
1687 | (func | |
1684 | (list |
|
1688 | ('symbol', 'ancestors') | |
|
1689 | ('symbol', '.')) | |||
|
1690 | (func | |||
|
1691 | ('symbol', '_matchfiles') | |||
1685 | (list |
|
1692 | (list | |
1686 |
( |
|
1693 | (list | |
1687 |
('string', ' |
|
1694 | ('string', 'r:') | |
1688 |
('string', ' |
|
1695 | ('string', 'd:relpath')) | |
|
1696 | ('string', 'p:glob:*'))))) | |||
1689 |
|
1697 | |||
1690 | Test --follow on a single rename |
|
1698 | Test --follow on a single rename | |
1691 |
|
1699 | |||
@@ -1852,13 +1860,17 b' Test --removed' | |||||
1852 | $ testlog --removed --follow a |
|
1860 | $ testlog --removed --follow a | |
1853 | [] |
|
1861 | [] | |
1854 | (group |
|
1862 | (group | |
1855 |
( |
|
1863 | (and | |
1856 | ('symbol', '_matchfiles') |
|
1864 | (func | |
1857 | (list |
|
1865 | ('symbol', 'ancestors') | |
|
1866 | ('symbol', '.')) | |||
|
1867 | (func | |||
|
1868 | ('symbol', '_matchfiles') | |||
1858 | (list |
|
1869 | (list | |
1859 |
( |
|
1870 | (list | |
1860 |
('string', ' |
|
1871 | ('string', 'r:') | |
1861 |
('string', ' |
|
1872 | ('string', 'd:relpath')) | |
|
1873 | ('string', 'p:a'))))) | |||
1862 |
|
1874 | |||
1863 | Test --patch and --stat with --follow and --follow-first |
|
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 | $ cd .. |
|
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