# HG changeset patch # User Matt Harbison # Date 2020-12-03 06:45:23 # Node ID 1f0ed7e63c2ad0da2dc4846d25192db73fce457b # Parent 88de2639901b7983a8ba104865fcc4f77699ebfc formatting: re-blacken match.py Differential Revision: https://phab.mercurial-scm.org/D9512 diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -575,7 +575,7 @@ def path_or_parents_in_set(path, prefix_ # directory hierarchies are relatively shallow and hash lookup is cheap. if l > 5: return any( - parentdir in prefix_set for parentdir in pathutil.finddirs(path) + parentdir in prefix_set for parentdir in pathutil.finddirs(path) ) # FIXME: Ideally we'd never get to this point if this is the case - we'd @@ -640,10 +640,7 @@ class patternmatcher(basematcher): def visitdir(self, dir): if self._prefix and dir in self._fileset: return b'all' - return ( - dir in self._dirs - or path_or_parents_in_set(dir, self._fileset) - ) + return dir in self._dirs or path_or_parents_in_set(dir, self._fileset) def visitchildrenset(self, dir): ret = self.visitdir(dir)