John Leehey
John Leehey

Reputation: 22240

Quick way to rename server url of all svn:externals?

I realize that as of SVN 1.5 you are able to use relative paths for externals, but is there a quick solution to modify all externals recursively for those who did not utilize this option?

We recently moved our repository over to a new server, and we need to rename all the server names in the URLs that they point to to the new server name. I can do this manually but it's already very tedious, as we have a very large repository.

Upvotes: 2

Views: 243

Answers (1)

Antonio Pérez
Antonio Pérez

Reputation: 6982

I see no easy way of doing it, but using the command line client you could write a script to save a little bit of manual work. Something like this:

svn propget svn:externals $MY_VERSIONED_DIR > old_server_externals
cat old_server_externals | sed s/old_server/new_server/g > new_server_externals
svn propset svn:externals -F new_server_externals $MY_VERSIONED_DIR

Check the documentation for the subversion command line client for details.

Upvotes: 1

Related Questions