
Upgrading Subversion
Originally published on my old blog at cumps.be on March 21, 2009.
Right after publishing my previous post I noticed the Svn 1-Click Setup is running hopelessly behind in SVN versions. Their default download link is still using SVN 1.3.2 and the latest link on the download page is only at 1.4.2, and both also have an old TortoiseSVN.
That’ll teach me to try out an “all-in-one” package! Let’s just build everything with official binaries from now on, and get our source control upgraded to SVN 1.6.0, without losing any data. (Since I’ve already checked in quite a bit in my repository)
First of all, let’s get rid of the old junk!
Take a copy of your repo folder as a backup, safety first.
- Uninstall the 1-Click Setup through Add and Remove Programs.
- Go to Services and stop the service.
- Open a command prompt and type
sc delete SVNService. - Throw away any files left in the directory.
Installing the official binaries
Time to get the good stuff in. Download the latest version from subversion.tigris.org; I grabbed svn-win32-1.6.0.zip.
On my machine, I have my source control layout as follows:
C:\Servers
C:\Servers\Subversion
C:\Servers\Subversion\Server
C:\Servers\Subversion\Repositories
C:\Servers\Subversion\Repositories\Cumps
Unzip SVN 1.6.0 to the Server directory and add the bin directory to your PATH, to make future administration easier.
Copy the content of the repo you backed up to the new folder. You should end up with conf, dav, db, hooks, locks, format and README.txt in your new repository folder.
Open up a prompt and type svnadmin upgrade C:\Servers\Subversion\Repositories\Cumps, replacing the last directory with your repository name. This will upgrade the repository layout to the latest. If you open up the format file in a text editor, it will say 5 as the version number.
Run the following command to create a new Windows service for svn:
sc create SVN binpath= "C:\Servers\Subversion\Server\bin\svnserve.exe --service -r C:\Servers\Subversion\Repositories" displayname= "Subversion" depend= Tcpip start= auto
Pay attention to the single space after the equal signs!
At this point you can type NET START Svn and everything works as before, except you’re on SVN 1.6.0 now, without any dependencies on installers, and future upgrades will be a lot easier.
In the future we might upgrade this to work together with Apache too, when the need arises. Since I’m in my own private LAN, svnserve is perfectly fine, and I’m following the YAGNI (You Ain’t Gonna Need It) principle for this series.
You May Also Like

Building a Continuous Integration Build Server
A new series after the design patterns: building a Continuous Integration build server from scratch.

How This Blog Is Served
The machinery behind the words you're reading: Hugo, an unprivileged nginx, a strict CSP, and a deploy script.

Keeping the Old Addresses Alive
Nobody migrates email in one day. Fetchmail, a receive-only alias domain, and permanent redirects bridge the old world into the new one.



