Including other .hgignore files via wildcards
Ross Goldberg
ross.goldberg at gmail.com
Wed Jun 6 08:09:22 UTC 2018
Circular single-file .hgignore includes currently result in an error, so
the only additional issues seem to me to be circular directory symlinks,
and the increased likelihood of including .hginore files that include each
other. These could both be solved by remembering the canonical path of
every directory & .hgignore file that's already been processed for
hgignore, and to skip reading anything more than once. This would also
solve the existing issue of circular .hgignore includes.
On Wed, Jun 6, 2018 at 3:40 AM, David Demelier <markand at malikania.fr> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20180606/b8c41f83/attachment-0002.html>
More information about the Mercurial
mailing list