# HG changeset patch # User Martin von Zweigbergk # Date 1433103461 25200 # Node ID 4b1ec70b9713a51af8b336af863fa54daacb623c # Parent a410479c7ee7a1aac85e5d5dfa9eda6532ab1254 match: join two nested if-blocks Instead of if a: if b: return False let's write it if a and b: return False diff -r a410479c7ee7 -r 4b1ec70b9713 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