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

Re: relative externals fail with spaces

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 30 Sep 2008 21:09:52 +0200

Karl Fogel wrote:
> Stefan Küng <tortoisesvn_at_gmail.com> writes:
>> Hi,
>>
>> A user reported a problem with relative externals on the TSVN mailing list:
>> http://tortoisesvn.tigris.org/servlets/ReadMsg?list=users&msgNo=14004
>>
>> Attached is a test repository which shows this problem. I've verified
>> that the problem still exists in the Subversion trunk r33254, but only
>> for http/https served repositories. The problem does not exist for
>> file:/// or svn:// served repositories.
>>
>> To reproduce the problem, check out /trunk from the attached repository,
>> which gives the error:
>>
>> Error: URL 'https://192.168.2.5/svn/extrepo/trunk/folder with
>> space/libs/library1' is
>> Error: malformed or the scheme or host or path is missing
>
> Reproduced. I think I've got the fix (see diff below); testing now.
>
> -Karl
>
> Index: subversion/libsvn_client/externals.c
> ===================================================================
> --- subversion/libsvn_client/externals.c (revision 33358)
> +++ subversion/libsvn_client/externals.c (working copy)
> @@ -1146,9 +1146,9 @@
> len = strlen(cb->to_path);
> if (ib.parent_dir[len] == '/')
> ++len;
> - ib.parent_dir_url = svn_path_join(cb->from_url,
> - ib.parent_dir + len,
> - cb->pool);
> + ib.parent_dir_url = svn_path_url_add_component(cb->from_url,
> + ib.parent_dir + len,
> + cb->pool);

I'm wondering: this change is in libsvn_client, i.e., it's independent
of the ra layer. But the issue only shows for http(s), not for file or
svn. So what are ra_svn and ra_local doing differently?
I'm not familiar with that part of the svn code, but couldn't this lead
to double-escaping of urls if ra_svn/ra_local already do this themselves?

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

Received on 2008-09-30 21:10:31 CEST

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.