Change the repository location in subversion

I recently moved a subversion repository to another location and had to update all the Eclipse projects to the new URL. The clumsy way would be to checkout the whole project again from the new repository URL but there is also a command line way to easily switch everything (Subclipse doesn’t offer that possibility directly though):

svn switch --relocate <oldUrl> <newUrl>

Mind that “oldUrl” and “newURl” have to be full addresses, not some kind of subdirs or relative to another.

Juist to mention it: Subversion 1.4 and 1.5 repositories are not backwards compatible and whenever you use a 1.5 client to check something in there is hardly any way to move back to 1.4 (and 1.4 clients won’t work with the repository anymore).

This entry was posted 1 year, 7 months ago by Daff
Tags: ,
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “Change the repository location in subversion”

  1.  

    1 year, 7 months ago

    Ah, you linux guys… You can find a setting in the gui at the first glance and run happily to your console prompt :-p

    Of course is the switch command available in subclipse as well as in TortoiseSVN (the best Windows Explorer integrated tool for SVN without IDE).

    Here is the proof: http://subclipse.tigris.org/images/menu-ss.png

    ( and here is the whole page with more screenshots http://subclipse.tigris.org/servlets/ProjectProcess?pageID=rr1TIx )

    Addition: The switch command is not for moving between repositories but just within one. So if you want to change the repository url to the new url of the same repo (svn does checksum tests) you have to use the relocate command offered in the svn explorer view of eclipse (right click on the repository).

  2. andrew
     

    7 months ago

    Thanks for the tip, a few minor points though:
    - there must be two dashes before “relocate”
    - the urls must be full

    Thanks!

  3. andrew
     

    7 months ago

    Forgot another thing:
    - there is a dot missing at the end

  4.  

    6 months ago

    Thank you andrew for your tips.

    Based on the first two we changed the article a bit, but I am not sure about the last one with the dot.

    Are you sure?

  5.  
 

Leave a Reply