[PATCH] match: visit directory 'foo' when given e.g. '-X foo/ba?'

Martin von Zweigbergk martinvonz at google.com
Wed May 27 22:30:35 CDT 2015


Hmm, somehow I seem to have failed to mention that it only applies to tree
manifests, since the problem is in visitdir, which is only used by tree
manifests. Do I don't think it belongs on stable, but I'll resend with an
updated description.

On Wed, May 27, 2015, 19:41 Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

>
>
> On 05/27/2015 03:16 PM, Martin von Zweigbergk wrote:
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz at google.com>
> > # Date 1432748644 25200
> > #      Wed May 27 10:44:04 2015 -0700
> > # Node ID 39829cc793a5df9d598b81eb2c62ef50da50f16a
> > # Parent  6ac860f700b5cfeda232d5305963047696b869ca
> > match: visit directory 'foo' when given e.g. '-X foo/ba?'
> >
> > For globs like 'foo/ba?', _roots() will return 'foo'. Since visitdir
> > excludes directories in the excluded roots, it would skip the entire
> > foo directory, which is incorrect, since 'foo/ba?' doesn't mean that
> > everything in foo/ should be exluded. Fix by only adding roots to the
> > set of excluded roots if there are no excluded patterns.
> >
> > Since 'glob' is the default pattern type for globs, we also need to
> > update some -X patterns in the tests to be of 'path' type to take
> > advantage of the visitdir tricks. For consistency, also update the -I
> > patterns.
> >
> > It seems a little unfortunate that 'foo' in 'hg files -X foo' is
> > considered a pattern because of the implied 'glob' type, but improving
> > that is left for another day.
>
> You description sounds like a bug report. Shoud this be on stable?
>
> --
> Pierre-Yves David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150528/b3891da9/attachment.html>


More information about the Mercurial-devel mailing list