Show More
@@ -307,6 +307,7 b' class matcher(basematcher):' | |||||
307 | exclude = [] |
|
307 | exclude = [] | |
308 |
|
308 | |||
309 | self._anypats = bool(include or exclude) |
|
309 | self._anypats = bool(include or exclude) | |
|
310 | self._anyincludepats = False | |||
310 | self._always = False |
|
311 | self._always = False | |
311 | self._pathrestricted = bool(include or exclude or patterns) |
|
312 | self._pathrestricted = bool(include or exclude or patterns) | |
312 | self.patternspat = None |
|
313 | self.patternspat = None | |
@@ -324,6 +325,7 b' class matcher(basematcher):' | |||||
324 | kindpats = normalize(include, 'glob', root, cwd, auditor, warn) |
|
325 | kindpats = normalize(include, 'glob', root, cwd, auditor, warn) | |
325 | self.includepat, im = _buildmatch(ctx, kindpats, '(?:/|$)', |
|
326 | self.includepat, im = _buildmatch(ctx, kindpats, '(?:/|$)', | |
326 | listsubrepos, root) |
|
327 | listsubrepos, root) | |
|
328 | self._anyincludepats = _anypats(kindpats) | |||
327 | roots, dirs = _rootsanddirs(kindpats) |
|
329 | roots, dirs = _rootsanddirs(kindpats) | |
328 | self._includeroots.update(roots) |
|
330 | self._includeroots.update(roots) | |
329 | self._includedirs.update(dirs) |
|
331 | self._includedirs.update(dirs) | |
@@ -381,8 +383,13 b' class matcher(basematcher):' | |||||
381 | return 'all' |
|
383 | return 'all' | |
382 | if dir in self._excluderoots: |
|
384 | if dir in self._excluderoots: | |
383 | return False |
|
385 | return False | |
384 |
if |
|
386 | if self._includeroots or self._includedirs: | |
385 |
|
|
387 | if (not self._anyincludepats and | |
|
388 | not self._excluderoots and | |||
|
389 | dir in self._includeroots): | |||
|
390 | # The condition above is essentially self.prefix() for includes | |||
|
391 | return 'all' | |||
|
392 | if ('.' not in self._includeroots and | |||
386 | dir not in self._includeroots and |
|
393 | dir not in self._includeroots and | |
387 | dir not in self._includedirs and |
|
394 | dir not in self._includedirs and | |
388 | not any(parent in self._includeroots |
|
395 | not any(parent in self._includeroots |
General Comments 0
You need to be logged in to leave comments.
Login now