You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/04/17 19:24:57 UTC

diff problems over ra_dav

Hi

I noticed the diff tests are failing when run over ra_dav. I have
traced the problem to 'svn diff -rREV1:REV2' failing when run over
ra_dav. The error messagae is

   $ svn diff -r1:2

   ../svn/subversion/libsvn_ra_dav/util.c:314
   svn_error: #21016 : <Trying to use an unsupported feature>
     REPORT request failed on /repo

   ../svn/subversion/libsvn_ra_dav/util.c:161
   svn_error: #21016 : <Trying to use an unsupported feature>
  
   dav_svn_parse_uri does not support that URI form yet.

This error message comes from dav_svn_simple_parse_uri() in
mod_dav_svn/util.c. Here's what I see debugging:

Breakpoint 4, dav_svn_simple_parse_uri (info=0xbffff7b8, relative=0x8162728, 
    uri=0x8162690 "http://localhost:8888/repo", pool=0x815ab38)
    at ../svn/subversion/mod_dav_svn/util.c:125
125       if (apr_uri_parse(pool, uri, &comp) != APR_SUCCESS)
(gdb) n
130       path = comp.path;
(gdb) 
133       ap_getparents(path);
(gdb) p path
$14 = 0x8162998 "/repo"
(gdb) n
134       ap_no2slash(path);
(gdb) 
144       len1 = strlen(path);
(gdb) 
145       len2 = strlen(relative->info->repos->root_path);
(gdb) p relative->info->repos->root_path
$15 = 0x810af18 "/repo"
(gdb) n
146       if (len1 < len2
(gdb) p len1
$16 = 5
(gdb) p len2
$17 = 5
(gdb) n
155       path += len2; /* now points to "/" or "\0" */
(gdb) 
156       len1 -= len2;
(gdb) 
159       if (len1 <= 1)
(gdb) 
160         goto unhandled_form;
(gdb) p path
$18 = 0x816299d ""
(gdb) p len1
$19 = 0

Now util.c hasn't changed since rev 1465, and since diff works against
the svn.collab.net repository but fails against my private one (using
apache HEAD from this morning) I suspect an apache interaction.

Anyone else seeing this?


-- 
Philip

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

Re: diff problems over ra_dav

Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:

> Hi
> 
> I noticed the diff tests are failing when run over ra_dav. I have
> traced the problem to 'svn diff -rREV1:REV2' failing when run over
> ra_dav. The error messagae is
> 
>    $ svn diff -r1:2
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:314
>    svn_error: #21016 : <Trying to use an unsupported feature>
>      REPORT request failed on /repo
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:161
>    svn_error: #21016 : <Trying to use an unsupported feature>
>   
>    dav_svn_parse_uri does not support that URI form yet.
> 
> This error message comes from dav_svn_simple_parse_uri() in
> mod_dav_svn/util.c. Here's what I see debugging:
> 
> Breakpoint 4, dav_svn_simple_parse_uri (info=0xbffff7b8, relative=0x8162728, 
>     uri=0x8162690 "http://localhost:8888/repo", pool=0x815ab38)
>     at ../svn/subversion/mod_dav_svn/util.c:125
> 125       if (apr_uri_parse(pool, uri, &comp) != APR_SUCCESS)
> (gdb) n
> 130       path = comp.path;
> (gdb) 
> 133       ap_getparents(path);
> (gdb) p path
> $14 = 0x8162998 "/repo"
> (gdb) n
> 134       ap_no2slash(path);
> (gdb) 
> 144       len1 = strlen(path);
> (gdb) 
> 145       len2 = strlen(relative->info->repos->root_path);
> (gdb) p relative->info->repos->root_path
> $15 = 0x810af18 "/repo"
> (gdb) n
> 146       if (len1 < len2
> (gdb) p len1
> $16 = 5
> (gdb) p len2
> $17 = 5
> (gdb) n
> 155       path += len2; /* now points to "/" or "\0" */
> (gdb) 
> 156       len1 -= len2;
> (gdb) 
> 159       if (len1 <= 1)
> (gdb) 
> 160         goto unhandled_form;
> (gdb) p path
> $18 = 0x816299d ""
> (gdb) p len1
> $19 = 0
> 
> Now util.c hasn't changed since rev 1465, and since diff works against
> the svn.collab.net repository but fails against my private one (using
> apache HEAD from this morning) I suspect an apache interaction.
> 
> Anyone else seeing this?
> 

I just rewrote all of svn_cl__diff and svn_client_diff;  I'm going to
debug this right away.  cmpilato told me about it this morning.  :-)

Thanks, Philip.

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

Re: diff problems over ra_dav

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Apr 17, 2002 at 04:57:41PM -0500, Ben Collins-Sussman wrote:
>...
> the root of the repository.  Bam, we bail out in
> dav_svn_simple_parse_uri, line 160.  There's a cryptic comment there:
> 
>   /* ### we don't handle http://host/repos or http://host/repos/ yet */
> 
> So apparently if you tell the DAV layer to switch to any repository
> root, it's gonna bail.  We've not seen this bug yet, because we have
>...
> Anyway, enough beating around the bush.  Gstein, can you shed some
> light on the problem?  Maybe explain the comment?

In the distant past, that function would only recognize URLs of the form:

  http://host/repos/$svn/...

Thus, we wanted to bail on host/repos or host/repos/. The comment made
perfect sense within that respect.

Then, at some later time, somebody (*cough*ben*cough*) added the capability
to recognize "public" URLs. Those of the form: http://host/repos/foo.
However, that change did not account for the root.

Should be a simple fix. I'll get it later tonite.

[ still gotta look into Ben Collins' timeout bug, too... ]

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: diff problems over ra_dav

Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:

>    $ svn diff -r1:2
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:314
>    svn_error: #21016 : <Trying to use an unsupported feature>
>      REPORT request failed on /repo
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:161
>    svn_error: #21016 : <Trying to use an unsupported feature>
>   
>    dav_svn_parse_uri does not support that URI form yet.
> 

Okay, so cmpilato figured out what's going on here.

In particular, it's a bug related to the DAV implementation of
RA->do_switch().

Previously, a repos-to-repos diff would call RA->do_update, send a
fake report, and then the repos-diff editor would construct secret
fulltexts as necessary to print diffs.

In my new system, it's now calling RA->do_switch instead.  The only
difference here is that do_switch compares two [potentially] different
URLs, instead of assuming 2 identical fs paths -- which is why we can
do 'svn diff URL1 URL2' now.

The bug, it seems, is exactly what you were looking at:  we tell
mod_dav_svn that we want to 'switch' to URL2, where URL2 is points to
the root of the repository.  Bam, we bail out in
dav_svn_simple_parse_uri, line 160.  There's a cryptic comment there:

  /* ### we don't handle http://host/repos or http://host/repos/ yet */

So apparently if you tell the DAV layer to switch to any repository
root, it's gonna bail.  We've not seen this bug yet, because we have
no 'svn switch' python tests yet.  And all our casual uses of 'svn
switch' have been on subdirectories.  [And Philip, this explains why
diff-tests #5 and #9 fail too -- because now do_switch() is running on
a wc that corresponds to an fs root -- but 'svn diff -rN:M' still runs
when you try it against a subdir of the real svn repository, which is
what we always have.]

Anyway, enough beating around the bush.  Gstein, can you shed some
light on the problem?  Maybe explain the comment?

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

Re: diff problems over ra_dav

Posted by cm...@collab.net.
Yah, this is the result of sussman's recent diff checkin.  He's aware
of it, and working on it.  If it's halting your own development, what
worked for me was just patch -R 'ing his commit on my working copy.

--

Philip Martin <ph...@codematters.co.uk> writes:

> Hi
> 
> I noticed the diff tests are failing when run over ra_dav. I have
> traced the problem to 'svn diff -rREV1:REV2' failing when run over
> ra_dav. The error messagae is
> 
>    $ svn diff -r1:2
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:314
>    svn_error: #21016 : <Trying to use an unsupported feature>
>      REPORT request failed on /repo
> 
>    ../svn/subversion/libsvn_ra_dav/util.c:161
>    svn_error: #21016 : <Trying to use an unsupported feature>
>   
>    dav_svn_parse_uri does not support that URI form yet.
> 
> This error message comes from dav_svn_simple_parse_uri() in
> mod_dav_svn/util.c. Here's what I see debugging:
> 
> Breakpoint 4, dav_svn_simple_parse_uri (info=0xbffff7b8, relative=0x8162728, 
>     uri=0x8162690 "http://localhost:8888/repo", pool=0x815ab38)
>     at ../svn/subversion/mod_dav_svn/util.c:125
> 125       if (apr_uri_parse(pool, uri, &comp) != APR_SUCCESS)
> (gdb) n
> 130       path = comp.path;
> (gdb) 
> 133       ap_getparents(path);
> (gdb) p path
> $14 = 0x8162998 "/repo"
> (gdb) n
> 134       ap_no2slash(path);
> (gdb) 
> 144       len1 = strlen(path);
> (gdb) 
> 145       len2 = strlen(relative->info->repos->root_path);
> (gdb) p relative->info->repos->root_path
> $15 = 0x810af18 "/repo"
> (gdb) n
> 146       if (len1 < len2
> (gdb) p len1
> $16 = 5
> (gdb) p len2
> $17 = 5
> (gdb) n
> 155       path += len2; /* now points to "/" or "\0" */
> (gdb) 
> 156       len1 -= len2;
> (gdb) 
> 159       if (len1 <= 1)
> (gdb) 
> 160         goto unhandled_form;
> (gdb) p path
> $18 = 0x816299d ""
> (gdb) p len1
> $19 = 0
> 
> Now util.c hasn't changed since rev 1465, and since diff works against
> the svn.collab.net repository but fails against my private one (using
> apache HEAD from this morning) I suspect an apache interaction.
> 
> Anyone else seeing this?
> 
> 
> -- 
> Philip
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

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