[PATCH] Allowing multiple project-specific .hgignore files
Matt Mackall
mpm at selenic.com
Mon Apr 30 04:00:46 UTC 2007
On Mon, Apr 30, 2007 at 12:26:08PM +1000, Stuart wrote:
> On Sun, 2007-04-29 at 21:05 -0500, Matt Mackall wrote:
> > [reply-to set to mercurial-devel, where such things go now]
> >
> > On Mon, Apr 30, 2007 at 10:43:28AM +1000, Stuart wrote:
> > > Hey,
> > >
> > > I've created a patch which allows .hgignore to be either a file (in the
> > > current style) or a directory containing multiple files, all of which
> > > are parsed for ignore patterns.
> >
> > That's kind of neat.
> >
> > It could also be done by adding an include: syntax to .hgignore, which
> > might be more flexible and simpler?
>
> *** I don't think it would be simpler, but it might be slightly more
> flexible.
>
> You could certainly accomplish the same functionality using includes
> (but only if they failed silently). It's probably not as tidy, however.
> If I want to maintain local ignore rules (in a repo where the .hgignore
> file is committed), I have to add an include: directive to bring them
> in. Then, after I commit and push, everyone's repos will be polluted by
> an include: directive that is relevant only to me.
Good points.
Let's explore some other possibilities.
We could have an .hgignore.d/ (no need to move a current .hgignore)
We could have a .hg/localignore (unmanaged)
We could have include: lines
We could have .hgignore-*
I don't really see a use case for more than two .hgignore files (local
and managed), so unless you can think of a good one, .hg/localignore seems
the simplest. Then you don't need an extra ignore rule to ignore it
and it's a good match for .hgtags|.hg/localtags.
(As I've said before, I don't really want per-directory ignore files.
Lots of extra stat()s and we can't compile them.)
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list