Show More
@@ -145,9 +145,9 b' def match(root, cwd, patterns, include=N' | |||||
145 | if exact: |
|
145 | if exact: | |
146 | m = exactmatcher(root, cwd, patterns, badfn) |
|
146 | m = exactmatcher(root, cwd, patterns, badfn) | |
147 | elif patterns: |
|
147 | elif patterns: | |
148 | m = patternmatcher(root, cwd, normalize, patterns, default=default, |
|
148 | kindpats = normalize(patterns, default, root, cwd, auditor, warn) | |
149 | auditor=auditor, ctx=ctx, listsubrepos=listsubrepos, |
|
149 | m = patternmatcher(root, cwd, kindpats, ctx=ctx, | |
150 |
|
|
150 | listsubrepos=listsubrepos, badfn=badfn) | |
151 | else: |
|
151 | else: | |
152 | # It's a little strange that no patterns means to match everything. |
|
152 | # It's a little strange that no patterns means to match everything. | |
153 | # Consider changing this to match nothing (probably adding a |
|
153 | # Consider changing this to match nothing (probably adding a | |
@@ -155,14 +155,14 b' def match(root, cwd, patterns, include=N' | |||||
155 | m = alwaysmatcher(root, cwd, badfn) |
|
155 | m = alwaysmatcher(root, cwd, badfn) | |
156 |
|
156 | |||
157 | if include: |
|
157 | if include: | |
158 | im = includematcher(root, cwd, normalize, include, auditor=auditor, |
|
158 | kindpats = normalize(include, 'glob', root, cwd, auditor, warn) | |
159 | ctx=ctx, listsubrepos=listsubrepos, warn=warn, |
|
159 | im = includematcher(root, cwd, kindpats, ctx=ctx, | |
160 | badfn=None) |
|
160 | listsubrepos=listsubrepos, badfn=None) | |
161 | m = intersectmatchers(m, im) |
|
161 | m = intersectmatchers(m, im) | |
162 | if exclude: |
|
162 | if exclude: | |
163 | em = includematcher(root, cwd, normalize, exclude, auditor=auditor, |
|
163 | kindpats = normalize(exclude, 'glob', root, cwd, auditor, warn) | |
164 | ctx=ctx, listsubrepos=listsubrepos, warn=warn, |
|
164 | em = includematcher(root, cwd, kindpats, ctx=ctx, | |
165 | badfn=None) |
|
165 | listsubrepos=listsubrepos, badfn=None) | |
166 | m = differencematcher(m, em) |
|
166 | m = differencematcher(m, em) | |
167 | return m |
|
167 | return m | |
168 |
|
168 | |||
@@ -338,12 +338,10 b' class alwaysmatcher(basematcher):' | |||||
338 |
|
338 | |||
339 | class patternmatcher(basematcher): |
|
339 | class patternmatcher(basematcher): | |
340 |
|
340 | |||
341 |
def __init__(self, root, cwd, |
|
341 | def __init__(self, root, cwd, kindpats, ctx=None, listsubrepos=False, | |
342 | auditor=None, ctx=None, listsubrepos=False, warn=None, |
|
|||
343 | badfn=None): |
|
342 | badfn=None): | |
344 | super(patternmatcher, self).__init__(root, cwd, badfn) |
|
343 | super(patternmatcher, self).__init__(root, cwd, badfn) | |
345 |
|
344 | |||
346 | kindpats = normalize(patterns, default, root, cwd, auditor, warn) |
|
|||
347 | if not _kindpatsalwaysmatch(kindpats): |
|
345 | if not _kindpatsalwaysmatch(kindpats): | |
348 | self._files = _explicitfiles(kindpats) |
|
346 | self._files = _explicitfiles(kindpats) | |
349 | self._anypats = _anypats(kindpats) |
|
347 | self._anypats = _anypats(kindpats) | |
@@ -383,11 +381,10 b' class patternmatcher(basematcher):' | |||||
383 |
|
381 | |||
384 | class includematcher(basematcher): |
|
382 | class includematcher(basematcher): | |
385 |
|
383 | |||
386 |
def __init__(self, root, cwd, |
|
384 | def __init__(self, root, cwd, kindpats, ctx=None, listsubrepos=False, | |
387 |
|
|
385 | badfn=None): | |
388 | super(includematcher, self).__init__(root, cwd, badfn) |
|
386 | super(includematcher, self).__init__(root, cwd, badfn) | |
389 |
|
387 | |||
390 | kindpats = normalize(include, 'glob', root, cwd, auditor, warn) |
|
|||
391 | self.includepat, im = _buildmatch(ctx, kindpats, '(?:/|$)', |
|
388 | self.includepat, im = _buildmatch(ctx, kindpats, '(?:/|$)', | |
392 | listsubrepos, root) |
|
389 | listsubrepos, root) | |
393 | self._anypats = _anypats(kindpats) |
|
390 | self._anypats = _anypats(kindpats) |
General Comments 0
You need to be logged in to leave comments.
Login now