mercurial/match.py
changeset 33378 adf95bfb423a
parent 33358 38b6122df5c7
child 33379 7ddb2aa2b7af
equal deleted inserted replaced
33377:5d63e5f40bea 33378:adf95bfb423a
   344 class nevermatcher(basematcher):
   344 class nevermatcher(basematcher):
   345     '''Matches nothing.'''
   345     '''Matches nothing.'''
   346 
   346 
   347     def __init__(self, root, cwd, badfn=None):
   347     def __init__(self, root, cwd, badfn=None):
   348         super(nevermatcher, self).__init__(root, cwd, badfn)
   348         super(nevermatcher, self).__init__(root, cwd, badfn)
       
   349 
       
   350     # It's a little weird to say that the nevermatcher is an exact matcher
       
   351     # or a prefix matcher, but it seems to make sense to let callers take
       
   352     # fast paths based on either. There will be no exact matches, nor any
       
   353     # prefixes (files() returns []), so fast paths iterating over them should
       
   354     # be efficient (and correct).
       
   355     def isexact(self):
       
   356         return True
       
   357 
       
   358     def prefix(self):
       
   359         return True
   349 
   360 
   350     def __repr__(self):
   361     def __repr__(self):
   351         return '<nevermatcher>'
   362         return '<nevermatcher>'
   352 
   363 
   353 class patternmatcher(basematcher):
   364 class patternmatcher(basematcher):