From patchwork Thu May 21 21:32:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7, of, 7] manifest: use match.prefix() instead of 'not match.anypats()' From: Martin von Zweigbergk X-Patchwork-Id: 9227 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 21 May 2015 16:32:34 -0500 # HG changeset patch # User Martin von Zweigbergk # Date 1432059380 25200 # Tue May 19 11:16:20 2015 -0700 # Node ID a29d1e1d2fd02cf09f25ccb26c1ca1cc919e01eb # Parent 57b2ad183735e615d30fce568c3612c83fae4f42 manifest: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't. diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -219,7 +219,7 @@ files instead of over manifest files.''' files = match.files() return (len(files) < 100 and (match.isexact() or - (not match.anypats() and all(fn in self for fn in files)))) + (match.prefix() and all(fn in self for fn in files)))) def walk(self, match): '''Generates matching file names.