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

Re: svn commit: r27170 - trunk/subversion/libsvn_wc

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-10-13 17:21:22 CEST

Ben Collins-Sussman wrote:
> On 10/13/07, C. Michael Pilato <cmpilato@collab.net> wrote:
>
>
>> svn_ra_get_file(session, "/foo") is *not* a legal invocation. The paths
>> provided to the RA API are, as the various docstring state, relative to the
>> session URL. And that's how all four RA layers treat them. But some of the
>> those layers can pass the "relative" path through to the FS directly, while
>> others need to construct URLs out of them. And svn_path_join(session-url,
>> "/foo") == "/foo", not "session-url/foo".
>>
>> Your use of the API was broken here, nothing more.
>>
>
> Well sure, there's much more here. I was invoking the API
> incorrectly, and ra_local and ra_dav were *still working correctly*.
> That's a bug to fix. :-)
>
In fact, that difference is a coincidence. Internally get_file will
'svn_path_join' the relative copyfrom path with the session url to get
one absolute url to the copyfrom file.

If you pass an absolute copyfrom path instead of a relative path, this
is what happens:
- over ra_neon, ra_serf and ra_svn, svn_path_join(url, '/abs/path') will
return '/abs/path' so dropping the url part.
- over ra_local, the absolute copyfrom path will be joined with "", as
the session url. The result of that will again be the absolute copyfrom
path, which coincidentally is what we need.

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 13 17:19:27 2007

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.