Upgrading Subversion to 1.5 in Ubuntu Hardy 8.04

As we near Tonido beta launch, we are figuring out a branching strategy for the code base. It appears that Subversion 1.5.x has better support for merging. For example, you don’t need to keep track of what was merged explicitly. To get this functionality, we upgraded subversion server on our Ubuntu Hardy 8.04 from 1.4.6 to 1.5.1. Note that you will need to update all SVN clients as well to get new 1.5.x functionality.

1. enable hardy-backports in /etc/apt/sources.list

2. Pin backports to lower priority, so apt doesn’t use it by default. Add the following to /etc/apt/preferences

Package: *
Pin: release a=hardy-backports
Pin-Priority: 400

3. Update apt

sudo apt-get update

4. Stop Apache

5. Make a dump of your subversion repository (A dump/load cycle will upgrade the repositories to 1.5 format, just upgrading subversion doesn’t upgrade format)

sudo svnadmin dump /svn/repo > svn_portable_dump

6. Upgrade Subversion

sudo apt-get -t hardy-backports install subversion libapache2-svn subversion-tools

7. Verify you have the new subversion installed

svnadmin --version should show correct version

8. Move your repo to a diff path

sudo mv /svn/repo /svn/old-repo

9. Recreate repo

sudo svnadmin create /svn/repo

10. Load the repository back

sudo svnadmin load REPO_PATH < svn_portable_dump

11. Do a upgrade to make sure things are ok

sudo svnadmin upgrade /svn/repo

12. Make sure you give Apache ownership of svn repo

sudo chown -R www-data:www-data .

13. Restart Apache

14. Verify you are actually getting new version, browse to your SVN repo via Apache and you should see “Powered By Subversion” with 1.5.x.

15. To generate node-origins index cache beforehand

sudo svn-populate-node-origins-index /svn/repo

16. Done!

3 Responses

  1. MSW says:

    Thanks, your post helped me out tremendously. Your instructions were spot on. Cheers!

  2. Alex says:

    Thanks for sharing this useful steps.

  3. Joni says:

    Yes, great instructions – very helpful when I upgraded svn on a legacy Hardy server to address some merging woes.

    (Only extra thing I needed was some chmod tweaking to the upgraded repos, to get committing working again.)

Leave a Reply