Ignoring (certain) symlinks

Greg Ward greg-hg at gerg.ca
Tue Jul 7 13:57:27 CDT 2009


On Tue, Jul 7, 2009 at 1:20 PM, Ry4an Brase<ry4an-hg at ry4an.org> wrote:
> On Mon, Jul 06, 2009 at 02:54:41PM -0400, Greg Ward wrote:
>> 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.

I did consider it and immediately rejected it.  One of the most common
causes of failed builds around here is people forgetting to commit new
source files.  If that new *.java source file doesn't show up in "hg
status", then that will be a regression relative to CVS, and we'll
have more failed builds.

> 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 would actually consider ignoring **.jar: there are only a handful of
jar files under source control, and they are limited to two particular
locations in the tree.  It's just a question of cost vs benefit and
likely frequency of errors.

Greg



More information about the Mercurial mailing list