match: join two nested if-blocks
authorMartin von Zweigbergk <martinvonz@google.com>
Sun, 31 May 2015 13:17:41 -0700
changeset 25578 4b1ec70b9713
parent 25577 a410479c7ee7
child 25579 b76410eed482
match: join two nested if-blocks Instead of if a: if b: return False let's write it if a and b: return False
mercurial/match.py
--- a/mercurial/match.py	Wed May 27 11:47:55 2015 -0700
+++ b/mercurial/match.py	Sun May 31 13:17:41 2015 -0700
@@ -226,10 +226,10 @@
             return False
         if (self._includeroots and
             dir not in self._includeroots and
-            dir not in self._includedirs):
-            if not any(parent in self._includeroots
-                       for parent in util.finddirs(dir)):
-                return False
+            dir not in self._includedirs and
+            not any(parent in self._includeroots
+                    for parent in util.finddirs(dir))):
+            return False
         return (not self._fileroots or
                 '.' in self._fileroots or
                 dir in self._fileroots or