[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: get_parent_resource() on unknown url

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-11-01 23:21:29 CET

On Thu, Nov 01, 2001 at 03:22:36PM -0600, Ben Collins-Sussman wrote:
>...
> It seems the mod_dav is calling the dav_svn_get_parent_resource() hook
> on a non-existent URL. The URL doesn't exist because we're trying to
> create it: it's the "Destination" header in the COPY request.

All righty...

> By the
> time the resource is passed to the hook, mod_dav (or someone else) has
> already tagged resource as type 1 ("unknown"). So the hook chokes as
> it's currently written.

0 is DAV_RESOURCE_TYPE_UNKNOWN. 1 is DAV_RESOURCE_TYPE_REGULAR. Generally,
we only see those for the "public" URLs.

[ these values come from mod_dav.h ]

> I simply don't understand DAV well enough to find a solution. Should
> the hook assume that any type-1 resources are due to copies or moves,
> and explicitly handle them? Should it attempt to construct a parent
> resource anyway (via dav_svn_create_private_resource)?

It should not be a type 1. Anything under the ../$svn/wrk/ area should be
DAV_RESOURCE_TYPE_WORKING, whether it exists or not.

> Or is this a bigger problem in mod_dav itself? Should mod_dav not be
> labeling the resource as type-1?

mod_dav_svn is the guy that labelled it incorrectly.

Hmm. I don't see anything obviously wrong in the parsing and setup. It all
happens in repos.c. dav_svn_parse_uri() does some initial parsing
(indirectly using the dav_svn_parse_working_uri function). After the parse
is done, then it calls the dav_svn_prep_working() function. Neither of those
can set the type to REGULAR.

That would tend to indicate something else is going on somewhere... Some
debugging is in order.

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
Received on Sat Oct 21 14:36:47 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.