SVN - Change working copy to point at new svn path
94,172
Solution 1
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
Use the svn switch
command with the --relocate
command line option.
Solution 3
Using TortoiseSVN
- Right click on working copy and select 'SVN Switch...'
- On 'Switch to branch' form Select new SVN path
Using Command
- Open console
- Navigate to the working copy
cd [working copy path]
- Write the command
svn relocate [new url]
Solution 4
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
Using TortoiseSVN tortoisesvn docs
- Go to the working copy's root folder
- Right Click, Click TortoiseSVN Submenu, Click Relocate.
- Enter the new path
Author by
quano
Updated on February 03, 2020Comments
-
quano over 4 years
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?
-
quano over 14 yearsThanks. This is what I used: svn switch --relocate file:///Users/user/old_repository/project/trunk file:///Users/user/new_repository/project/trunk
-
zck over 10 yearsThis is applicable only if using TortoiseSVN, which the poster didn't indicate he or she is using.
-
Ahmed Abdallah over 10 yearsHi @zck please note that I wrote 2 solution in 1 answer first TortoiseSVN and the second is Command this command is deprecated for subversion in general you can review this page svn relocate/svn Subcommands
-
zck over 10 yearsWell, your answer was edited after I commented to include a commandline way of doing it. That commandline answer was already posted in June, so there's no need to repeat it.
-
Ahmed Abdallah over 10 yearsNo, I post the answer in its current words my edit just for improve formatting; and I think the command I wrote is more clear than the one was wrote in June
-
Spear about 7 yearsDoes not fix the URLs in svn:externals. Any idea how to do that ?
-
Gerard ONeill over 4 yearsThe TortoiseSVN GUI way requires a click on 'relocate', and not switch. Which makes sense given the command line.. Not sure what switch would do -- it seemed to be trying to access the old URL and the new URL, something I didn't want it to do.