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.
精彩评论