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

Re: Move several repositories into on but keeping the history?

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Fri, 7 Aug 2009 13:34:11 -0500

On Aug 7, 2009, at 10:25, Steve Constable wrote:

> I'd like to consolidate several repositories into one large one.
> What I'm worried about is that I might loose all the history from
> each of the repos.
> Is there a way to keep the history? I'm imagining that the old
> repository numbers would get renumbered...but that I can live with
> since that would be unavoidable.

Of course you can keep the history. :)

1. "svnadmin dump" each old repository to a file.

2. "svnadmin create" the new repository.

For the third step, you have two choices.

3a. "svnadmin load" the first old dumpfile into the new repository,
making sure to use the "--ignore-uuid" parameter because you do not
want to inherit the UUID of the first old repository because this new
repository will not be the same. You may also want to use the "--
parent-dir" parameter to tell it to put the contents of the old
repository into a subdirectory of the new repository. Note that you
must "svn mkdir" the new directory before you can "svnadmin load"
anything into it. Repeat for each old dumpfile (but you only need "--
ignore-uuid" the first time, when the new repository is still empty).

The problem with the above strategy is that the revision numbers will
not be in chronological order. That is, you'll have all the revisions
of the first project chronologically, and then the next revision, for
the next project, will jump back in time. This means you will never
be able to reliably use Subversion's date-based revision selection
mechanism (e.g. "svn log -r {2009-01-01}"). (If you try, it may
silently give you the wrong revision.) The solution is to interleave
the revisions of the old projects so that they remain in
chronological order.

3b. use "svndumptool merge" to combine all the old dumpfiles into a
new single one with revisions in chronological order. Then "svnadmin
load" that into the new repository, using again the "--ignore-uuid"


Regardless which method you choose, revisions will be renumbered.
This will impact anywhere you have revision numbers recorded, for
example your log messages or your issue tracker. If you have
externals definitions pointing back to your own repository(ies), both
the revisions and the paths may need to be changed. Note that you
should be able to use "svndumptool transform-prop" to fix these
before you load them.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-07 20:35:10 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.