##// END OF EJS Templates
log: fix log -f slow path to actually follow history...
Durham Goode -
r23500:9601229e stable
parent child Browse files
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.
@@ -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 (func
1661 (and
1662 ('symbol', '_matchfiles')
1662 (func
1663 (list
1663 ('symbol', '_matchfiles')
1664 (list
1664 (list
1665 ('string', 'r:')
1665 (list
1666 ('string', 'd:relpath'))
1666 ('string', 'r:')
1667 ('string', 'p:dir'))))
1667 ('string', 'd:relpath'))
1668 ('string', 'p:dir')))
1669 (func
1670 ('symbol', 'ancestors')
1671 ('symbol', '.'))))
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 (func
1686 (and
1683 ('symbol', '_matchfiles')
1687 (func
1684 (list
1688 ('symbol', '_matchfiles')
1685 (list
1689 (list
1686 ('string', 'r:')
1690 (list
1687 ('string', 'd:relpath'))
1691 ('string', 'r:')
1688 ('string', 'p:glob:*'))))
1692 ('string', 'd:relpath'))
1693 ('string', 'p:glob:*')))
1694 (func
1695 ('symbol', 'ancestors')
1696 ('symbol', '.'))))
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 (func
1863 (and
1856 ('symbol', '_matchfiles')
1864 (func
1857 (list
1865 ('symbol', '_matchfiles')
1858 (list
1866 (list
1859 ('string', 'r:')
1867 (list
1860 ('string', 'd:relpath'))
1868 ('string', 'r:')
1861 ('string', 'p:a'))))
1869 ('string', 'd:relpath'))
1870 ('string', 'p:a')))
1871 (func
1872 ('symbol', 'ancestors')
1873 ('symbol', '.'))))
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