SVN将单个目录移动到其他存储库(带有历史记录) [英] SVN move single directory into other repository (with history)
问题描述
相关问题:将存储库主干移动到另一个分支(历史)
我知道可以使用历史记录转储 complete SVN存储库并将其加载到目标存储库的用户定义(子)目录中,方法是:
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
但是这会将完整的存储库导入到目标存储库的子目录中.我想要的是在源存储库中定义一个应该导出的子目录. svnadmin dump . --source-path old\sub\dir > mydumpfilename
之类的.
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
.
我该如何实现?如果TortoiseSVN可以做到这一点,请说;)
How can I achieve that? If TortoiseSVN can do that, please say so ;)
解决方案::感谢Tim Henigan的回答,这是正确的解决方法:
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...
推荐答案
查看存储库维护.
一旦您拥有整个旧存储库的转储文件,就可以使用svndumpfilter
提取所需的部分.
Once you have a dumpfile for the entire old repository, you can use svndumpfilter
to extract just the portion that you want.
我不知道使用TortoiseSVN的方法.
I am not aware of a way to do this with TortoiseSVN.
这篇关于SVN将单个目录移动到其他存储库(带有历史记录)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!