[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: Sun, 14 Sep 2008 11:40:19 -0500

On Sep 14, 2008, at 3:45 AM, Purple Streak wrote:

> Ryan Schmidt wrote:
>
>> 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.
>
> But if I read Lira's mail right she has externals in Repo A pointing
> to externals in Repo B where A and B are different servers so a repo
> relative external won't help will it

Oh whoops, you're right.

> (all you could hope to remove is
> the https:// so you could switch to svn:// more easily)?

You can do better than that actually. Subversion 1.5 offers many
externals formats now:

http://subversion.tigris.org/svn_1.5_releasenotes.html#externals

I was using "^/ (Relative to the repository root)" because that
worked for me. But Lira could use "../ Relative to the directory with
the svn:externals property" or "// Relative to the scheme" or "/
Server root relative URLs." I wouldn't recommend relative to the
scheme (you'd have to keep repeating the hostname in your externals
definitions) but relative to the server root should work well,
assuming you don't plan to change where within your host's URL space
the repositories are stored.

> However if I read Ryan's script correctly it's all in the line that
> does the url changing.
>
> '^(\S+) http://url/to/old/repo(\S+)' '^\2 \1'

Exactly. For each line of every svn:externals definition, it matches
and remembers the first word, and the path within the repository at
the old URL, and replaces it with those two in reversed order, with a
"^" in front of the repository path to make it a repository relative
definition.

> My regexp's are always rusty but if you were dumping server A's repo
> the above regexp needs to be changed replace https://Repo B/.... with
> https://Repo D/... and keep the rest of the URL the same. Maybe
> something like...
>
> '^(\S+) http://Repo B(\S+)' '^\1 http://Repo D\2'
>
> (but I would double check that line first!)

---------------------------------------------------------------------
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-14 18:41:28 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.