Subversion is a brilliant piece of open-source software for version control. It is the heir of the renowned CVS and suprior to the infamous SourceSafe in every way. This tutorial is not about running a Subversion server - although it is easy and free - but about using Subversion for easy collaboration and version control in Windows.
What is version control?
Version control is basically about storing different versions of the same files, which enables you to go back previous versions in case you mess something up. Since the files are usually stored on a central server - often, but not necessarily, accessible from the internet - a nice side effect of version control is that it enables several people to work with the same set of files simultaneously, by letting everyone syncronize their files with the server.
What is a repository?
Remember the central server running Subversion? This is where the repositories is located. Each repository is a unique and seperate collection of files with a forthrunning version number. You usually create a new repository for each new project you choose to version control, but in case you can’t just create new repositories, there is no problem in grouping several projects in the same repository.
I assume that you already know two things: The url of the Subversion repository you want to work with, and the username and password to use with it. If not, feel free to expirement with (but not abuse) a test repository I have setup for this tutorial:
- Url: http://svn.casperfabricius.com/sandbox/
- Login: test
- Password: test
TortoiseSVN - making Subversion easy

Your first step is to install TortoiseSVN; a free open-source client for working with Subversion in Windows, which integrates seamlessly with Windows Explorer. Go on; download and install the latest version right now! (Select the TortoiseSVN-X.X.X.XXXX-svn- X.X.X.msi file.)
Once installed; start Windows Explorer or open My Computer from your desktop and create a folder a place where you would like to place your first repository - I usually keep mine in “C:\Projects”. Right-click on the folder (or in the “white space” inside it) to discover two new items in your context menu: “SVN Checkout” and “TortoiseSVN”. Select to “SVN Checkout” to make the folder your local working folder for the files in the repository. Enter the url of the repository you want to use, or use “http://svn.casperfabricius.com/sandbox/”. Enter your username and password (both are case-sensitive) or use test as both if you are checking out my test repository. I recommend that you check the “Save authentication” box, unless you are not using your own computer. I might encounter the message saying “Error validating server certificate …” during the process, if the repository is using SSL. It’s not a problem at all, just select “Accept Permantly” and go on with the tutorial. TortoiseSVN will now download any files in the repository to the folder, and add several new items to the context-menu, enabling you to syncronize with the Subversion repository. Your are ready to start using the repository!



Jaikus







Good tutorial Casper. I was wondering if you have had any problems using svn with RadRails? I keep getting:
org.tigris.subversion.javahl.ClientException: Unsupported working copy format
svn: This client is too old to work with working copy 'D:\InstantRails\rails_apps\i2g'; please get a newer Subversion client
This particularly happens when I commit at the folder level. This may have started when I used TortoiseSVN to commit changes to .htaccess (RadRails doesn’t see this file). I am using the latest version of RadRails, 0.7.1.
Have you experienced any of these problems? Do you have problems keeping RadRails in sync with TortoiseSVN (i.e. keeping the same version numbers if you make a change using Tortoise).
Thanks
Comment by Brad — October 4, 2006 @ 7:41 am
Hi Brad, and thanks. I can’t say that I have experienced that particular problem. The working copy format of TortoiseSVN and Subclipse should be compatible, and as long as you use TortoiseSVN on the same folder as your workspace is pointing to, the two will always be in sync, since it is, in fact, the same physical files on the hard disk.
You didn’t install the special “underscore hack” version that - for the sake of Visual Studio - starts the svn special folders with an underscore instead of a dot, right?
Anyhow, I haven’t tried the newest versions RadRails, since I’ve switched to Mac, but you should probably check their website for reports of this problem. Loads of people uses both TortoiseSVN and Subclipse, so you can’t be the only with that problem!
Comment by Casper Fabricius — October 4, 2006 @ 8:15 am