[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: Lira Olavo <Olavo.LIRA_at_gemalto.com>
Date: Wed, 17 Sep 2008 20:56:42 +0200

Hello to all,

        Thanks a lot for all your help it really helped! I created a script to
run the regexp several times to change all the properties (is there a way to
call the python do do it for me?).
        The problem is that I'm still using the old format of links. I read many
times about the new way in
http://subversion.tigris.org/svn_1.5_releasenotes.html#externals but I could
understand how it can help on my case where I have 2 different repositories.
What they mean by " relative to the scheme" for instance?

        Could you give an example how this 2 old-fashioned properties would look
like when using the new format?

        Link 1: DirB https://server/repositoryA/Project1/DirA
        Link 2: DirA https://server/repositoryB/Project2/DirB

Thank you once more, you are really helping me out with those information!!!

Olavo Lira

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2008c_at_ryandesign.com]
Sent: Sunday, September 14, 2008 12:40 PM
To: Purple Streak
Cc: svn [usr]; Lira Olavo
Subject: Re: svn:external and server migration

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!)

  • application/x-pkcs7-signature attachment: smime.p7s
Received on 2008-09-17 20:57: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.