sensimevanidus

17 July, 2010

SVN Repository Relocation

Our SVN server has its own IP 192.168.1.200 in our local network and we use svnserve as the server program.

A few minutes ago, I needed to change the name of a repository from hede to hede.web and I did it this way:

On the server, i ran this command:

/var/repo$ mv hede hede.web

Then, on my development environment I needed to update the working copy:

~$ cd /var/www/svn_hede
/var/www/svn_hede$ svn switch svn://192.168.1.200/hede svn://192.168.1.200/hede.web .

That’s all!

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>