Including other .hgignore files via wildcards

David Demelier markand at malikania.fr
Wed Jun 6 07:40:14 UTC 2018


On Sun, 2018-06-03 at 02:17 -0400, Ross Goldberg wrote:
> I'd like to other .hgignore files via wildcards, like using:
> 
> include:hgignore//**/*.hgignore
> 
> to include all files whose name ends with .hgignore in hgignore/ or
> any of its descendent directories.
> 
> Is this possible?
> 

I am not very fan of this, it could lead to potential infinite
recursion. It can also conflicts with files/directories named like
this.

If you wannt to make local hgignore it's possible by setting the local
.hg/hgrc file from the repository to include other .hgignore files
though:

    $ cat .hg/hgrc
    [ui]
    ignore.foo = .hg/ignore.foo
    ignore.bar = .hg/ignore.bar

Then, you can fill .hg/ignore.foo and .hg/ignore.bar with anything you
want.

HTH,

Regards,

-- 
David



More information about the Mercurial mailing list