SVN directories are conveniently easy to move between computers, but this can occasion version mismatches between the working copy and installed svn client resulting in the error
svn: This client is too old to work with working copy '.'; please get a newer Subversion client
In a perfect world one could install a newer version of the SVN client, but when this is not possible or convenient it would be nice to be able to downgrade the working copy to the version of the client installed--especially when you know that none of the features of the later version are being used.
Checking out a new working copy with the old client only works if the problematic working copy doesn't have any changes, and isn't too big to make that inconvenient.
The scenario to imagine would be something like: Joe sends you a large working copy with lots of nested directories (and associated versioned .svn folders). You work on it. When you try to commit it, svn tells you that your client is too old. Sending it back to Joe shouldn't be necessary. Checking out a new working copy shouldn't be necessary and merging the changes in would be inconvenient in any case.
Is there some way to do this?
Description. As new versions of Subversion are released, the format used for the working copy metadata changes to accomodate new features or fix bugs. Older versions of Subversion would automatically upgrade working copies to the new format the first time the working copy was used by the new version of the software.
The working copy will be located in a directory called trunk on your computer relative to the directory you issued the command in. If you wish to have a different name for your working copy you can add that as a parameter to the end of the command. e.g. This will create a working copy called MyProjectSource .
Short answer: it's not trivial.
Fortunately, the developers anticipated this problem and deal with it in an FAQ: http://subversion.apache.org/faq.html#working-copy-format-change
The upshot being to download and use their script for the purpose: http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py
Note that that script only wants the major version number of the client, so if you have client version 1.4.4 the command would be:
python change-svn-wc-format.py <WC_PATH> 1.4 [...other options...]
Update:
The above script only works for downgrading version 1.6 and below. Downgrading from 1.7+ is apparently not possible. The note from the source:
# Downgrading from format 11 (1.7) to format 10 (1.6) is not possible, # because 11 does not use has-props and cachable-props (but 10 does). # Naively downgrading in that situation causes properties to disappear # from the wc. # # Downgrading from the 1.7 SQLite-based format to format 10 is not # implemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With