You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/10/28 07:31:09 UTC

Re: svn commit: r40234 - trunk/subversion/mod_dav_svn

On Tue, Oct 27, 2009 at 13:16, Senthil Kumaran S <se...@collab.net> wrote:
>...
> +++ trunk/subversion/mod_dav_svn/version.c      Tue Oct 27 10:16:31 2009        (r40234)
> @@ -1203,7 +1203,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
>                 return derr;
>
>               /* Create an absolute fs-path */
> -              lockpath = svn_path_join(path_prefix, cdata, pool);
> +              lockpath = svn_dirent_join(path_prefix, cdata, pool);

If that is a repository path, then you shouldn't use a dirent
function. iirc, you should be using uri_join. (it would be nice if FS
paths were relpaths, but they tend to have a leading slash, so that
leaves uri_join)

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411970

Re: svn commit: r40234 - trunk/subversion/mod_dav_svn

Posted by Senthil Kumaran S <se...@collab.net>.
Hi Greg,

Senthil Kumaran S wrote:
>> If that is a repository path, then you shouldn't use a dirent
>> function. iirc, you should be using uri_join. (it would be nice if FS
>> paths were relpaths, but they tend to have a leading slash, so that
>> leaves uri_join)
> 
> After looking at the surrounding code, I had an impression that an fs-path will
> be a local filesystem directory and hence did the above. Will change it as per
> your comments.

I got the rationale behind it by reading the doc string from 'svn_uri_join'
which says the following:

<snip>
 * If @a component starts with a '/' and @a base contains a scheme, the

 * scheme defined joining rules are applied.
</snip>

Done in r40243.

-- 
Senthil Kumaran S
http://www.stylesen.org/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411994

Re: svn commit: r40234 - trunk/subversion/mod_dav_svn

Posted by Senthil Kumaran S <se...@collab.net>.
Greg Stein wrote:
> On Tue, Oct 27, 2009 at 13:16, Senthil Kumaran S <se...@collab.net> wrote:
>> ...
>> +++ trunk/subversion/mod_dav_svn/version.c      Tue Oct 27 10:16:31 2009        (r40234)
>> @@ -1203,7 +1203,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
>>                 return derr;
>>
>>               /* Create an absolute fs-path */
>> -              lockpath = svn_path_join(path_prefix, cdata, pool);
>> +              lockpath = svn_dirent_join(path_prefix, cdata, pool);
> 
> If that is a repository path, then you shouldn't use a dirent
> function. iirc, you should be using uri_join. (it would be nice if FS
> paths were relpaths, but they tend to have a leading slash, so that
> leaves uri_join)

After looking at the surrounding code, I had an impression that an fs-path will
be a local filesystem directory and hence did the above. Will change it as per
your comments.

Thank you.
-- 
Senthil Kumaran S
http://www.stylesen.org/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411986