comparison mercurial/match.py @ 33478:cf15c3cc304c

match: make base matcher return True for visitdir If a matcher doesn't implement visitdir, we should be returning True so that tree traversals are not prematurely pruned. The old value of False would prevent tree traversals when using any matcher that didn't implement visitdir. Differential Revision: https://phab.mercurial-scm.org/D83
author Durham Goode <durham@fb.com>
date Fri, 14 Jul 2017 10:57:36 -0700
parents 04be8aec44a8
children 80e1331a7fe9
comparison
equal deleted inserted replaced
33477:cc4632679cf9 33478:cf15c3cc304c
303 the given directory should be visited. 303 the given directory should be visited.
304 304
305 This function's behavior is undefined if it has returned False for 305 This function's behavior is undefined if it has returned False for
306 one of the dir's parent directories. 306 one of the dir's parent directories.
307 ''' 307 '''
308 return False 308 return True
309 309
310 def always(self): 310 def always(self):
311 '''Matcher will match everything and .files() will be empty -- 311 '''Matcher will match everything and .files() will be empty --
312 optimization might be possible.''' 312 optimization might be possible.'''
313 return False 313 return False