Changing svn repository url in externals property
Asked Answered
V

2

6

I'm moving my repository to a new location, but I have folders with the (same) repository URL hard-coded in the externals properties. e.g:
old URL: https://OldLocation.Domain/svn/
new URL: https://NewLocation.Domain/svn/

How can I change the old repository URL to the new one? simply editing the property doesn't work.

Valera answered 10/2, 2010 at 19:8 Comment(1)
I don't quite understand what you mean with "editing the property doesn't work". Do you work with svn propget svn:externals and svn propset svn:externals commands?Whithersoever
B
11

You should use relative externals(available since SVN 1.5):

either use "../" as a relative to the current path or

use "^/" relative to the root of your repository.

You also may has to delete (or move away) the current content of the folder with the external, so that an update can write the data to disk (remember: SVN will not overwrite existing files)

Bridgman answered 10/2, 2010 at 19:33 Comment(1)
Note that you only need the clients to be running svn 1.5 or greater. I have had this working with a 1.4 server and 1.5/1.6 clients successfully.Trig
T
3

If I understood your situation correctly, the svn:externals properties point to a URL in the same repository as the directory the properties are on. That is, the location

https://OldLocation.Domain/svn/project/path/to/a/directory

has an svn:externals property pointing to

https://OldLocation.Domain/svn/project/path/to/an/external/library

If your Subversion clients are all using version 1.5 or greater, you can replace all these externals with

^/path/to/an/external/library

where ^ means "the root of the project this directory is in".

Then, when you move the entire repository to NewLocation.Domain, the svn:externals properties will follow and refer to NewLocation.Domain too, and your problem will be eliminated.

Having said all that, I think editing the property should work (and you'll need to do it anyway to convert to the ^ format), but you may need to do some combination of deleting the locally-checked-out copy of the external, updating and committing to satisfy the svn gods.

Trig answered 10/2, 2010 at 19:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.