mercurial/match.py
changeset 25576 d02f4b3e71f5
parent 25575 475eae3497af
child 25577 a410479c7ee7
--- a/mercurial/match.py	Wed May 27 13:23:35 2015 -0700
+++ b/mercurial/match.py	Wed May 27 09:34:00 2015 -0700
@@ -225,13 +225,16 @@
         if dir in self._excluderoots:
             return False
         parentdirs = None
-        if (self._includeroots and dir not in self._includeroots and
-                dir not in self._includedirs):
+        if (self._includeroots and
+            dir not in self._includeroots and
+            dir not in self._includedirs):
             parentdirs = list(util.finddirs(dir))
             if not any(parent in self._includeroots for parent in parentdirs):
                 return False
-        return (not self._fileroots or '.' in self._fileroots or
-                dir in self._fileroots or dir in self._dirs or
+        return (not self._fileroots or
+                '.' in self._fileroots or
+                dir in self._fileroots or
+                dir in self._dirs or
                 any(parentdir in self._fileroots
                     for parentdir in parentdirs or util.finddirs(dir)))