移动存储库。我是否同时使用 SVN switch、SVN relocate 或者其他东西

Cip*_*her 4 linux svn windows visualsvn-server

我一直在计划将 Subversion 存储库从 Linux 服务器迁移到 Windows 服务器。我概述了迁移步骤:

  1. 创建存储库的转储
  2. 将转储文件传输到目标 Windows 服务器
  3. 将存储库上传到新的 Subversion 服务器中
  4. 将对旧存储库的所有引用更改为新存储库

经过一番挫折后,我终于到达了第 4 步,但陷入了困境......我不知道如何更改所有引用。我已经看到可以使用 relocate,但我也听说如果结构发生变化,应该使用 switch...这是工作项目,所以我需要确保在最后一步使用正确的命令以避免后果。

当前的文件结构如下所示:

svn://svn@服务器名称/源/程序名/bin/Release

新的文件结构由 VisualSVN Server 指定,如下所示:

https://ServerName.domain.local/svn/RepositoryName/Source/程序名称/bin/Release

会为此重新安排工作还是我走错了方向?

Laz*_*ger 5

以前的回答者不阅读文档

>svn help switch

  2. The '--relocate' option is deprecated. This syntax is equivalent to
     'svn relocate FROM-PREFIX TO-PREFIX [PATH]'.
Run Code Online (Sandbox Code Playgroud)

必须

  • 使用svn relocate(因为你重写的不仅仅是前缀)
  • 使用第二种形式的重定位语法relocate TO-URL [PATH],另请参见示例svn help relocate
  2. TO-URL is the (complete) new repository URL to use for PATH.

Examples:

  ...

  svn relocate http://www.example.com/repo/project \

               svn://svn.example.com/repo/project
Run Code Online (Sandbox Code Playgroud)

在示例中,旧参考文献svn://svn.example.com/repo/project被替换为http://www.example.com/repo/project