[PATCH 7 of 7] manifest: use match.prefix() instead of 'not match.anypats()'

Augie Fackler raf at durin42.com
Tue May 26 09:41:44 CDT 2015


On Thu, May 21, 2015 at 04:32:34PM -0500, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # 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()'

I've queued 1-4, 6, and 7. Will hold 5 until I get confirmation about
the commit message confusion on my end.

>
> 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.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list