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).

About Daff

I started studying computer sciences at the Munich university of applied sciences in late 2005.
This entry was posted in common and tagged , . Bookmark the permalink.

8 Responses to Change the repository location in subversion

  1. stevie says:

    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. stevie says:

    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).

  3. andrew says:

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

    Thanks!

  4. andrew says:

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

    Thanks!

  5. andrew says:

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

  6. andrew says:

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

  7. stevie says:

    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?

  8. stevie says:

    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?

Leave a Reply