Thursday, 27 October 2011

Sorting out project's SVN location in Eclipse after moving the project in SVN

Just ran into an issue where I used Subversive's "SVN Repository Browser" view to move a project in SVN back one level. I had this project checked out into my Eclipse workspace, but now it was pointing to a location in SVN that no longer existed.

I could not find a way to change the URL the project was looking for through Subversive. I first tried "Team->Disconnect" on the project, which removed it from SVN. Then, Team->Share Project gives you a dialog to choose the SVN repository URL; however the input field was read-only and I could not change it.

After a little bit of googling, I came across this blog post detailing how to edit the SVN meta data to point to the right URLs.

The script in the comments seemed nice, and trying it out worked great. I'd close the project in Eclipse first just to be safe.

Execute this in the top level of your SVN project:

find . -name entries -type f -exec sed 's@svn+ssh://' -i {} \;


No comments: