[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Merging two repositories

From: Ryan Schmidt <subversion-2008b_at_ryandesign.com>
Date: Thu, 15 May 2008 01:18:40 -0500

On May 14, 2008, at 12:36, Long, Nicholas wrote:

> Is there any way to merge two repositories and maintain the history of
> both?

Certainly! If you have a repository foo, and you want to add to it
the contents of the repository bar, you would do this:

On the server housing bar:

svnadmin dump /path/to/bar > bar.dump

Copy bar.dump to the server housing foo.

On the server housing foo:

svnadmin load /path/to/foo < bar.dump


History will be preserved, but the revisions of bar will be
renumbered, appearing after the original revisions of foo. If you
have log messages in bar that refer to other revisions numbers of
bar, these will no longer be accurate.

Note also that this repository merging strategy results in revisions
of the whole repository that are no longer be chronological. This
means the date search feature no longer produces correct results.
e.g. if you say "svn log {2008-01-02}" you might not actually get a
log message from 2008-01-02 anymore.

Users of the bar repository will have to trash their working copies
and check out new working copies from foo.

The other way to merge is to dump both foo and bar repositories to
separate dumpfiles and use a chronological revision merge process,
like the one provided in the script svndumptool, to load the two
dumps into a third new repository. This has the advantage that
revisions are chronological and so the date-to-revision lookup
feature works. It has the disadvantage that any mentions of revision
numbers in *both* repositories are now inaccurate, and that users of
*both* repositories must trash their working copies and check out new

When you dump the old repository, only revisions are included. Locks
are not included, nor authentication nor authorization, nor hook
scripts. If these are important, get them from the old repository
before deleting it.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-15 08:19:14 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.