Creating SVN repository on Linux
Subversions are mainly used when there are multiple users and sharing/modifying code. I am going to create SVN repositary for Linux Kernel and U-boot images. This article explains how you can setup an SVN repository at home Linux PC.
Follow below steps to setup SVN repository
1. Install Packages
yum install subversion mod_dav_svn
2. Create SVN Parent DIR
mkdir /svn
3. Create repositary repos
svnadmin create /svn/repos
4. Edit config file to add user password and access
gvim /svn/repos/conf/svnserve.conf
Uncomment and modify below line in svnserve.conf
anon-access = none
password-db = passwd
realm = Repos Repository
auth-access = write
Note : In svnserve.conf, you cannot have a space before you set an argument and a variable. It doesn’t find the argument. Open svnserve.conf and delete extra spaces at the beginning of any line.
5. Add users nad Password
gvim /svn/repos/conf/passwd
Add user and password
6. Start SVN Server
svnserve -d --listen-port=3690
Adding files/DIR in new SVN:
1. To check in you first need to set SVN editor
export SVN_EDITOR=gvim
2. Check out parent SVN dir
svn co svn://localhost/svn/repos <Work Folder>
3. create/copy dir or files in same checkedout dir and create required DIR structure and also copy/create files if required to check in into repository
mkdir tmp1
mkdir tmp2
4. add dir in svn
svn add tmp1
svn add tmp2
5. check in files/ svn added dir
cd tmp1;svn ci -m "adding tmp1 DIR"
cd tmp2;svn ci -m "adding tmp2 DIR"
Note: You need to restart svnserve every time you rebootTo avoid it run it as serviceGo to System-->Administration-->Services Select svnserve amd enable itSimilary to stop SVNSERVE use killall svnserve