|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
Thread Tools | Display Modes |
|
|
|||
Subversion and system files
Hello, I'm on FreeBSD 7.0 and I've installed Subversion with the intention of placing my system files (/etc and /usr/local/etc) under revision control. Can someone give me a clue on how to do this in Subversion? When I create a repository from /etc all I'm doing is taking a copy of those files; when I check them out and edit them I'm just editing the copy, not the actual file in /etc. Can some explain to me how I'm supposed to be doing this, I've never used any type of revision control software before.
Many thanks. |
|
||||
scheme:
- we will create our repository in /root/svnrepo_etc. - /etc will be the working directory. initial setup: - create our svn repo. the svn repository is addressed using a URL. # svnadmin create file:///root/svnrepo_etc - add the config files to the repo. (you can also add files selectively instead of the whole /etc dir.) # svn import /etc file:///root/svnrepo_etc -m "etc repo is born" - make /etc a working copy. (sorry, i can't think of a less convoluted way to do this) # svn checkout --force file:///root/svnrepo_etc /etc ready for action: # svn info # svn log # cd /etc - ok, now lets modify rc.conf # echo "# test" >> rc.conf - check for (as yet uncommited) changes made to the files in /etc # svn status - check what we have modified in rc.conf. (compare working copy with last commited ver.) # svn diff rc.conf - lets now commit rc.conf to the repo. (note: always use good descriptive messages.) # svn commit -m "just testing svn, no real change was commited" rc.conf - check all the revisions of a file # svn log rc.conf - show differences b/w revision 1 and 2 # svn diff -r1:2 rc.conf - show rev. 2 of the file # svn cat -r2 rc.conf | less - go back to revision 1 # svn update -r1 rc.conf - discard as yet uncommited changes # svn revert rc.conf backup strategy: - just save a copy of the /root/svnrepo_etc directory. hopefully this is enough to get you started. further reading: http://svnbook.red-bean.com/en/1.5/index.html Last edited by ephemera; 23rd September 2008 at 05:00 PM. |
|
|||
Thankyou very much ephemera, regarding making /etc the working copy, I did find the following in the subversion FAQ but I don't understand it (which is why I posted on this forum):
Quote:
|
|
||||
If you are new to SCM do check out this howto (i think the author explains it very well): http://www.ericsink.com/scm/index.html
Last edited by ephemera; 23rd September 2008 at 06:47 PM. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cleaning Portsnap files in /var/db/portsnap/files | bram85 | FreeBSD Ports and Packages | 2 | 5th October 2009 09:54 AM |
Unable to make install on Subversion port | Fuitad | FreeBSD Ports and Packages | 2 | 28th July 2008 04:49 PM |
Moving files | Weaseal | Programming | 2 | 14th July 2008 07:30 AM |
FreeBSD making the move from CVS to Subversion | drhowarddrfine | FreeBSD Installation and Upgrading | 9 | 8th June 2008 05:29 PM |
Which file system use to share data on Bsd system? | aleunix | Other BSD and UNIX/UNIX-like | 2 | 1st June 2008 04:14 PM |