Installing and Configuring SVN on XP

Need to install SVN and in a hurry, here’s how…

Just completed this task again, it was much simpler than the last time although not without some little puzzles, so I though it would be worth posting the simple instructions needed to get going super fast.

For the purposes of this example I am showing the location of the repository as


download svn1clicksetup, which is a simple installer for SVN. Run the installer

now create the repository using the svnadmin tool.

d:> svnadmin create "d:\SVN_Repository"

cool, so now we have a repository. we need to also make some changes to the conf files in the d:\SVN_Repository\conf folder.

svnserve.conf needs the following lines uncommented (or created if they do not exist)

anon-access = read
auth-access = write
password-db = passwd

and the passwd file needs user accounts to be added

svn = svnpassword

This pretty much gives us a working SVN, although you may have to follow the detour below.

Slight detour.

You may need this if you are not simply using the defaults from the installer, or if you abandon the install halfway through.

I found the installer was not too forgiving as I wanted the repository created on a different drive. Everything installed but I couldn’t access my stuff. Also an uninstall did not remove the SVN service so I had ended up with a stale service pointing at the wrong folder.
To fix this I removed the service, open a cmd window.

c:> sc delete svnservice

once I confirmed the service was actually removed. I then manually re-installed it.

c:> svnservice -install --daemon --root "d:\SVN_Repository"

end of detour.

I created the following svnnew.bat file to move my eclipse workspace projects into the repository.

svn mkdir svn://localhost/%1 -m "setup %1"
svn mkdir svn://localhost/%1/trunk -m "setup %1"
svn mkdir svn://localhost/%1/branch -m "setup %1"
svn mkdir svn://localhost/%1/tags -m "setup %1"
svn import D:\projects\%1 svn://localhost/%1/trunk -m "load existing project %1"
svn ls svn://localhost

running svnnew testProject will create the testProject folders (trunk/branch/tags) and import the project into the repository at testProject/trunk.

At this point you have Installed svn, created a repository and imported your projects to that new repository.

Now this would be a good point to make a quick snapshot backup of the repository. When backing up the repository you may be tempted to just do a filesystem copy, This is not recommended, instead use the following command

svnadmin dump d:/SVN_Repository > x:/svn.bak

once this is complete the file x:/svn.bak will contain a full backup of the current repository

Use the dump file to restore the repository if needed at any point.

svnadmin load d:/SVN_Repository

I use Eclipse as my IDE of choice, accessing the SVN repository was simply a matter of installing the subclipse plugin and defining the repository on the URL svn://localhost

A note. XAMPP needs a different set of .so modules to work with this version of svn. The files are available from

Technorati Tags:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: