且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何降级SVN工作副本的版本?

更新时间:2023-02-22 19:40:44

简短的回答:这不是微不足道的.

Short answer: it's not trivial.

幸运的是,开发人员预料到了这个问题并在 FAQ 中进行了处理: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.