mercurial/match.py
changeset 51601 ea3343104f07
parent 51569 b32c3146ec34
child 51603 a2afa35641c9
equal deleted inserted replaced
51600:ee1b648e4453 51601:ea3343104f07
   393     return kindpats
   393     return kindpats
   394 
   394 
   395 
   395 
   396 class basematcher:
   396 class basematcher:
   397     def __init__(self, badfn=None):
   397     def __init__(self, badfn=None):
       
   398         self._was_tampered_with = False
   398         if badfn is not None:
   399         if badfn is not None:
   399             self.bad = badfn
   400             self.bad = badfn
       
   401 
       
   402     def was_tampered_with(self):
       
   403         # [_was_tampered_with] is used to track if when extensions changed the matcher
       
   404         # behavior (crazy stuff!), so we disable the rust fast path.
       
   405         return self._was_tampered_with
   400 
   406 
   401     def __call__(self, fn):
   407     def __call__(self, fn):
   402         return self.matchfn(fn)
   408         return self.matchfn(fn)
   403 
   409 
   404     # Callbacks related to how the matcher is used by dirstate.walk.
   410     # Callbacks related to how the matcher is used by dirstate.walk.