开发者

How to copy subversion repository as a new directory to existing repository?

开发者 https://www.devze.com 2022-12-27 18:44 出处:网络
I have two existing subversion repositories on different hosts (host-a and host-b) and I\'d like to copy one directory from repo A to repo B.

I have two existing subversion repositories on different hosts (host-a and host-b) and I'd like to copy one directory from repo A to repo B.

Basically https://host-a/repo/some/path/moduleA开发者_StackOverflow should be copied to https://host-b/repo/some/other/path/moduleA. All the history should be preserved and existing data in host-b should be preserved.

The two repositories do not have any conflicting directory hierarchies. The repositories do not share common ancestry.


Have you checked out the svnadmin dump and svnadmin load combination? According to the Subversion red book, they can be used to merge one repository with another:

The dump format can also be used to merge the contents of several different repositories into a single repository. By using the --parent-dir option of svnadmin load, you can specify a new virtual root directory for the load process.

Update:

Juha, in response to your comment: There is a command called svndumpfilter (see this section in the red book) that I think might help.


You can use svn:externals for this. That will eliminate the need to copy the files from one repo to another, and will also continue to keep those folders in sync in each of the repos. You will have access to the complete commit log as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消