Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn relocate error -- invalid relocation destination

Tags:

svn

Our svn repo's location was changed to a different url, and in addition the relative paths of trunk, branches, and tags were moved a little. Now when I try to svn relocate, I get this message.

Invalid relocation destination: 'https://my-repo-server/new-proj-name/branches/my-branch' (does not point to target)

I tried relocating to the url of the repo, and tried again with the url of the branch I wanted to switch to. I did not try with switch --relocate as that is deprecated in my version of svn.

I believe this would have worked had the folder structure not also been changed.

like image 226
AlexMA Avatar asked Jan 23 '15 19:01

AlexMA


3 Answers

Solved it with a stopgap solution -- from within the root of the working copy, deleted the .svn folder and ran svn checkout <new-url-of-branch> .

If anyone has a better answer that doesn't involve deleting the .svn folder, I will select it.

like image 114
AlexMA Avatar answered Nov 07 '22 15:11

AlexMA


According to TortoiseSVN the relocate command shouldn't be used if:

You want to switch to a different branch or directory within the same repository. To do that you should use TortoiseSVN → Switch.... Read the section called “To Checkout or to Switch...” for more information.

Therefore, you should perform svn switch https://my-repo-server/new-proj-name/branches/my-branch since you are moving within the same repository.

like image 24
RLThomaz Avatar answered Nov 07 '22 17:11

RLThomaz


(This was meant as comment to @AlexMA's own answer, but some ended up on its own.)

Maybe one can edit the wc.db inside .svn directory with sqlite3 CLI. But first one has to find out the structure of the database to edit the relevant tables directly via SQL - simply dumping wc.db, editing the dump file, loading back as with the repository results in a working copy no longer recognized as such. But this may open further issues. After all the working copy is regarded as dispensable by the SVN developers, so better update the WC to the last revision of the old repository, checkout a new WC from the new repository at the same revision, then copy all uncommitted modifications from old to new WC and recreate any changelists.

like image 1
JayAitch Avatar answered Nov 07 '22 16:11

JayAitch