views:

2312

answers:

3

An svn repository I'm mirroring through git-svn has changed URL.

In vanilla svn you'd just do svn switch --relocate old_url_base new_url_base.

How can I do this using git-svn?

Simply changing the svn url in the config file fails.

+1  A: 

Hello, I found some instructions for this here:

http://www.sanityinc.com/articles/relocating-git-svn-repositories

Hope this helps!

Adam

Adam Alexander
well, the link in the comment at the bottom helped, thanks.
kch
+8  A: 

This handles my situation pretty well:

https://git.wiki.kernel.org/index.php/GitSvnSwitch

I'm on the same cloned from file:///… now want to move to http://…

kch
to be fair, this actually failed for me, and I ended up re-cloning the repo. It is hard to get git to handle it when the svn directory is renamed.
Gregg Lind
You should accept your answer. It is the correct hint for solving the svn server migration.
Palimondo
I would prefer to accept a more detailed writeup, but fair enough, I'll accept it until a new answer comes along.
kch
A: 

You can see if the following works OK:

1)If svn-remote.svn.rewriteRoot does not exist in config file:

git config svn-remote.svn.rewriteRoot <currentRepository>

2)If svn-remote.svn.rewriteUUID does not exist in config file:

git config svn-remote.svn.rewriteUUID <currentRepositoryUUID>

currentRepositoryUUID can be obtained from .git/svn/metadata

3) git config svn-remote.svn.url <newRepository>

H Krishnan