Jul 19 2008

Creating a SVN repository

Published by at 5:22 pm under Server Side

I had found this awesome tutorial online to create svn repository and how to use it but i couldn’t find it again. I had to work hard and google a lot to get the repository working as i wanted it to be.

 

In end it was very easy to get it going and i would like to share with everyone. I won’t go into the installation procedures, i expect you have all the tools up and running. By tools i mean svnadmin, svnserve and svn installed.

 

I did this procedure on a Fedora 6 linux server and am assuming it should be the same for all unix systems.

Disclaimer: I am using svnserve for svn, it is not a secure way to implment svn and if you want security then i suppose you should stop reading this further 😀

 

svnadmin create /myreponame/mainfolder

 

That is it, the repository is created, its a blank one but then its taken care of. We need to add something now to the repository. So we will import something from the server. 

 

svn import projects file:///myreponame/mainfolder -m ‘initial import’

 

projects is the folder which has all the files you want to import, I had two Flex builder projects inside this projects folder and they were imported into the svn.

 

At this stage the svn is ready, by default the anonymous access is enabled and we need to change that. The configuration files exist in /myreponame/mainfolder/conf folder. We need to modify svnserve.conf and passwd which holds your svn access passwords. type in whatever username and password you need and then save it. The authz file controls the various read/write property and i don’t bother with it since it is for personal use.

 

just one final thing before we are ready to hold the repository, svnserve is the server for svn access, to start it as a daemon just type the following,

 

svnserve -d -r /myreponame/mainfolder

 

we need to point it to the correct folder, that is it you are all set with your repository.

 

svn co svn://www.yourdomain.com/mainfolder will download the repository and then you can use it.

 

I have used the above procedure to create a working svn repository and its for personal use only.

No responses yet

Trackback URI | Comments RSS

Leave a Reply