Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

svn help relocate

for more information.

Thanks. This is what I used: svn switch --relocate file:///Users/user/old_repository/project/trunk file:///Users/user/new_repository/project/trunk quano Jan 30, 2010 at 3:02 This is applicable only if using TortoiseSVN, which the poster didn't indicate he or she is using. zck Nov 4, 2013 at 22:02 Hi @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 Ahmed Abdallah Nov 9, 2013 at 1:01 Well, 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. zck Nov 9, 2013 at 1:07 No, 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 Ahmed Abdallah Nov 9, 2013 at 1:38 The 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. Gerard ONeill Oct 2, 2019 at 20:58

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 
  • Go to the working copy's root folder
  • Right Click, Click TortoiseSVN Submenu, Click Relocate.
  • Enter the new path
  • 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.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.