The procedure is rather straightforward:
- Upgrade all clients to 1.5.x. Older clients and servers interoperate transparently with 1.5 servers and clients. However, some of the new 1.5 features may not be available unless both client and server are the latest versio. So it is a good starting point.
- Update the subversion tools. On Debian based system, it goes like:
$ apt-cache showpkg subversion
Package: subversion
Versions:
1.5.6dfsg-1 [...]
$ apt-get install subversion=1.5.6dfsg-1
[...] - Update the SVN apache library. There is no need to update apache itself. But upgrading this lib will also install the latest mod_dav_svn module for apache. Although it is not mandatory, it is highly recommended. On Debian based system, it goes like:
$ apt-cache showpkg libapache2-svn
Package: libapache2-svn
Versions:
1.5.6dfsg-1 [...]
$ apt-get install libapache2-svn=1.5.6dfsg-1
[...] - Restart apache (apache2ctl restart).
- Make a simple test:
$ svn --version
svn, version 1.5.6 (r36142)
compiled Feb 26 2009, 02:56:32
[...]
$ svnadmin --version
svnadmin, version 1.5.6 (r36142)
compiled Feb 26 2009, 02:56:32
[...]
We are fine. - Add a start-commit hook script to avoid 1.4.x and lower clients to commit to the repository. The repository format has changed, meaning that 1.4 and older versions of Subversion tools that normally access a repository directly (e.g. svnserve, mod_dav_svn, svnadmin...) won't be able to read a repository created by Subversion 1.5 More on this in a future post.
- Upgrade the repositories from the 1.4 structure to the 1.5 one. The repository format has changed between the two releases but, repositories are not upgraded automatically. From the subversion 1.5 release notes:
some of the new 1.5 features will not become available simply by upgrading your server: you will also have to upgrade your repositories.
. Again, it is straitforward:$ svnadmin help upgrade
It is harmless and run in seconds.
[...]Upgrade the repository located at REPOS_PATH to the latest supported
schema version.[...]
$svnadmin upgrade REPO_PATH
[...] - Optional: dump and reload the repositories. I've run the following quick test on a repository full of word/pdf documents:
- du -sh REPO1 -> 402M.
- svnadmin dump REPO1 > REPO1.dump
- du -sh REPO1.dump -> 780M.
- svnadmin create REPO2.
- cat REPO1.dump | svnadmin load REPO2
- du -sh REPO2 ->388M