[PATCH 2 of 3] revert: rename working directory matcher 'm' -> 'wmatch'

Matt Mackall mpm at selenic.com
Thu Mar 26 16:09:13 CDT 2015


On Thu, 2015-03-26 at 00:20 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1427333998 14400
> #      Wed Mar 25 21:39:58 2015 -0400
> # Node ID 781d27e7fcd3a438d02bf2e1a9ba0a85537da6b9
> # Parent  6e1b26088b8eca13825a91e4e1e3547c2e89f6a0
> revert: rename working directory matcher 'm' -> 'wmatch'
> 
> Further down in the function, 'm' is reassigned to a matcher for a list of
> files.  At the bottom of the function, another matcher is created to figure out
> what subrepos need to be reverted.  For consistency with 5b85a5bc5bbb, this will
> be changed to a working directory matcher.

Not sure about this one. The first use of 'm' here is the standard "make
a matcher from the supplied args" pattern and the second definition
appears to have very limited use.

It seems the shadowing here is kind of intentional: we're making a more
narrower version of the initial match that should be used for the rest
of the function. So perhaps we should instead be moving the subrepo set
calculation higher up instead of doing any renaming?

But really, your patch 3 would actually be _simpler_ as a patch 2 that
just did s/ctx/wctx/ locally, right? I'll just do that for now. Patch 1
and 3' queued, thanks.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list