Sometimes, you may face this issue, how can I downgrade a subversion repository properly? As Subversion does not officially supply this toolset, we’ll show an example on how to downgrade an svn repository from 1.6 to 1.4 via svnsync.
Svnsync is the repository synchronization tool officially released by Subversion, which can be used to keep two repositories the same pace. In this example, we assume you are trying to downgrade the repository “opsdev” running in svn-1.6 to v1.4, and the opsdev is hosted by server A. We need another server B for this downgrade.
Step 1 – Backup your repository. This can be done by copying the repository to a different name.
Step 2 – Create a new SVN server on server B with the same version(v1.6) as server A, and copy the “opsdev”be-downgrade repo there.
Step 3 – Downgrade the SVN server on server A to v1.4, and create a new repository with the name “opsdev”. It’s the productive one when we finished downgrading.
Step 4 – Setup svnsync, to sync the code from B to A.
I’ll create another post on how to set up svnsync as this command helped me some times recently.
[Updated] There’s a smart script for SVN downgrade which supports version 1.4, 1.5 and 1.6. You can downloaded it here. Don’t forget to create a backup before running it:
$ python change-svn-wc-format.py --help usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format] change-svn-wc-format.py --help Change the format of a Subversion working copy to that of SVN_VERSION. --skip-unknown-format : skip directories with unknown working copy format and continue the update