Managing /etc

rich at wittyname.com rich at wittyname.com
Wed May 10 19:26:15 CDT 2006


I've been considering putting /etc (an posibly some other directories) from a
new server of mine into an SCM system in order to document the setup.  I'm a
bit of an SCM neophyte so I've been investigating various systems and Mercurial
seems like a good choice because of its simple interface and serverless
operation.  However, (and I may be wrong) there is at least one problem with my
plan:  Mercurial doesn't seem to track all the file metadata I would like, esp.
owner, group and mode.  Combined with the fact that various operations reset
(eg merge) that information, I'm afraid of messing up my my config or losing
information.

The solution I've been toying with is to use some hooks to add the information I
want to the repository.  On pre-commit I dump the name, own, group and mode of
all files in the repository to a file (eg .hgmeta) and if .hgmeta is not
already part of the repository itself, add it.  That way I have at least a
history of the changes of this data.  I could also throw in a warning about any
changes to ensure they are intentional and not just a side effect of using
Mercurial.

One thing I'm not clear on is what hook I would use to compare the data in
.hgmeta with the current files after an update to make sure all of the
permissions are retained.

Any comments or suggestions?  Am I on crack (probably)?

Thanks,
Rich

PS- Please CC me as I am not subscribed to the list


More information about the Mercurial mailing list