我需要在 Windows 中将 SVN 存储库从一台服务器移动到另一台服务器。诀窍是我想从嵌套存储库中的项目中排除除主干、分支和标签之外的所有内容。
我目前有一个大型存储库,所有项目都在(MyBigRepo)下。目前的结构是:
/Repositories/MyBigRepo/MyProject1/trunk
/Repositories/MyBigRepo/MyProject1/branches
/Repositories/MyBigRepo/MyProject1/tags
/Repositories/MyBigRepo/MyProject2/trunk
/Repositories/MyBigRepo/MyProject2/branches
/Repositories/MyBigRepo/MyProject2/tags
/Repositories/MyBigRepo/MyProject3/trunk
/Repositories/MyBigRepo/MyProject3/branches
/Repositories/MyBigRepo/MyProject3/tags
我只想移动MyProject1
,但我想排除主文件夹MyProject1
,只从存储库中移动主干、分支和标签MyProject1
。我不想动MyProject2
或MyProject3
。换句话说,我的目标是形成类似于下面的新存储库。
/Repositories/NewRepo/trunk
/Repositories/NewRepo/branches
/Repositories/NewRepo/tags
这是我为完成这项工作而创建的批处理文件:
:: Create a dump of the old repo
svnadmin dump %OldRepoPath% > %MyBigRepoDumpFile%
:: Remove the other projects
svndumpfilter include "MyProject1" < %MyBigRepoDumpFile% > %MyProject1DumpFile%
:: Create a new repo
svnadmin create %NewRepoPath%
:: Load the dump into the new repo
svnadmin load %NewRepoPath% < %MyProject1DumpFile%
我的问题是批处理仍然在下面创建 MyProject1 目录%NewRepoPath%
:
/Repositories/NewRepo/MyProject1/trunk
/Repositories/NewRepo/MyProject1/branches
/Repositories/NewRepo/MyProject1/tags
有没有办法从我的转储文件中排除额外的级别(MyProject1)或将其上移一个级别,仍然保留历史记录?