Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem trying to relocate WC to new repository

I have several working copies that were checked out of old repositories.
The old repositories are now combined into a new repository, therefore the repository name and the locations inside the new repository have changed.
Now I want to relocate these working copies to their new locations into the new repository.

When doing a Relocate with TortoiseSVN, I get a warning:

It seems you are trying to relocate your working copy to a different path inside the same repository.
From: https://old-repository/oldpath/folder
To: https://new-repository/newpath/folder
A relocate is only needed if the path to a repository has changed.
Changing to a different path inside a repository is done by a switch operation.

But it's not a different path inside the same repository. It really is a newly created repository with a different path / name.
When I ingore the warning and continue with the Relocate, I get an error:

The repository at 'https://new-repository/newpath/folder' has uuid 'd3b83275-bf16-aa42-9467-f8a402003233', but the WC has '30e22be1-af51-d84d-ad8f-d4e8545a4735'

Where is my mistake?

like image 355
Holgerwa Avatar asked Aug 25 '10 11:08

Holgerwa


People also ask

How do I move my TortoiseSVN repository?

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.

What is svn relocate?

The first svn relocate syntax allows you to update one or more working copies by what essentially amounts to a find-and-replace within the repository root URLs recorded in those working copies. Subversion will replace the initial substring FROM-PREFIX with the string TO-PREFIX in those URLs.

How do I move svn to another server?

You can migrate a repository using the svnadmin dump function. On the SVN server, type svnadmin dump /absolute/path/to/the/repo > /tmp/repo. svndump . This will export the entire repository to a text file in the system's temporary directory and name it "repo.

How do I change my TortoiseSVN URL?

You can right click your working copy and select TortoiseSVN/Switch... Then change the "To path:" to the new folder in the repository. It worked for me.


2 Answers

You can not do relocate to a new repository, you need to delete your working copy and do a clean checkout. Relocate can only be used if a repository has been moved unchanged to a new server or the server has got a new name.

like image 145
Albin Sunnanbo Avatar answered Oct 31 '22 08:10

Albin Sunnanbo


If you really wanted to force what you're attempting to do, you could use the command:
svnadmin setuuid

to set the new repoistory to the same GUID as the old.

That would take care of the uuid error, and enable you to try again the svn switch.
(with or without the --relocate; I can't tell from your descriiption exactly how you've rearranged the paths inside the repository)

like image 41
William Leara Avatar answered Oct 31 '22 09:10

William Leara