SVN 将单个目录移动到其他存储库(带历史记录) [英] SVN move single directory into other repository (with history)

查看:24
本文介绍了SVN 将单个目录移动到其他存储库(带历史记录)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相关问题:将存储库主干移动到另一个分支(使用历史)

我知道可以使用历史转储完整 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 somesubdirectory

但这会将完整存储库导入到目标存储库的子目录中.我想要的是在应该导出的源存储库中定义一个子目录.类似 svnadmin dump 的东西.--source-path oldsubdir >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 oldsubdir > 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 sourcesubdir < mydumpfilename | svnadmin load . --parent-dir destinationsubdir

希望这也能帮助其他人...

Hope this will help others, too...

推荐答案

查看 svndumpfilter 和关于 存储库维护.

一旦您拥有整个旧存储库的转储文件,您就可以使用 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆