Mercurial > hg
comparison mercurial/logcmdutil.py @ 45651:c7413ffe0402
cmdutil: remove remainder of old walkchangerevs() implementation
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 10 Sep 2020 18:57:31 +0900 |
parents | 9fead7d97069 |
children | ed84a4d48910 |
comparison
equal
deleted
inserted
replaced
45650:0356b41fe01d | 45651:c7413ffe0402 |
---|---|
774 - match: a matcher built from the given pats and -I/-X opts | 774 - match: a matcher built from the given pats and -I/-X opts |
775 - pats: patterns used (globs are expanded on Windows) | 775 - pats: patterns used (globs are expanded on Windows) |
776 - slowpath: True if patterns aren't as simple as scanning filelogs | 776 - slowpath: True if patterns aren't as simple as scanning filelogs |
777 """ | 777 """ |
778 # pats/include/exclude are passed to match.match() directly in | 778 # pats/include/exclude are passed to match.match() directly in |
779 # _matchfiles() revset but walkchangerevs() builds its matcher with | 779 # _matchfiles() revset, but a log-like command should build its matcher |
780 # scmutil.match(). The difference is input pats are globbed on | 780 # with scmutil.match(). The difference is input pats are globbed on |
781 # platforms without shell expansion (windows). | 781 # platforms without shell expansion (windows). |
782 wctx = repo[None] | 782 wctx = repo[None] |
783 match, pats = scmutil.matchandpats(wctx, wopts.pats, wopts.opts) | 783 match, pats = scmutil.matchandpats(wctx, wopts.pats, wopts.opts) |
784 slowpath = match.anypats() or ( | 784 slowpath = match.anypats() or ( |
785 not match.always() and wopts.force_changelog_traversal | 785 not match.always() and wopts.force_changelog_traversal |
905 b'prune': wopts.prune_ancestors, | 905 b'prune': wopts.prune_ancestors, |
906 b'user': wopts.users, | 906 b'user': wopts.users, |
907 } | 907 } |
908 | 908 |
909 if wopts.filter_revisions_by_pats and slowpath: | 909 if wopts.filter_revisions_by_pats and slowpath: |
910 # See walkchangerevs() slow path. | |
911 # | |
912 # pats/include/exclude cannot be represented as separate | 910 # pats/include/exclude cannot be represented as separate |
913 # revset expressions as their filtering logic applies at file | 911 # revset expressions as their filtering logic applies at file |
914 # level. For instance "-I a -X b" matches a revision touching | 912 # level. For instance "-I a -X b" matches a revision touching |
915 # "a" and "b" while "file(a) and not file(b)" does | 913 # "a" and "b" while "file(a) and not file(b)" does |
916 # not. Besides, filesets are evaluated against the working | 914 # not. Besides, filesets are evaluated against the working |