Daniel Shahaf wrote:
> stefan2_at_apache.org wrote on Mon, Aug 09, 2010 at 18:33:53 -0000:
>
>> Author: stefan2
>> Date: Mon Aug 9 18:33:53 2010
>> New Revision: 983766
>>
>> URL: http://svn.apache.org/viewvc?rev=983766&view=rev
>> Log:
>> Fix the root cause of an assertion triggered by exporting KDE /trunk:
>> File names need to be canonicalized when forming URLs.
>>
>> * subversion/libsvn_client/export.c
>> (add_file): properly escape the file's URL
>>
>> Modified:
>> subversion/branches/performance/subversion/libsvn_client/export.c
>>
>> Modified: subversion/branches/performance/subversion/libsvn_client/export.c
>> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/export.c?rev=983766&r1=983765&r2=983766&view=diff
>> ==============================================================================
>> --- subversion/branches/performance/subversion/libsvn_client/export.c (original)
>> +++ subversion/branches/performance/subversion/libsvn_client/export.c Mon Aug 9 18:33:53 2010
>> @@ -708,7 +708,12 @@ add_file(const char *path,
>> struct edit_baton *eb = pb->edit_baton;
>> struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
>> const char *full_path = svn_dirent_join(eb->root_path, path, pool);
>> - const char *full_url = svn_uri_join(eb->root_url, path, pool);
>> +
>> + /* path is not canonicalized, i.e. it may still contain spaces etc. */
>> + const char *full_url = svn_uri_canonicalize(svn_uri_join(eb->root_url,
>> + path,
>> + pool),
>> + pool);
>>
>>
>
> See svn_path_url_add_component2().
>
Yep, that would be the correct function to use. I didn't test my
variant with a repo root that required escaped chars. In r984927,
it uses svn_path_url_add_component2 and works fine also in that case.
> Also, this isn't really related to performance; it belongs on /trunk. Next
> time, you could send this with a [PATCH] marker in the subject line, and
> a full committer could +1 you to commit that to directly to /trunk.
>
Will do. But as far as I remember, my prototyping code didn't
require any further bug fixes.
> In this case, I give my +1.
>
Merged in r984928.
> Daniel
> (actually, this may be a good change to backport to 1.6.x too)
>
It seems to work with the 1.6.x client (at least with the builds I used).
So, this bug might have gotten triggered by some canonicalization
usage cleanup in 1.7.
-- Stefan^2.
Received on 2010-08-12 21:53:45 CEST