Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you re-attach a subversion local copy to a different remote?

Tags:

svn

Our subversion repository has been moved to a new host, and we have old applications that connect to that host. We CANNOT add an alias for the new server with the old name, how can we re-connect our checked out clients to the new repository?

like image 420
stevemac Avatar asked Sep 22 '08 01:09

stevemac


People also ask

How do I copy an svn repository to another SVN server?

You can migrate a repository using the svnadmin dump function. On the SVN server, type svnadmin dump /absolute/path/to/the/repo > /tmp/repo. svndump . This will export the entire repository to a text file in the system's temporary directory and name it "repo.

How do I clone a local repository in svn?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...


2 Answers

Example:

svn switch --relocate \
    http://svn.example.com/path/to/repository/path/within/repository \
    http://svnnew.example.com/new/repository/path/within/repository

One thing which is to remember, lets assume you checked out the project "path/within/repository" then you have to go to the root of your working copy, and execute the above command. it is NOT enough just to use the repository root (as in svn switch --relocate http://svn.example.com/path/to/repository/ http://svnnew.example.com/new/repository/), because that wouldn't work.

like image 164
Mauli Avatar answered Sep 16 '22 15:09

Mauli


Look up the svn switch command. In particular, the --relocate option is what you want.

like image 34
Greg Hewgill Avatar answered Sep 16 '22 15:09

Greg Hewgill