You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Zack Galbreath <za...@kitware.com> on 2008/01/16 16:42:06 UTC
relocating an SVN repository
Hi,
I need to move an SVN repository from one domain to another. I would
like to do this in a seamless fashion so that users don't have to run
svn switch or check out a fresh copy of the repository from the new
location. Is this possible?
I tried to accomplish this by using apache2's RedirectMatch directive.
Here's what I put into the config file on the old server:
RedirectMatch permanent ^/svn/reposName/(.*)$
http://www.new-domain.com/svn/reposName/$1
If I access the repository through a web browser using the old address
the redirect works properly. If I try to do an svn checkout using the
old address it fails with the following message:
bash-3.2$ svn co http://www.old-domain.com/svn/reposName/trunk reposName
svn: PROPFIND request failed on '/svn/reposName/trunk'
svn: PROPFIND of '/svn/reposName/trunk': 301 Moved Permanently
(http://www.old-domain.com)
I've confirmed that checking out the repository by using the new address
works properly, so it's not a misconfiguration on the new server. Is
what I'm trying to do possible, or am I going to have to tell all of my
users to run svn switch?
-Zack
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: relocating an SVN repository
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 16, 2008, at 10:42, Zack Galbreath wrote:
> I need to move an SVN repository from one domain to another. I
> would like to do this in a seamless fashion so that users don't
> have to run svn switch or check out a fresh copy of the repository
> from the new location. Is this possible?
No, I don't think it's possible. Instruct your users to "svn switch --
relocate" after relocating the repository.
> I tried to accomplish this by using apache2's RedirectMatch
> directive. Here's what I put into the config file on the old server:
>
> RedirectMatch permanent ^/svn/reposName/(.*)$ http://www.new-
> domain.com/svn/reposName/$1
>
> If I access the repository through a web browser using the old
> address the redirect works properly. If I try to do an svn
> checkout using the old address it fails with the following message:
>
> bash-3.2$ svn co http://www.old-domain.com/svn/reposName/trunk
> reposName
> svn: PROPFIND request failed on '/svn/reposName/trunk'
> svn: PROPFIND of '/svn/reposName/trunk': 301 Moved Permanently
> (http://www.old-domain.com)
>
> I've confirmed that checking out the repository by using the new
> address works properly, so it's not a misconfiguration on the new
> server. Is what I'm trying to do possible, or am I going to have
> to tell all of my users to run svn switch?
Redirects are a nice idea, which I tried myself with earlier versions
of Subversion, but Subversion does not seem to support them.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: relocating an SVN repository
Posted by Scott Gifford <sg...@suspectclass.com>.
Zack Galbreath <za...@kitware.com> writes:
[...]
> I tried to accomplish this by using apache2's RedirectMatch directive.
> Here's what I put into the config file on the old server:
>
> RedirectMatch permanent ^/svn/reposName/(.*)$
> http://www.new-domain.com/svn/reposName/$1
You could try using mod_rewrite's proxy feature to transparently proxy
the requests to the new URL. See the [P] option to a rewrite rule in
the Apache docs for details.
Good luck!
---Scott.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: relocating an SVN repository
Posted by Blair Zajac <bl...@orcaware.com>.
Zack Galbreath wrote:
> Hi,
>
> I need to move an SVN repository from one domain to another. I would
> like to do this in a seamless fashion so that users don't have to run
> svn switch or check out a fresh copy of the repository from the new
> location. Is this possible?
>
> I tried to accomplish this by using apache2's RedirectMatch directive.
> Here's what I put into the config file on the old server:
>
> RedirectMatch permanent ^/svn/reposName/(.*)$
> http://www.new-domain.com/svn/reposName/$1
>
> If I access the repository through a web browser using the old address
> the redirect works properly. If I try to do an svn checkout using the
> old address it fails with the following message:
>
> bash-3.2$ svn co http://www.old-domain.com/svn/reposName/trunk reposName
> svn: PROPFIND request failed on '/svn/reposName/trunk'
> svn: PROPFIND of '/svn/reposName/trunk': 301 Moved Permanently
> (http://www.old-domain.com)
>
> I've confirmed that checking out the repository by using the new address
> works properly, so it's not a misconfiguration on the new server. Is
> what I'm trying to do possible, or am I going to have to tell all of my
> users to run svn switch?
It's better to not have the redirect and have all clients use 'svn switch
--relocate'. I don't know off hand if the native C svn client nor the JavaSVN
clients honor redirects.
Blair
--
Blair Zajac, Ph.D.
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org