You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexy Khrabrov <al...@setup.org> on 2002/07/29 19:36:03 UTC

svn ls http://svn.host.tld/

I noticed that listing the root of the repository by the command-line
client fails, while everything is nicely seen in the browser.

My httpd.conf has the usual

<Location /svn>
  DAV svn
  SVNpath /svn/repository
</Location>

(The physical SVN repository lives in /svn/repository.)

Here's what happens when I say

svn ls http://myhost/svn

svn_error: #21091 : <Bad URL passed to RA layer>
  No part of path '(null)' was found in repository HEAD.

However, when I try to list subdirectories, it works fine:

$  $ svn ls http://setup.org/svn/cs
http://setup.org/svn/cs:
_       3 anonymou       66 Jul 28 17:07 .cvsignore
...

The Apache access_log looks as follows:

(1) For the failed top-level ls

128.6.178.78 - - [29/Jul/2002:14:36:39 -0400] "PROPFIND /svn HTTP/1.1" 301 301
128.6.178.78 - - [29/Jul/2002:14:36:39 -0400] "PROPFIND / HTTP/1.1" 405 308

(2) For successful sublevel ls:

128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/cs HTTP/1.1" 207 486
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/!svn/vcc/default HTTP/1.1" 207 336
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/!svn/bln/5 HTTP/1.1" 207 387
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/cs HTTP/1.1" 207 486
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/!svn/vcc/default HTTP/1.1" 207 387
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/!svn/bc/5/cs HTTP/1.1" 207 496
128.6.178.78 - - [29/Jul/2002:14:37:19 -0400] "PROPFIND /svn/cs HTTP/1.1" 207 486
128.6.178.78 - - [29/Jul/2002:14:37:20 -0400] "PROPFIND /svn/!svn/vcc/default HTTP/1.1" 207 387
128.6.178.78 - - [29/Jul/2002:14:37:20 -0400] "PROPFIND /svn/!svn/bc/5/cs HTTP/1.1" 207 55767


Now, how do I ls the root properly?  
A related issue is, I want to dedicate a separate VirtualHost entirely to SVN,
for ease of use.  I've tried to specify, in its VirtualHost section,

<Location />
  DAV svn
...

but the browser refused to see it.
Again, is there a way to make a domain SVN repository, and what's the correct
Apache configuration?  Then I'd say simply, 

svn ls http://short.com

Cheers,
Alexy


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn ls http://svn.host.tld/

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jul 29, 2002 at 02:49:31PM -0500, Ben Collins-Sussman wrote:
> Alexy Khrabrov <al...@setup.org> writes:
>...
> > (1) For the failed top-level ls
> > 
> > 128.6.178.78 - - [29/Jul/2002:14:36:39 -0400] "PROPFIND /svn HTTP/1.1" 301 301
> 
> I can't reproduce your bug.  For example,
> 
>    $ svn ls http://svn.collab.net/repos/svn
> 
> works just fine.
> 
> The question is why a PROPFIND on /svn is returning a 301 "Moved
> Permanently" error?  
> 
> I saw something similar to this once when trying to use a dav client
> to access a mod_dav_fs location.
> 
> I can only guess that there is something odd with your httpd or
> httpd.conf...

Nope. This is defined Apache behavior. Requesting a collection *without* a
trailing slash will cause a redirect to the same URI *with* the trailing
slash.

The simplest answer is that:

    http://svn.collab.net/repos/svn
and
    http://svn.collab.net/repos/svn/

Are two *different* resources. The latter can have requests applied to it.
The former issues 301 redirects. This is well-defined and acceptable
behavior (and clients that don't deal with it are *broken*). However, there
are two problems:

1) some clients don't handle a 301 on non-GET requests well.
2) svn does not install redirect handlers during our use of Neon. I have
   never looked into how easy/hard that would be, whether it is truly
   needed, etc. Point is: Neon can(?) handle some of the redirect handling
   for us.

(2) is especially important when we want to (when?) be able to allow the
repository administrator to move their repos to a different hostname and/or
URL within the namespace. The old repos should issue a 301, and we should
continue operating from the new repository.

[ this does imply that we need a way for RA to signal the client/WC that URL
  that it is using needs to be rewritten ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn ls http://svn.host.tld/

Posted by Ben Collins-Sussman <su...@collab.net>.
Alexy Khrabrov <al...@setup.org> writes:

> I noticed that listing the root of the repository by the command-line
> client fails, while everything is nicely seen in the browser.
> 
> My httpd.conf has the usual
> 
> <Location /svn>
>   DAV svn
>   SVNpath /svn/repository
> </Location>

This looks reasonable.


> (1) For the failed top-level ls
> 
> 128.6.178.78 - - [29/Jul/2002:14:36:39 -0400] "PROPFIND /svn HTTP/1.1" 301 301

I can't reproduce your bug.  For example,

   $ svn ls http://svn.collab.net/repos/svn

works just fine.

The question is why a PROPFIND on /svn is returning a 301 "Moved
Permanently" error?  

I saw something similar to this once when trying to use a dav client
to access a mod_dav_fs location.

I can only guess that there is something odd with your httpd or
httpd.conf...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org