问题描述
SVN 目录很容易在计算机之间移动,但这可能会导致工作副本和安装的 svn 客户端之间的版本不匹配导致错误
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
在一个完美的世界中,您可以安装更新版本的 SVN 客户端,但是当这不可能或不方便时,能够将工作副本降级到已安装的客户端版本会很好——尤其是当您知道没有使用更高版本的任何功能.
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.
可以想象的场景类似于:Joe 向您发送一个包含大量嵌套目录(以及关联的版本化 .svn 文件夹)的大型工作副本.你努力吧.当您尝试提交时,svn 会告诉您您的客户端太旧了.没必要把它寄回给乔.签出一个新的工作副本应该没有必要,并且在任何情况下合并更改都会很不方便.
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?
推荐答案
简短的回答:这不是微不足道的.
Short answer: it's not trivial.
幸运的是,开发人员预料到了这个问题并在一个常见问题解答中进行了处理:http://subversion.apache.org/faq.html#working-copy-格式更改
结果是下载并使用他们的脚本:http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/change-svn-wc-format.py
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
请注意,该脚本只需要客户端的主要版本号,因此如果您的客户端版本为 1.4.4,则命令为:
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...]
更新:
以上脚本仅适用于降级 1.6 及以下版本.从 1.7+ 降级显然是不可能的.出处注释:
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.
这篇关于如何降级 SVN 工作副本的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!