Juha Syrjälä
Juha Syrjälä

Reputation: 34281

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

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 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.

Upvotes: 1

Views: 1151

Answers (2)

Ash
Ash

Reputation: 9436

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.

Upvotes: 1

D'Arcy Rittich
D'Arcy Rittich

Reputation: 171491

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.

Upvotes: 0

Related Questions