sensimevanidus

20 March, 2010

Subversion repository creation

For every project I develop, I work with Subversion version-control system. I tend to use it; because it’s easy to use and has great features.

I created a separate drive on my development environment - my laptop - which is the main repository of my projects. A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides using the file:// method and as I only work on my laptop, I prefer to use Subversion this way.

As a result, creating a repository is straight-forward:

svnadmin create /media/svn/<project-name>

And also, I have an empty folder named svn-repository-layout which holds a common directory layout for my Subversion repositories:

onur@ubuntulaptop:~/code/svn_layout$ ls -la
total 20
drwxr-xr-x  5 onur www-dev 4096 2010-03-20 18:22 .
drwxr-xr-x 13 onur onur    4096 2010-03-20 18:17 ..
drwxr-xr-x  2 onur www-dev 4096 2010-03-20 18:18 branches
drwxr-xr-x  2 onur www-dev 4096 2010-03-20 18:18 tags
drwxr-xr-x  2 onur www-dev 4096 2010-03-20 18:18 trunk

After creating the Subversion repository, first thing to do is to create this hierarchy for the new repository by typing:

onur@ubuntulaptop:~/code/svn_layout$ svn import . file:///media/svn/<project-name>