You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tim Watts <tw...@dionic.net> on 2012/04/16 21:56:15 UTC

Implementations of an SVN/DAV aware proxy?

Hi,

****
Anyone know if there is a workable SVN/DAV proxy that exists that can 
handle the protocol enough to make all the translations required between 
differing old/new URIs?
****

Why?

We're changing SVN servers from mod-dav-svn to SCM-Manager - and one 
minor fly in the ointment is the style of our old repo URI, which was of 
the form:

https://host.../repositories/<REPO>

Our test SCM server is serving on:

https://host.../svn/<REPO> which is the form we prefer.

Naively, I assumed I could create a virtual SVN instance with a simple 
Apache proxy rule (or rewrite) mapping /repositories/ to /svn/ (we are 
using Apache in front of SCM anyway).

Sadly, the DAV protocol stuffs this up somewhat and it doesn't work.
well, svn ls ... works, but svn co ... gets confused, and looking at it 
with Wireshark suggests some of the DAV/SVN protocol is carrying 
knowledge of /svn/<REPO> deeper in the protocol (ie not just headers).


It's not the end of the world - worst case is I can write a perl script 
to change the URL in any given checkouts (and there are probably a 
hundrend SVN checkouts with knowledge of the old URI).

But it made me curious as Google has not been my friend...

Cheers,

Tim
-- 
Tim Watts
Personal Blog: http://www.dionic.net/tim/

Re: Implementations of an SVN/DAV aware proxy?

Posted by Les Mikesell <le...@gmail.com>.
On Tue, Apr 17, 2012 at 5:01 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> svn 1.7 is supposed to follow 301(permanent)/302(temporary) redirects.
> Are you on 1.7.x?
>

That's not the same thing as working correctly through a proxy.  There
are all sorts of reasons to use proxies, some involving firewalled or
unrouted networks where the client can't directly access the real
server.    The real problem is that the path on the real host leaks
back to the client which should only know about the path mapped in the
proxy.   If this can't be fixed, it should at least be documented that
it won't work unless the paths match.

-- 
  Les Mikesell
     lesmikesell@gmail.com

Re: Implementations of an SVN/DAV aware proxy?

Posted by Tim Watts <tw...@dionic.net>.
On 17/04/12 16:57, Ryan Schmidt wrote:
>
> Then you need to be aware that on 1.6.x and earlier, the command was not called "svn relocate" but rather "svn switch --relocate".
>

Ta - I figured that out :)

And it works perfectly...

Thanks for all the help!

Tim

-- 
Tim Watts
Personal Blog: http://www.dionic.net/tim/

Re: Implementations of an SVN/DAV aware proxy?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 17, 2012, at 06:40, Tim Watts wrote:
> On 17/04/12 11:01, Daniel Shahaf wrote:
>> 
>> Tim Watts wrote on Tue, Apr 17, 2012 at 09:25:01 +0100:
>>> Lorenz<lorenznl<at>  yahoo.com>  wrote:
>>>> Tim Watts wrote:

>>>>> We're changing SVN servers from mod-dav-svn to SCM-Manager - and one
>>>>> minor fly in the ointment is the style of our old repo URI, which was
>>>>> of the form:
>>> 
>>>> is there a reason you can't just use 'svn relocate' on the working
>>>> copies?
>>> 
>>> I did not know about that operation.

>> Are you on 1.7.x?

> All 1.6.x sadly...

Then you need to be aware that on 1.6.x and earlier, the command was not called "svn relocate" but rather "svn switch --relocate".


Re: Implementations of an SVN/DAV aware proxy?

Posted by Tim Watts <tw...@dionic.net>.
Hi Daniel,

All 1.6.x sadly...

But it is OK - my colleague agrees that we can just convert the working 
copies as required - this is probably better as then we do not have to 
support some legacy crap forever :)

I am surprised though - that it is so unusual to want to build a DAV/SVN 
proxy with pathname translation...

Cheers,

Tim

On 17/04/12 11:01, Daniel Shahaf wrote:
> svn 1.7 is supposed to follow 301(permanent)/302(temporary) redirects.
> Are you on 1.7.x?
>
> Tim Watts wrote on Tue, Apr 17, 2012 at 09:25:01 +0100:
>> Lorenz<lorenznl<at>  yahoo.com>  wrote:
>>
>>> Tim Watts wrote:
>>>> [...]
>>>> We're changing SVN servers from mod-dav-svn to SCM-Manager - and one
>>>> minor fly in the ointment is the style of our old repo URI, which was
>>>> of
>>>> the form:
>>
>>> is there a reason you can't just use 'svn relocate' on the working
>>> copies?
>>> --
>>>
>>> Lorenz
>>
>> Sir - you are a genius.
>>
>> Yes - this would be fine. After all, if  a repo working copy is based
>> off the old server (RIP) then operations will fail, acting as a call to
>> run svn relocate. Easy to do, easy to document...
>>
>> I did not know about that operation.
>>
>> Thanks :)
>>
>> Tim
>> --
>> Tim Watts
>> Personal Blog: http://www.dionic.net/tim/


-- 
Tim Watts
Personal Blog: http://www.dionic.net/tim/

Re: Implementations of an SVN/DAV aware proxy?

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
svn 1.7 is supposed to follow 301(permanent)/302(temporary) redirects.
Are you on 1.7.x?

Tim Watts wrote on Tue, Apr 17, 2012 at 09:25:01 +0100:
> Lorenz <lorenznl <at> yahoo.com> wrote:
>
> > Tim Watts wrote:
> >> [...]
> >> We're changing SVN servers from mod-dav-svn to SCM-Manager - and one
> >> minor fly in the ointment is the style of our old repo URI, which was 
> >> of
> >> the form:
>
> > is there a reason you can't just use 'svn relocate' on the working
> > copies?
> > --
> >
> > Lorenz
>
> Sir - you are a genius.
>
> Yes - this would be fine. After all, if  a repo working copy is based  
> off the old server (RIP) then operations will fail, acting as a call to  
> run svn relocate. Easy to do, easy to document...
>
> I did not know about that operation.
>
> Thanks :)
>
> Tim
> -- 
> Tim Watts
> Personal Blog: http://www.dionic.net/tim/

Re: Implementations of an SVN/DAV aware proxy?

Posted by Tim Watts <tw...@dionic.net>.
Lorenz <lorenznl <at> yahoo.com> wrote:

 > Tim Watts wrote:
 >> [...]
 >> We're changing SVN servers from mod-dav-svn to SCM-Manager - and one
 >> minor fly in the ointment is the style of our old repo URI, which 
was >> of
 >> the form:

 > is there a reason you can't just use 'svn relocate' on the working
 > copies?
 > --
 >
 > Lorenz

Sir - you are a genius.

Yes - this would be fine. After all, if  a repo working copy is based 
off the old server (RIP) then operations will fail, acting as a call to 
run svn relocate. Easy to do, easy to document...

I did not know about that operation.

Thanks :)

Tim
-- 
Tim Watts
Personal Blog: http://www.dionic.net/tim/

Re: Implementations of an SVN/DAV aware proxy?

Posted by Lorenz <lo...@yahoo.com>.
Tim Watts wrote:
>[...]
>We're changing SVN servers from mod-dav-svn to SCM-Manager - and one 
>minor fly in the ointment is the style of our old repo URI, which was of 
>the form:

is there a reason you can't just use 'svn relocate' on the working
copies?
-- 

Lorenz