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