Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename an SVN branch and update references in an existing sandbox?

Tags:

branch

rename

svn

I needed to rename a SVN branch, so I did:

$ svn move https://server/repos/myrepo/branches/oldbranch \     https://server/repos/myrepo/branches/newbranch

So far, so good -- the branch has been renamed.

The trouble is, we have existing sandboxes checked out from this branch and when I try to update I get this error:

$ svn update svn: Target path '/branches/oldbranch' does not exist

A fairly self-explanatory error. After a quick search I thought I had found the solution: Relocating SVN working copy following branch rename

The trouble is, that when I try to issue that command I get another error:

$ svn switch --relocate https://server/repos/myrepo/branches/oldbranch \     https://server/repos/myrepo/branches/newbranch svn: Relocate can only change the repository part of an URL

As far as I can see, I am using the --relocate command the same way as Sander Rijken. Any ideas why I get this error?

like image 964
Lee Netherton Avatar asked Feb 24 '11 09:02

Lee Netherton


1 Answers

Just do

svn switch https://server/repos/myrepo/branches/newbranch 

from within your working copy.

like image 180
khmarbaise Avatar answered Sep 20 '22 19:09

khmarbaise