SVN Switch Relocate - is not the root of the repository

Viewed 35896

I'm trying to move a working copy folder from it's old dedicated svn server, to a new svn server where it is contained within a sub-folder. Using the following relocate command:

svn switch --relocate https://oldserver/svn/repos https://newserver/some/directory 

I get:

svn: 'https://newserver/some/directory ' is not the root of the repository

Which is correct ..... but, err, how do I move the location regardless?

4 Answers

As far as I understand, you can't use svn switch (with or without --relocate) to move to a new repository. Think about it this way: your new repository's HEAD revision is x, your old repository's revision is y, so what is SVN supposed to do with the working copy's base revision?

svn help switch says that --relocate is used to:

Rewrite working copy URL metadata to reflect a syntactic change only. This is used when repository's root URL changes (such as a scheme or hostname change) but your working copy still reflects the same directory within the same repository.

Since this is not the case, I'm afraid you'll have to perform a fresh checkout.

Well im assuming youve already actually migrated the repository via svnadmin dump/svnadmin load so in that case you could try: svn switch --relocate https://newserver/some/directory If you get the same error you might actually have to just do a new svn co. I dont recall ever coming across that error but then all my repos use a nested structure like the one youre moving to so its possible ive never had to deal with it :-)

Related