SubVersion? is an increasingly popular substitute for CVS. One very useful application is to track changes to your local configuration files, which lets you:
| ||||||||
| Line: 35 to 35 | ||||||||
|---|---|---|---|---|---|---|---|---|
# svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts # svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost | ||||||||
| Changed: | ||||||||
| < < |
# cd /etc # svn import -N file:///var/svn/hosts/chmost/etc etc | |||||||
| > > |
# svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost/etc # svn checkout file:///var/svn/hosts/chmost/etc . | |||||||
| That's all there is to it. Now you can use the full suite of SubVersion? commands to add, rename, and annotate files. | ||||||||
SubVersion? is an increasingly popular substitute for CVS. One very useful application is to track changes to your local configuration files, which lets you:
| ||||||||
| Line: 35 to 35 | ||||||||
|---|---|---|---|---|---|---|---|---|
# svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts # svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost | ||||||||
| Changed: | ||||||||
| < < |
# svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost/etc
# cd / # svn co file:///var/svn/hosts/web2/etc etc-svn # mv /etc-svn/.svn /etc # rm -r /etc-svn | |||||||
| > > |
# cd /etc # svn import -N file:///var/svn/hosts/chmost/etc etc | |||||||
| That's all there is to it. Now you can use the full suite of SubVersion? commands to add, rename, and annotate files. | ||||||||
SubVersion? is an increasingly popular substitute for CVS. One very useful application is to track changes to your local configuration files, which lets you:
| ||||||||||
| Line: 41 to 41 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
# cd / # svn co file:///var/svn/hosts/web2/etc etc-svn | ||||||||||
| Changed: | ||||||||||
| < < |
# rsync -av etc/ etc-svn/
# mv /etc /etc-old
# mv /etc-svn /etc
# diff -ur /etc-old /etc Only in /etc: .svn | |||||||||
| > > |
# mv /etc-svn/.svn /etc # rm -r /etc-svn | |||||||||
| That's all there is to it. Now you can use the full suite of SubVersion? commands to add, rename, and annotate files. -- KirkStrauser - 16 Feb 2004 | ||||||||||
| Added: | ||||||||||
| > > |
-- TWikiGuest - 05 May 2004 (ads@debian.org) | |||||||||
| ||||||||||
| Line: 1 to 1 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||||
| > > |
SubVersion? is an increasingly popular substitute for CVS. One very useful application is to track changes to your local configuration files, which lets you:
Make your SubVersion? repository
# svnadmin create /var/svn Import your configuration filesImporting an entire directory into SubVersion? is easy and well documented elsewhere. Instead, I'm more interested in tracking only the files that actually get modified locally. For example, on a normal FreeBSD system, the wide majority of files in/etc are copied straight from the master FreeBSD CVS repository without any modification, so tracking those files is highly redundant. Furthermore, managing a few hundred generic files can bury your own interesting changes under a mountain of "diff"s. So, then, the following is a demonstration of how to put a certain directory under VersionControl? without using SubVersion?'s own import command to slurp in the whole thing.
For our examples, assume:
# svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts # svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost # svn -m "Making CM subdirectories" mkdir file:///var/svn/hosts/cmhost/etc
# cd / # svn co file:///var/svn/hosts/web2/etc etc-svn # rsync -av etc/ etc-svn/ # mv /etc /etc-old # mv /etc-svn /etc
# diff -ur /etc-old /etc Only in /etc: .svnThat's all there is to it. Now you can use the full suite of SubVersion? commands to add, rename, and annotate files. -- KirkStrauser - 16 Feb 2004
| |||||||||