Switching subversion repository

If you use Subclipse, switching to another repository in a local working copy can be pain in the ass, because Subclipse (and I think svn itself) only allows to change the path of the repository if it’s still in the same repository. I had to change the path from http://.. to https://.. and couldn’t do it in Eclipse. Subclipse reported an error: “https://.. is not the same repository as http://.. “. As a last resort I decided to manually update the repository in all of the svn’s entries files using the magic xargs command. Running this command in the project root directory did the trick (works with Cygwin on Windows as well):

find . -name entries | xargs sed -i "s/http:\/\//https:\/\//g"

One comment

  1. Try perspective “SVN Repository Exploring” and right click on your old repo. and hit “Relocate” – then in your regular perspective relocate to the correct path.

Leave a comment