Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion externals problem

Tags:

svn

externals

I am new to SVN and make heavy use of the externals property. I have a repository located on my PC and the externals properties have a hardcoded 'localhost' in the name, which is now giving me problems. For example:

/project1/trunk
/shared/trunk

project1/trunk depends on the shared folder so has an svn:externals property of svn://localhost/shared/trunk. This works fine with TortoiseSVN and I can checkout project1/trunk and am given a copy of shared/trunk.

Now I have moved the repository to another server and the externals links no longer work for obvious reasons (TortoiseSVN is trying to checkout out svn://localhost/shared/trunk which no longer exists).

So I need to update all my externals - but I don't want to hardcode any machine names - so how do I make this work? Bear in mind that the repository may move again at some point. Digging around the SVN manuals I came across the ^/ syntax, so I tried the following:

svn:externals shared ^/shared/trunk

This was accepted but when I try and checkout a copy of project1 on my PC I get the following error:

Unrecognized format for the relative external URL 'shared'.
Check the path and/or URL you've entered.

Unless I hardcode the repository machine name in the externals I can't make this work - it seems like a black art so any advice would be welcome.

like image 968
Rob Avatar asked Oct 27 '08 14:10

Rob


1 Answers

The ^/ syntax you refer to is new in SVN 1.5, so you may be using an older version of the client and/or server that doesn't understand that syntax. Also, in order to support the new externals syntax in 1.5, they changed the order of the paramters in the externals definition. I think you want the path first, then the folder name for it to appear under. The details are in the docs.

like image 68
rmeador Avatar answered Sep 22 '22 12:09

rmeador