I need to switch the base URL of my working copy in subversion.
According to the manual for 1.7 I should be able to use svn relocate. http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.relocate.html
However, on Ubuntu Linux 12.04 I have version 1.6 which doesn't appear to have the relocate command.
Is there a way to accomplish this in subversion 1.6 or by some other method?
The --relocate option causes svn switch to do something different: it updates your working copy to point to the same repository directory, only at a different URL (typically because an administrator has moved the repository to another server, or to another URL on the same server).
The relocate command is only used if the URL of the repository root has changed. Possible reasons are: The IP address of the server has changed. The protocol has changed (e.g. http:// to https://). The repository root path in the server setup has changed.
Moving files and folders select the files or directories you want to move. right drag them to the new location inside the working copy. release the right mouse button. in the popup menu select Context Menu → SVN Move versioned files here.
If you are using TortoiseSVN (and I'm sure there's a command line tool for this as well, but I'm using Tortoise), you can simply right-click on your existing working copy folder and select TortoiseSVN –> Relocate. In the dialog that comes up, enter the new location of the repository, and click OK.
I found the answer I was looking for. It's just a matter of running
svn switch --relocate OLD_URL NEW_URL
It looks like on subversion 1.7 you can use the new syntax:
svn relocate NEW_URL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With