##// END OF EJS Templates
match: drop optimization (?) of 'parentdirs' calculation...
Martin von Zweigbergk -
r25577:a410479c default
parent child Browse files
Show More
@@ -224,19 +224,18 b' class match(object):'
224 '''
224 '''
225 if dir in self._excluderoots:
225 if dir in self._excluderoots:
226 return False
226 return False
227 parentdirs = None
228 if (self._includeroots and
227 if (self._includeroots and
229 dir not in self._includeroots and
228 dir not in self._includeroots and
230 dir not in self._includedirs):
229 dir not in self._includedirs):
231 parentdirs = list(util.finddirs(dir))
230 if not any(parent in self._includeroots
232 if not any(parent in self._includeroots for parent in parentdirs):
231 for parent in util.finddirs(dir)):
233 return False
232 return False
234 return (not self._fileroots or
233 return (not self._fileroots or
235 '.' in self._fileroots or
234 '.' in self._fileroots or
236 dir in self._fileroots or
235 dir in self._fileroots or
237 dir in self._dirs or
236 dir in self._dirs or
238 any(parentdir in self._fileroots
237 any(parentdir in self._fileroots
239 for parentdir in parentdirs or util.finddirs(dir)))
238 for parentdir in util.finddirs(dir)))
240
239
241 def exact(self, f):
240 def exact(self, f):
242 '''Returns True if f is in .files().'''
241 '''Returns True if f is in .files().'''
General Comments 0
You need to be logged in to leave comments. Login now