Ignoring (certain) symlinks

Ry4an Brase ry4an-hg at ry4an.org
Tue Jul 7 12:20:33 CDT 2009


On Mon, Jul 06, 2009 at 02:54:41PM -0400, Greg Ward wrote:
> That leaves ~71,000 unknown files that are not easily captured by
> filename patterns.  However, ~68,500 of those unknown files are easily
> distinguished by code: they are relative symlinks to Java source
> files.  I.e. the link matches *.java and readlink() returns a string
> matching "../*/*.java".
> 
> There's no easy way to do this in .hgignore, since unfortunately a
> great many of those 68,500 symlinks are jumbled in with regular source
> files.  (Also our Java package-space is wildly inconsistent, so
> there's no easy way to distinguish things at that level either.)

Greg, it's sub-optimal, but have you considered putting the '*.java'
pattern in your .hgingore and then explicitly adding the .java files you
do want?  The drawback, of course being, that people won't see new .java
files in 'hg stat' as unadded files, but they can always add them
specifically and override the .hgignore.

In our tree we've got a lot of .jar files we don't want tracked, and
many that we do, so we've got "*.jar" in our hg ignore, and just
manually added the .jar files we do want.

I see you've got an extension based fix, but the
overriding-ignores-with-adds is non-obvious (to me), and I wanted to
make sure you'd considered it.

-- 
Ry4an Brase - http://ry4an.org/


More information about the Mercurial mailing list