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

RE: combining two repositories into one

From: Robert Hunter <robert.hunter_at_gen-i.co.nz>
Date: 2005-03-24 05:47:41 CET

Matt Garman wrote:
> I have two individual repositories, projA and projB, set up as
> follows:
>
> /svn/projects/projA
> /svn/projects/projB
>
> What I would like to do is "promote" /svn/projects to be the actual
> repository, with projA and projB both elements within that repository.
> I also want to preserve revision history during the transition.
>
> In other words, I want a single repository for multiple projects,
> but, at the moment, I have multiple repositories for multiple projects.
>
> It seems as though this should be pretty straightforward, I just
> haven't figured out how to do it.

How about (completely untested):

$ svnadmin dump /srv/svn/projA | sed 's/^Node-path: /Node-path: \/projA/g' >
/tmp/projA.svndump
$ svnadmin dump /srv/svn/projB | sed 's/^Node-path: /Node-path: \/projB/g' >
/tmp/projB.svndump
$ svnadmin create /srv/svn/reposC
$ svnadmin load /srv/svn/reposC < /tmp/projA.svndump
$ svnadmin load /srv/svn/reposC < /tmp/projB.svndump

Make sure everything's OK, then delete/move the repositories as you like.

Or, perhaps easier, make a /projA folder in the root of the projA
repository then move everything from the root to that folder.
Do the same for projB. Then...

$ svnadmin create /srv/svn/reposC
$ svnadmin dump /srv/svn/projA | svnadmin load /srv/svn/reposC
$ svnadmin dump /srv/svn/projB | svnadmin load /srv/svn/reposC

As I said, completely untested.... but it's a start :-)

-- 
Robert Hunter
*****************************************************************************
This communication, including any attachments, is confidential.
If you are not the intended recipient, you should not read it
- please contact me immediately, destroy it, and do not copy
or use any part of this communication or disclose anything about it,
Thank you.
Please note that this communication does not designate an information system
for the purposes of the Electronic Transactions Act 2002
******************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 24 05:51:01 2005

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.