RFC: Transparent subrepository support by match module

Martin Geisler mg at lazybytes.net
Wed Aug 18 10:50:57 UTC 2010


Didly Bom <didlybom at gmail.com> writes:

> On Wed, Aug 18, 2010 at 9:59 AM, Martin Geisler <mg at lazybytes.net> wrote:
>
>> So perhaps one could extend the '**' and '*' glob operators by adding
>> a lazy forms: '**?' and '*?' which then wont expand across
>> subrepository boundaries. This is inspired by regexps where the '*?'
>> is a non-greedy version of the '*' character.
>
> I like this idea. It seems powerful yet easy to understand.

I just had a better idea:

- "*" matches all characters except "/"
- "**" matches all characters including "/", but stops at subrepos
- "***" matches everything

That is fairly backwards compatible and does not reuse the "?" character
which already has its own meaning in shell globs.

I've looked at the path auditor today and the match code, and though
this idea is cute, I'm unsure how easy it will be to implement since the
match module by design does not know anything about the repository.

> Would this also work for subrepos within subrepos?

Yeah, I would think so.

> In any case, I would also like to have a "--no-recurse flag" that
> could be used for the most common case in which you simply do not want
> to commit any of the subrepos.

Yes, I think this is an important special case.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20100818/8b033311/attachment.asc>


More information about the Mercurial-devel mailing list