SVN将单个目录移动到其他存储库(带有历史记录)
相关问题: 将存储库主干移动到另一个分支(具有历史记录)< /a>
我知道可以转储一个带有历史记录的完整 SVN 存储库,并将其加载到目标存储库的用户定义(子)目录中,使用:
// in source repo
> svnadmin dump . > mydumpfilename
// in destination repo (backslashes because I'm using Windows)
> svnadmin load . < mydumpfilename --parent-dir some\sub\directory
但这会将完整存储库导入到目标中存储库的子目录。我想要的是在源存储库中定义一个应该导出的子目录。类似于 svnadmin dump 。 --源路径旧\子\目录> mydumpfilename.
我怎样才能做到这一点?如果 TortoiseSVN 可以做到这一点,请这么说;)
解决方案:感谢 Tim Henigan 的回答,这是正确的方法:
// execute in destination repo
svndumpfilter include source\sub\dir < mydumpfilename | svnadmin load . --parent-dir destination\sub\dir
希望这对其他人也有帮助......
Related question: Moving repository trunk to another’s branch (with history)
I know that one can dump a complete SVN repository with history and load it into a user-defined (sub)directory of the target repository using:
// in source repo
> svnadmin dump . > mydumpfilename
// in destination repo (backslashes because I'm using Windows)
> svnadmin load . < mydumpfilename --parent-dir some\sub\directory
But this will import the full repository into the target repository's sub-directory. What I want is to define a sub-directory in the source repository that should be exported. Something like svnadmin dump . --source-path old\sub\dir > mydumpfilename
.
How can I achieve that? If TortoiseSVN can do that, please say so ;)
SOLUTION: Thanks to Tim Henigan's answer, here's the correct way to do it:
// execute in destination repo
svndumpfilter include source\sub\dir < mydumpfilename | svnadmin load . --parent-dir destination\sub\dir
Hope this will help others, too...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看
svndumpfilter
和本节关于存储库维护 。一旦您拥有了整个旧存储库的转储文件,您就可以使用 svndumpfilter 来提取您想要的部分。
我不知道如何使用 TortoiseSVN 来做到这一点。
Check out
svndumpfilter
and this section on Repository Maintenance.Once you have a dumpfile for the entire old repository, you can use
svndumpfilter
to extract just the portion that you want.I am not aware of a way to do this with TortoiseSVN.