Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch subversion repository in Visual Studio using AnkhSVN?

I've been developing a project locally and using a local svn server for versioning in visual studio. I now want to switch to xp-dev hosted versioning but cannot seem to get rid of the svn bindings on my solution? Is there an easy way to duplicate a solution without its versioning settings or to simply switch to the other svn (which is completely empty)?

like image 438
Paulo Avatar asked Feb 16 '10 22:02

Paulo


People also ask

How do I move a SVN project from one repo to another?

If you don't want history, you can use svn export to get a clean folder without the . svn folders and then svn import into your other repository. With history, you would need to use the svnadmin dump . You would then use svndumpfilter to filter for only the parts or paths you want to use before using svnadmin load .


2 Answers

Try going to File > Subversion > Change Source Control... and changing the SCC Binding URL.

EDIT: I see that's not editable. You may need to drop to the command line for this.

In your base directory, issue this svn command:

svn switch --relocate http://old.repo.location http://new.repo.location

with your speific URLs, of course. I'd recommend reading up on the switch command so you're sure of what you're doing. When you reopen VS, AnkhSVN should pick up the new bindings. If you've added the solution through the File > Subversion menu, you may need to edit the .sln file. Just open it in a text editor and change all of your old repository URLs to the new URL.

You could also install TortoiseSVN and use the context menu to issue the Relocate command. This will be the easiest.

Back up your directory before any of these changes, of course.

like image 146
Don Avatar answered Nov 16 '22 01:11

Don


Other way is to edit wc.db (SQLite file) in your ".svn" folder, which contains repository URL. I used Firefox addon SQLITE editor, then in table REPOSITORY is only 1 row saying your repository URL, change it to new host and there you go.

My case was that I have new computer with new HOST, so all my projects added to SVN repository had and old URL (old hostname).

like image 32
RetroIP Avatar answered Nov 16 '22 01:11

RetroIP