How to upgrade v2 to v3 FSFS subversion filesystem

Firstly, I am trying to reintegrate a branch with the trunk (using TortoiseSVN) but I am getting the error message "Querying merge info requires version 3 of the FSFS filesystem schema; filesystem E:/MyRepository/ uses only version 2".

Was it really not possible to reintegrate branches in earlier versions of subversion? Or is there another way of doing this?

Anyway, how can I upgrade the file system from version 2 to version 3?


Solution 1:

You didn't specify the version of Subversion that your server is running. But based on the message you provided in the question, it's probably a 1.4.x version or older. I don't remember if there was an upgrade command provided or not for conversion from 1.4.x to 1.5.x, but the sure file way to get your repository from version 2 to version is to a dump and load. But that doesn't matter much, you'll want to install 1.6.x anyway to go with the latest. So, here are the steps you need to do:

  • Upgrade to Subversion 1.6.x if haven't already
  • Dump your existing repository using svnadmin dump
  • Create a new repo, call it _new
  • Load your new repo with the dump of the old using svnadmin load
  • Copy the uuid file from the old repository to the new repository
  • rename the old repository to _old
  • rename the new repository to

See also Subversion FAQ http://subversion.apache.org/faq.html#dumpload for a concrete example.

That should get you taken care of and the uuid file will keep your clients from freaking out. Do an svn update to be sure though.

Solution 2:

Dump/load is not required for upgrading Subversion repositories. Use svnadmin upgrade command:

svnadmin upgrade <path-to-repos>

NOTE: svnadmin upgrade "performs only the minimum amount of work needed to accomplish this while still maintaining the integrity of the repository. While a dump and subsequent load guarantee the most optimized repository state, svnadmin upgrade does not." - see also svnadmin upgrade documentation

Solution 3:

Ivan has a good tip that works, i tried it and it is very simple.

svnadmin upgrade <path-to-repos>

One thing i Missed in Ivans example that can be useful to others are:

Ex.

<path-to-repos> = C:\repos\theRepo
(ie. NOT C:\repos\theRepo\db)

Don't point svnadmin at the db directory, but the directory containing the db directory.