fsmonitor: use modern match API
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 17 May 2017 23:54:43 -0700
changeset 32361 7df259077d4b
parent 32360 0e29ce16ec38
child 32362 23c9a2a71c6e
fsmonitor: use modern match API It seems like fsmonitor/__init__.py was based on a pretty old version of dirstate.py. Let's copy over the changes from the following two commits: 55c449345b10 (match: add isexact() method to hide internals, 2014-10-29) 3c346969c321 (dirstate: avoid match.files() in walk(), 2015-05-19)
hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py	Wed May 17 20:51:17 2017 -0500
+++ b/hgext/fsmonitor/__init__.py	Wed May 17 23:54:43 2017 -0700
@@ -253,10 +253,10 @@
     fresh_instance = False
 
     exact = skipstep3 = False
-    if matchfn == match.exact:  # match.exact
+    if match.isexact():  # match.exact
         exact = True
         dirignore = util.always  # skip step 2
-    elif match.files() and not match.anypats():  # match.match, no patterns
+    elif match.prefix():  # match.match, no patterns
         skipstep3 = True
 
     if not exact and self._checkcase: