hgignore or other tricks to not cross mount points?

Mike Gerdts mgerdts at gmail.com
Fri Jul 17 15:32:50 CDT 2009


On Fri, Jul 17, 2009 at 1:42 PM, Matt Mackall<mpm at selenic.com> wrote:
> On Fri, 2009-07-17 at 13:26 -0500, Mike Gerdts wrote:
>> I've found mercurial to be rather handy for keeping track of config
>> file changes on unix boxes.  Ideally all config files should be under
>> /etc, but it doesn't always work out that way.  This suggests the need
>> for rooting the repository at /.  This in itself works fine, but it is
>> rather tedious to maintain /.hgignore to exclude any place that
>> someone may mount up an NFS file system, loopback mount, or some sort
>> of removable disk.
>>
>> Are there any tricks available to make it so that "hg status", "hg
>> addremove", etc. do not cross mount points?  Alternatively, is there a
>> mechanism with .hgignore to ignore all but a certain set of
>> directories?
>
> The usual trick is to ignore all and add only what you want.
>
> Another possibility is to move all the interesting files under /etc and
> use symlinks.

These were pretty much in line with the options that I had already
considered.  The other place that I am concerned about is
/var/spool/cron/crontabs/, which doesn't really take kindly to
symlinks.  There are a couple others scattered in subdirectories of
/var as well.  However, it wouldn't be that bad to just have two
different repos - one in /etc and one in /var.  It is extremely
unlikely that I will see NFS mounts under those directories.  The
other things that I don't care to track in subdirectories of /var and
/etc are pretty easy to exclude.

I had also received other feedback off-list pointing to
http://mercurial.selenic.com/wiki/TrackingEtcEtc.  For some reason I
missed this in my searches before posting.

Thanks much for the replies.

Mike

-- 
Mike Gerdts
http://mgerdts.blogspot.com/



More information about the Mercurial mailing list