SVN - Change working copy to point at new svn path

SvnPathWorking Copy

Svn Problem Overview


I've got a SVN Repository that has moved to a new address/path. However, I've got a working copy with uncommitted source code still pointing to the old (now invalid) repository path. How do you change a working copy to point at a new repository?

Svn Solutions


Solution 1 - Svn

svn switch --relocate is deprecated as of version 1.7 of subversion. Use the svn relocate command instead.

It takes either FROM-PREFIX TO-PREFIX [PATH...] or TO-URL as arguments.

See

svn help relocate

for more information.

Solution 2 - Svn

Use the svn switch command with the --relocate command line option.

Solution 3 - Svn

Using TortoiseSVN

  1. Right click on working copy and select 'SVN Switch...'
  2. On 'Switch to branch' form Select new SVN path

Using Command

  1. Open console
  2. Navigate to the working copy cd [working copy path]
  3. Write the command svn relocate [new url]

Solution 4 - Svn

To be more precise

svn switch --relocate [complete url of the old repo] [complete url of the new repo] 

For example:

svn switch --relocate  http://svn.repo.com:9880/website/branches  http://svnrepo.com/web/branches 

Solution 5 - Svn

Using TortoiseSVN tortoisesvn docs

  1. Go to the working copy's root folder
  2. Right Click, Click TortoiseSVN Submenu, Click Relocate.
  3. Enter the new path

Solution 6 - Svn

Very Simple :

Step 1: Open command prompt / terminal and set workpath

Step 2: Execute this line svn switch --relocate http://newurl

Solution 7 - Svn

I had changed my svn server to force redirect everything from HTTP to HTTPS (and it could have been a redirect to any other URL), and I noticed that this svn relocate command was causing lots of problems with externals. Fortunately I found that the easiest thing was to just do an svn update and due to the redirect of the svn server, it updated all the URLs store in the local working copy, including the externals.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionquanoView Question on Stackoverflow
Solution 1 - SvnMichael KrebsView Answer on Stackoverflow
Solution 2 - SvnGreg HewgillView Answer on Stackoverflow
Solution 3 - SvnAhmed AbdallahView Answer on Stackoverflow
Solution 4 - SvnBTR NaiduView Answer on Stackoverflow
Solution 5 - SvnYitzhak WeinbergView Answer on Stackoverflow
Solution 6 - SvnRajesh LoganathanView Answer on Stackoverflow
Solution 7 - SvnGunther SchadowView Answer on Stackoverflow