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

Merging separate repositories into one: RepoMerge.py

From: Matt England <mengland_at_mengland.net>
Date: 2006-01-26 15:49:33 CET

For what it's worth:

I highly recommend updating the following faq entry:

http://subversion.tigris.org/faq.html#multi-merge

With a reference to Dale Hirt's RepoMerge.py script:

http://www.thehirts.net/blog/?page_id=24

I'd also strongly encourage importing said script into the official
Subversion distribution and carrying it forward. My team has used it
several times for multiple repositories, and it's worked like a charm.

RepoMerge.py has the huge benefit (at least for me) of "intermixing" the
input repos (the "to-be-merged repos") rev changes in a chronological order
into the target ("merged") repo.

More details below.

-Matt

Here's the pertinent from my teams internal "subversion admin notes" wiki page:

Merge repos

As taken from http://www.thehirts.net/blog/?page_id=24 ( and referenced at
our internal svn server...deleted ):

RepoMerge

This is a python script that I have written that will take several
Subversion repositories, and merge them into one "super-repository", each
one located in it's own folder under the root.

The specific thing that makes this script needed, is it will merge all the
repositories in chronological order, thereby (theoretically) preserving
your ability to do historical searches. Time will tell if it works or not.
I have tested it and it seems to work. Please leave comments or suggestions
and I will gladly test them out as I have time.

There are three caveats. You can only do this locally. Presumably, this
isn't an issue anyways. The initial code assumes all your repos are in the
same directory, including your new one, and that you are running the script
while in that directory. This code is currently very memory intensive. You
need to "svnadmin create <new-repos>" before you run this script.

Usage:

export PYTHONPATH=/usr/local/lib/svn-python
python RepoMerge.py <Repo to be merged into> <One or more repos to pull
data from>

Enjoy, and let me know about any problems, patches, etc.

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 26 16:05:57 2006

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.