将部分 SVN 存储库复制到新存储库? [英] Copy part of SVN repo to new repo?
问题描述
目前,我有一个大型 SVN 存储库,其中包含许多不同的项目,如下所示:
Currently, I have a large SVN repository with a bunch of different projects within it, as follows:
/
Project1/
trunk/
tags/
branches/
Project2/
trunk/
tags/
branches/
Project3/
(etc...)
但是,我现在正尝试将其分解为单独的存储库(出于各种原因),并且我希望每个项目都具有以下内容:
However, I'm now trying to break it up into separate repositories (for various reasons), and I would like the following for each project:
/
trunk/
tags/
branches/
如果可能,所有历史记录和外部信息都应保持完整.但是,我不确定这是否真的可以做到.我在 SO 上看到了几个与此类似的问题,但没有一个完全解决我在这里遇到的问题.基本上,我试图从旧存储库中拉出"一个子目录及其全部内容,并将其全部放入自己的(新)存储库中.
If possible, all history and externals should remain intact. However, I'm unsure if this can actually be done. I have seen several questions similar to this on SO but none entirely addresses the issue I have here. Basically I am trying to "pull out" a subdirectory and its entire contents with history from the old repository and plop the whole lot into its own (new) repository.
我问的是不可能的事吗?
Am I asking the impossible?
推荐答案
使用
svnadmin dump path/to/repository > repo.dmp
然后使用 svndumpfilter 仅将子树加载到新存储库中.
and then use svndumpfilter to only load a subtree into a new repository.
这篇关于将部分 SVN 存储库复制到新存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!