[PATCH 5 of 7] match: resolve 'set:' patterns first in _buildmatch()

Yuya Nishihara yuya at tcha.org
Fri Jul 6 08:19:49 EDT 2018


On Thu, 5 Jul 2018 11:42:05 -0700, Martin von Zweigbergk wrote:
> On Thu, Jul 5, 2018 at 7:15 AM Yuya Nishihara <yuya at tcha.org> wrote:
> 
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1528613547 -32400
> > #      Sun Jun 10 15:52:27 2018 +0900
> > # Node ID c81f8e935af38b19a2004fb507bcf74783b0db06
> > # Parent  eca5e10e8949810dc00b01bc84566393bba2bfae
> > match: resolve 'set:' patterns first in _buildmatch()
> >
> > This just makes the next patch less complicated. The order of 'set:' and
> > 'subinclude:' expansion doesn't matter.
> >
> 
> How about if you subinclude a file that has a fileset in it? Is that not
> possible because 'subinclude:' can only be used in .hgignore files and
> 'set:' cannot be used there? Or why does the order not matter?

The order doesn't matter since _expandsubinclude() does NOT expand subinclude
patterns into the kindpats list. Basically subinclude patterns are fed back to
match.match() as include=['include:<file>']. And the 'include:' doesn't support
'set:' anyway as you mentioned.


More information about the Mercurial-devel mailing list