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,13 +383,18 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 | |
386 |
|
|
388 | not self._excluderoots and | |
387 |
dir |
|
389 | dir in self._includeroots): | |
388 | not any(parent in self._includeroots |
|
390 | # The condition above is essentially self.prefix() for includes | |
389 | for parent in util.finddirs(dir))): |
|
391 | return 'all' | |
390 | return False |
|
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 | return (not self._fileset or |
|
398 | return (not self._fileset or | |
392 | '.' in self._fileset or |
|
399 | '.' in self._fileset or | |
393 | dir in self._fileset or |
|
400 | dir in self._fileset or |
General Comments 0
You need to be logged in to leave comments.
Login now