Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the repository url using AnkhSVN 2.x

Tags:

svn

ankhsvn

I'm connecting to my Subersion server (VisualSVN server 1.6.3) using Ankh v2.0.5250.202 on VS 2008

The current url for my repository is https://svnserver:8443/svn/foo/foo/trunk/ and I want to switch to https://svnserver:6002/svn/foo/foo/trunk/

I'm using the "Switch To" tool to select a new URL 'available on the right hand of the url bar in the "pending changes" window.

Unfortunately, when I select the new url, I get an error stating that 'https://svnserver:8443/svn/foo/foo/trunk' is not the same repository as 'https://svnserver:6002/svn/foo'

I've tried to input 'https://svnserver:6002/svn/foo', 'https://svnserver:6002/svn/foo/foo', 'https://svnserver:6002/svn/foo/foo/trunk', but I'm always getting the same error.

Is there a fix? Or a config file that I can manually edit ? (I didn't find such a config file)

Note : On the server side, I've juste changed the server port without touching anything else. I can browse through the repository using the repository explorer so I think the problem is on the client side.

like image 619
Brann Avatar asked Nov 30 '22 12:11

Brann


2 Answers

In the daily builds of AnkhSVN (and since March 2009 the stable version) the Switch command will handle this case for you.

AnkhSVN will detect that the repository root doesn't match and then it will ask you if you wish to relocate.

See http://ankhsvn.net/daily/ for the daily builds.

like image 65
Bert Huijben Avatar answered Dec 09 '22 10:12

Bert Huijben


The "switch" command is the wrong command to use!

You have to use the "relocate" command. Not sure if AnkhSVN has this though.

For the svn client, you have to use

svn switch --relocate FROM TO [PATH...]

(yes, it's the 'switch' command, but only UI wise - internally, relocating uses a completely different API than switch).

like image 23
Stefan Avatar answered Dec 09 '22 08:12

Stefan