You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/05/31 21:43:02 UTC

vsn-rsc-url adaptations

Hey gstein, any idea what's going on here?  I'm running mod_dav_svn
which produces the 'new style' vsn-rsc-url.  I attempted to commit
A/D/H/chi from a working copy full of 'old style' urls.

Re: vsn-rsc-url adaptations

Posted by Greg Stein <gs...@lyra.org>.
On Fri, May 31, 2002 at 06:04:12PM -0500, Ben Collins-Sussman wrote:
> Greg Stein <gs...@lyra.org> writes:
>...
> > Not sure why it is asking for the parent's DAV:checked-in property. I'd need
> > to know what your local mods were, to understand what it was attempting.
> 
> But that's just it... I've not changed ra_dav at *all*.  Only
> mod_dav_svn.  So I'm actually wondering if that 'adaptive' ra_dav
> logic you wrote last month still works...?

Yes, it works.

Look at the URL you were requesting (something like this):

  http://some.host/path/to/repos/$svn/ver/18.1/A/B/H/chi

But the nodeid should (now) be a revision:

  http://some.host/path/to/repos/$svn/ver/23/A/B/H/chi


Those two look awfully similar, don't they? If you run atoi("18.1"), you get
back 18. So you're asking to check out r18 of A/B/H/chi. But the server says
you're out of date because it wants you to check out rev 23.

As I said in my other note: the two URIs are too similar, and the parsing of
the revision is not strict enough (it doesn't require full consumption of
the text). Thus, the old URI is still "valid" in the new system and you get
an error about it.

The redirection wants to see a 404. That means make the URI totally invalid.
Thus, the need for the change to "!svn" as discussed.

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: vsn-rsc-url adaptations

Posted by Ben Collins-Sussman <su...@collab.net>.
Greg Stein <gs...@lyra.org> writes:

> On Fri, May 31, 2002 at 04:50:52PM -0500, Ben Collins-Sussman wrote:
> > Ben Collins-Sussman <su...@collab.net> writes:
> > 
> > > Hey gstein, any idea what's going on here?  I'm running mod_dav_svn
> > > which produces the 'new style' vsn-rsc-url.  I attempted to commit
> > > A/D/H/chi from a working copy full of 'old style' urls.
> > > 
> > > >From this ethereal capture, it seems like ra_dav is ignoring the
> > > new-style url that comes back to it;  instead, attempts to do a
> > > checkout using the old-style one anyway.  Am I analyzing this
> > > correctly?
> > 
> > Actually, ra_dav is requesting the 'checked-in' property of the parent
> > dir (A/D/H), and then trying to CHECKOUT the cached [incorrect]
> > vsn-rsc-url of A/D/H/chi.
> 
> Not sure why it is asking for the parent's DAV:checked-in property. I'd need
> to know what your local mods were, to understand what it was attempting.

But that's just it... I've not changed ra_dav at *all*.  Only
mod_dav_svn.  So I'm actually wondering if that 'adaptive' ra_dav
logic you wrote last month still works...?

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

Re: vsn-rsc-url adaptations

Posted by Greg Stein <gs...@lyra.org>.
On Fri, May 31, 2002 at 04:50:52PM -0500, Ben Collins-Sussman wrote:
> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > Hey gstein, any idea what's going on here?  I'm running mod_dav_svn
> > which produces the 'new style' vsn-rsc-url.  I attempted to commit
> > A/D/H/chi from a working copy full of 'old style' urls.
> > 
> > >From this ethereal capture, it seems like ra_dav is ignoring the
> > new-style url that comes back to it;  instead, attempts to do a
> > checkout using the old-style one anyway.  Am I analyzing this
> > correctly?
> 
> Actually, ra_dav is requesting the 'checked-in' property of the parent
> dir (A/D/H), and then trying to CHECKOUT the cached [incorrect]
> vsn-rsc-url of A/D/H/chi.

Not sure why it is asking for the parent's DAV:checked-in property. I'd need
to know what your local mods were, to understand what it was attempting.

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: vsn-rsc-url adaptations

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Jun 05, 2002 at 03:30:59PM -0500, Ben Collins-Sussman wrote:
> Greg Stein <gs...@lyra.org> writes:
> 
> > Ah... You're sending "18.1" and the atoi() in your code is translating that
> > as revision 18. That isn't going to work so well :-)
> > 
> > So there are two things to do:
> > 
> > 1) SVN_STR_TO_REV(const char *) ought to have a companion that will take a
> >    ptr/len pair and convert the whole thing (and produce an error if the
> >    entire text is not consumed).
> 
> Do we really need to file an issue on this?  I mean, as long as
> revisions remain integers, we're okay.  Do we expect float-strings to
> be thrown at SVN_STR_TO_REV anytime?

It really depends on how anal we want to be in the URLs that we accept.
Personally, I'd prefer that people aren't allowed to send illegal URLs. But
it does mean some extra work. Filing an issue might be nice, but low
priority...

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: vsn-rsc-url adaptations

Posted by Ben Collins-Sussman <su...@collab.net>.
Greg Stein <gs...@lyra.org> writes:

> Ah... You're sending "18.1" and the atoi() in your code is translating that
> as revision 18. That isn't going to work so well :-)
> 
> So there are two things to do:
> 
> 1) SVN_STR_TO_REV(const char *) ought to have a companion that will take a
>    ptr/len pair and convert the whole thing (and produce an error if the
>    entire text is not consumed).

Do we really need to file an issue on this?  I mean, as long as
revisions remain integers, we're okay.  Do we expect float-strings to
be thrown at SVN_STR_TO_REV anytime?

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

Re: vsn-rsc-url adaptations

Posted by Greg Stein <gs...@lyra.org>.
On Fri, May 31, 2002 at 04:50:52PM -0500, Ben Collins-Sussman wrote:
>...
> I'm getting the same failure when I try to commit from a working copy
> that has all 'new style' vsn-rsc-urls in it.  ra_dav requests the
> checked-in property of the parent dir, then tries to CHECKOUT the
> child's correct vsn-rsc-url, and *still* gets the same error.

And what is that error saying to you... that the resource is out of date.
Maybe the new logic is incorrect?

> gstein, can you remind me how the commit is supposed to work, in
> deltaV terms?  

MKACTIVITY /an/activity
CHECKOUT /some/thing
PUT /some/thing
PROPPATCH /some/thing
MERGE /an/activity


Ah... You're sending "18.1" and the atoi() in your code is translating that
as revision 18. That isn't going to work so well :-)

So there are two things to do:

1) SVN_STR_TO_REV(const char *) ought to have a companion that will take a
   ptr/len pair and convert the whole thing (and produce an error if the
   entire text is not consumed).

2) you should change mod_dav_svn.c::SVN_DEFAULT_SPECIAL_URI to "!svn" so
   that you don't have overlapping special areas; you'll fail at the $svn
   portion, long before you ever try to parse an old node id as a revision.


Note that (2) was desired anyways, and will fix this specific problem. (1)
is a longer term fix; it would be acceptable to defer that as long as an
issue is filed.

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: vsn-rsc-url adaptations

Posted by Ben Collins-Sussman <su...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:

> Hey gstein, any idea what's going on here?  I'm running mod_dav_svn
> which produces the 'new style' vsn-rsc-url.  I attempted to commit
> A/D/H/chi from a working copy full of 'old style' urls.
> 
> >From this ethereal capture, it seems like ra_dav is ignoring the
> new-style url that comes back to it;  instead, attempts to do a
> checkout using the old-style one anyway.  Am I analyzing this
> correctly?

Actually, ra_dav is requesting the 'checked-in' property of the parent
dir (A/D/H), and then trying to CHECKOUT the cached [incorrect]
vsn-rsc-url of A/D/H/chi.

I'm getting the same failure when I try to commit from a working copy
that has all 'new style' vsn-rsc-urls in it.  ra_dav requests the
checked-in property of the parent dir, then tries to CHECKOUT the
child's correct vsn-rsc-url, and *still* gets the same error.

gstein, can you remind me how the commit is supposed to work, in
deltaV terms?  

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