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

Re: svn:external and server migration

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Sat, 13 Sep 2008 16:29:45 -0500

On Sep 13, 2008, at 11:24 AM, Lira Olavo wrote:

> Ryan Schmidt wrote:
>> On Sep 12, 2008, at 17:01, Lira Olavo wrote:
>>> I have to migrate SVN from server A and B to server C
>>> and D respectively. The problem is that I have several projects
>>> from server A pointing to server B and vive-verse using
>>> svn:externals, like: https://A/svn/... andhttps://B/svn/
>>> How can I have in my new server C and D those
>>> svn:esternals as https://C/svn/... and https://D/svn/?
>> Upgrade to at least Subversion 1.5 on the client, which supports
>> relative externals.
>> http://subversion.tigris.org/svn_1.5_releasenotes.html#externals
>> Dump your repository, then change the absolute externals you have now
>> into relative externals using svndumptool.
>> http://svn.borg.ch/svndumptool/
>> Then load the modified dump into your new empty repository.
>> All users should delete their working copies and check out new ones.
> Thank you for your answer but it is still not clear for me how I
> can use the svndumptool to do it in an automated way.
> I saw the command Transform-prop and edit, but I'm not sure that
> is what you meant. Could you please provide me an example or more
> detail
> on how to do this operation with svndumptool please?

Sure. I just had to do this on one of my own repositories so I can
show you what I used. My repository had been created before
Subversion 1.5, and my externals definitions were absolute, like
yours, since that's all one could do at the time.

Now I wanted to switch to relative externals so that my repository
URL was no longer hardcoded into the externals, so that I could be
free to change my repository URL if needed.

"svndumptool.py edit" is for replacing the contents of files, so
that's not applicable.

"svndumptool.py transform-prop" is for transforming versioned
properties, and svn:externals is a versioned property, so that's what
we'll use.

I did something like this:

LOAD="$SVNADMIN load --ignore-uuid"

$DUMP /path/to/old/repo > dump

$SVNDUMPTOOL transform-prop svn:externals \
'^(\S+) http://url/to/old/repo(\S+)' '^\2 \1' \
dump dump-transformed

$CREATE /path/to/new/repo
$LOAD /path/to/new/repo < dump-transformed

Note that you won't be able to check out from the new repository
using Subversion clients earlier than 1.5 because they don't know
about relative externals.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-13 23:30:43 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.