Tracking /etc with Mercurial

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Tue Nov 27 12:25:01 UTC 2007


Yannick Gingras <ygingras at ygingras.net> writes:

> Anyone tried to track /etc with Mercurial?

I do it on all machines I administer.

> I ran into a few minor problems, like the need to override HGUSER
> while root,

I never did it, mercurial commits changes as root at localhost what is
fine for me.

> I use a self contained script to install Mercurial and to hook the
> /etc repo into apt like Michael Prokop does:

I never considered hooking mercurial in any way, maybe because I
prefer to review any changes made by installers before commiting
them...

> Are there other gotchas that I might have overlooked?

There are some files which one should rather left non versioned.  Like
localtime, mtab, ld.so.cache, lvmtab, aliases.db,
console/boottime.kmap.gz, any supervise dirs in case you use runit,
any *.lock files... In general - files which should probably rather be
in /var, but are in /etc/ for one reason or another, and which you
should never revert, restore removed etc as they reflect the current
system status or are built from some other files.

(at the same time versioning links in rc*.d or in alternatives works
great and is very useful)


-- 
----------------------------------------------------------------------
| Marcin Kasperski   | The cost of a few uncorrected non-critical
| http://mekk.waw.pl | human errors is less then the cost imposed
|                    |  by a process that tries to prevent them.
|                    |           (Booch,Martin,Newkirk)
----------------------------------------------------------------------




More information about the Mercurial mailing list