[PATCH 5 of 7] largefiles: avoid match.files() in conditions

Augie Fackler raf at durin42.com
Tue May 26 10:56:49 CDT 2015


> On May 26, 2015, at 11:30, Martin von Zweigbergk <martinvonz at google.com> wrote:
> 
> 
> 
> On Tue, May 26, 2015 at 7:40 AM Augie Fackler <raf at durin42.com> wrote:
> On Thu, May 21, 2015 at 04:32:32PM -0500, Martin von Zweigbergk wrote:
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz at google.com>
> > # Date 1432066101 25200
> > #      Tue May 19 13:08:21 2015 -0700
> > # Node ID 769c0f5320b6eed726b54cad7623ff078ae80677
> > # Parent  d2aad10416bb2b08587f7d55cbe9e1f934b3de9e
> > largefiles: avoid match.files() in conditions
> >
> > See 9789b4a7c595 (match: introduce boolean prefix() method,
> > 2014-10-28) for reasons to avoid match.files() in conditions.
> 
> Is this commit message correct? It looks more like this is avoiding an
> unsafe default value?
> 
> It is correct, but yes, I noticed it also avoids an unsafe value (the "opts" is still unsafe). The pats that get passed are from a "match.files()", and the goal is to avoid using bool(match.files()). When we no longer do that, we can let match.files() be an empty list when that makes sense.
> 
> Since it was a little confusing, do you think I should send another patch that removes the unsafe default value(s) first and then send a V2 of this patch?

SGTM. Make it so.


More information about the Mercurial-devel mailing list