This seems to happen to me all the time lately. I have a repository "X". That repository has a backup. One day the server hosting repository X dies, so I have to create a new location for my SVN repository using the backup. Here is the problem:

I have hours of work done on my working copy. When I click commit, it tries to commit the changes to the dead repository URL. I want the working copy to start treating the NEW repository X without any hassle, but running "switch" doesn't work ("These are not the same repositories").

What I usually do is create a patch from the working copy, check out the new repository and apply the patch. Recently however, I keep getting errors and crap from the patch files, so I no longer trust them. The latest solution for me has been to create a whole new repository and copying the files over, losing all the file history.

Obviously this is unacceptable, so if anyone knows a way to start working with a new repository smoothly and effortlessly, please reply.

Accepted Answer

Have you tried svn switch --relocate? That allows you to update the repository's root URL, rather than just the path within the repository.

Written by Brian Campbell
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki