1
votes

i copied an existing svn folder (a) to a new folder b and want to also switch the repository url. Its still pointing to a repo.

i try svn switch --relocate but only get:

svn: Relocate can only change the repository part of an URL

What is the right way to do this task?

Thanks for your help!

1
You have (a) point to repo (1) and now you have (b) pointing to repo (1) but you want (b) pointing to repo (2) ? Is that about right? - nicolaskruchten
svn switch --relocate seems to be the right command for what you're trying to do. Double check the syntax and see if you're giving it the right parameters: svnbook.red-bean.com/en/1.1/re27.html - hexium
yes. i already created an empty folder at repo 2. Now i need to point b to repo 2 and ci the content? - phx
my syntax is like: svn --relocate svnserver.com/some/folder/a svnserver.com/some/folder/b - phx
If your repo2 is a new repository, why do you want your existing checked out folders (b, which is a copy of a) pointing to it? Wouldn't a fresh checkout work? - hexium

1 Answers

2
votes

--relocate can only change the base repository, not the path within a repository

For example:

To switch from http://serverA/repo/path/to/dir to another repo http://serverB/repo/path/to/dir you would type in:

svn switch http://serverA/repo http://serverB/repo

Read svn switch from the SVN Book

As per your comment

my syntax is like: svn --relocate svnserver.com/some/folder/a svnserver.com/some/folder/b

You cannot use --relocate to change folder path, only the repo.