View previous topic :: View next topic |
Author |
Message |
exif n00b
Joined: 07 Jul 2008 Posts: 57 Location: Waterloo, ON, Canada
|
Posted: Mon Jul 07, 2008 4:46 pm Post subject: SVN for config files |
|
|
I've been considering using SVN to version and track various config files. Is there an issue anyone can think of why it wouldn't be a good idea? I'll be making the repository readable only by root for security since most of these config files contain system settings.
If anyone has any suggestions as to other software that might be well suited for this task I'm welcome to suggestions, but I'd prefer a simple solution without a GUI. I've also already looked into CVS and I prefer SVN to it. |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 611 Location: Fife, Scotland
|
Posted: Mon Jul 07, 2008 8:06 pm Post subject: |
|
|
I've been experimenting with Mercurial for this. Its a fairly simple distributed VCS, easy to set up and use.
Create minimal ~/.hgrc to provide the checkin details and enable the repo viewer:
Code: |
[ui]
username=Your Name <email@address>
[extensions]
hgk=
|
Thats the hard bit over with.
Create the repository:
Code: |
# cd /etc
# hg init
# hg add
# hg commit -m"Initial copy"
|
The repository is now in /etc/.hg - that might be ok, or you might want a copy somewhere else as well (i.e. away from /etc):
Code: |
# hg clone /etc /somewhere/else
|
Later, to find out whats changed since the last commit:
Code: |
# cd /etc
# hg status
also
# hg diff
...
|
Also, Meld can do visual diffs for Mercurial repositories.
Update the repository with current status (the -A makes it add and remove files to the repo, to match the current status of the directory):
Code: |
# cd /etc
# hg commit -A -m"Something changed"
|
Update the other copy of the repository:
Code: |
# cd /etc
# hg push /somewhere/else
|
Whats been going on:
Code: |
# cd /etc
# hg view
|
And if you decide not to take it any further:
Code: |
# rm -Rf /etc/.hg (be careful with this one!)
# rm -Rf /somewhere/else
# emerge --unmerge mercurial
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|