Show More
@@ -899,7 +899,6 b' def _matchfiles(repo, subset, x):' | |||
|
899 | 899 | # i18n: "_matchfiles" is a keyword |
|
900 | 900 | l = getargs(x, 1, -1, _("_matchfiles requires at least one argument")) |
|
901 | 901 | pats, inc, exc = [], [], [] |
|
902 | hasset = False | |
|
903 | 902 | rev, default = None, None |
|
904 | 903 | for arg in l: |
|
905 | 904 | # i18n: "_matchfiles" is a keyword |
@@ -926,21 +925,14 b' def _matchfiles(repo, subset, x):' | |||
|
926 | 925 | else: |
|
927 | 926 | # i18n: "_matchfiles" is a keyword |
|
928 | 927 | raise error.ParseError(_('invalid _matchfiles prefix: %s') % prefix) |
|
929 | if not hasset and matchmod.patkind(value) == 'set': | |
|
930 | hasset = True | |
|
931 | 928 | if not default: |
|
932 | 929 | default = 'glob' |
|
933 | 930 | |
|
931 | m = matchmod.match(repo.root, repo.getcwd(), pats, include=inc, | |
|
932 | exclude=exc, ctx=repo[rev], default=default) | |
|
933 | ||
|
934 | 934 | def matches(x): |
|
935 | m = None | |
|
936 | c = repo[x] | |
|
937 | if not m or (hasset and rev is None): | |
|
938 | ctx = c | |
|
939 | if rev is not None: | |
|
940 | ctx = repo[rev or None] | |
|
941 | m = matchmod.match(repo.root, repo.getcwd(), pats, include=inc, | |
|
942 | exclude=exc, ctx=ctx, default=default) | |
|
943 | for f in c.files(): | |
|
935 | for f in repo[x].files(): | |
|
944 | 936 | if m(f): |
|
945 | 937 | return True |
|
946 | 938 | return False |
General Comments 0
You need to be logged in to leave comments.
Login now