Changing svn repository url in externals property
I'm moving my repository to a new location, but I have folders with the (same) repository URL hard-coded in the externals prope开发者_如何转开发rties. 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.
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)
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.
精彩评论