Mission Statement

For my private software projects I wanted to use some kind of source code versioning tool. On the client side I was using Eclipse as an IDE, installed on a Windows 7 PC. On the server side I had a Debian Squeeze Linux system. Fed up with the shortcomings of CVS, I decided to use Subversion (SVN).

Since I had an account on the Debian server, I could go for the simpliest configuration option: svn+ssh. For this to work, you must have a UNIX account with write permissions to the svn repository on the server side. If this is no option for you, you can take a look at svnserve or Apache to connect to your repository. These options will not be discussed in this article.

There is also a very good online book on Subversion.

Server Installation

Basically there are two options, how to organize your projects in Subversion. Either you make a seperate repository for every project, or you put all your projects in the same repository. I have decided for the second option in order to have only one repository to care about. Nothing is for free, so the disadvantage is that the revision number is increased for all projects, when you make a commit. Even for those projects that you did not change. You can find details about this in the online book mentioned above.

A project in the Subversion repository usually has three subfolder: trunk, tags and branches. The current development is located unter trunk, older versions can be stored under tags, and branches as the name implies includes parallel branches from the main trunk. There is no duplication of data between these subfolders, as Subversion makes extensive use of references.

Let's kick off and create the first project:

> mkdir -p ~/tmp/project1
> cd ~/tmp/project1
> mkdir trunk tags branches

Now let's import our empty project into subversion:

> cd ~/tmp
> svn import . file:///home/user/svn_repo -m "Initial Repo"

Finally we test our repository and check it out again:

> svn list --verbose file:///home/user/svn_repo
> cd
> svn co svn+ssh:// project1

Client Installation

On the client side I had to configure Eclipse to connect to my repository. There are two Eclipse plugins for Subversion: Subclipse and Subversive. Subversive is developed by the Eclipse team and Subclipse by the Subversion team. The differences between these plugins don't seem to be big. I decided to use Subversive, and installed it from the Eclipse Market. After a restart of eclipse I was asked, which SVN-connector to install. Such a connector is necessary for Subversive to work. I have chosen the java based SVN Kit in the most recent version. It is also possible to install multiple connectors and configure Subversive, which one to use.

After having installed the plugin, I opened the eclipse "SVN repository Exploring Perspective". There you can add new repositories. That is what I did. The URI of my empty repository created above is svn+ssh:// That is it. Now I could check out the repository into eclipse and work with it.

Get in touch