Mercurial > hg
comparison mercurial/cmdutil.py @ 41838:dcbb1b4dc93a
walkfilerevs: rename filerevgen() to filerevs() since it's not a generator
Differential Revision: https://phab.mercurial-scm.org/D6053
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 02 Mar 2019 13:28:17 -0800 |
parents | aaad36b88298 |
children | b1bc6e5f5249 |
comparison
equal
deleted
inserted
replaced
41837:82d9728ace95 | 41838:dcbb1b4dc93a |
---|---|
1760 filelogs alone. | 1760 filelogs alone. |
1761 ''' | 1761 ''' |
1762 wanted = set() | 1762 wanted = set() |
1763 copies = [] | 1763 copies = [] |
1764 minrev, maxrev = min(revs), max(revs) | 1764 minrev, maxrev = min(revs), max(revs) |
1765 def filerevgen(filelog, last): | 1765 def filerevs(filelog, last): |
1766 """ | 1766 """ |
1767 Only files, no patterns. Check the history of each file. | 1767 Only files, no patterns. Check the history of each file. |
1768 | 1768 |
1769 Examines filelog entries within minrev, maxrev linkrev range | 1769 Examines filelog entries within minrev, maxrev linkrev range |
1770 Returns an iterator yielding (linkrev, parentlinkrevs, copied) | 1770 Returns an iterator yielding (linkrev, parentlinkrevs, copied) |
1823 | 1823 |
1824 # keep track of all ancestors of the file | 1824 # keep track of all ancestors of the file |
1825 ancestors = {filelog.linkrev(last)} | 1825 ancestors = {filelog.linkrev(last)} |
1826 | 1826 |
1827 # iterate from latest to oldest revision | 1827 # iterate from latest to oldest revision |
1828 for rev, flparentlinkrevs, copied in filerevgen(filelog, last): | 1828 for rev, flparentlinkrevs, copied in filerevs(filelog, last): |
1829 if not follow: | 1829 if not follow: |
1830 if rev > maxrev: | 1830 if rev > maxrev: |
1831 continue | 1831 continue |
1832 else: | 1832 else: |
1833 # Note that last might not be the first interesting | 1833 # Note that last might not be the first interesting |