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

Re: [PATCH] fix for issue #2556: support working copies on the root of a (virtual) drive

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-08-20 23:21:58 CEST

Lieven Govaerts wrote:
>
>
>
>> -----Original Message-----
>> From: Branko Čibej [mailto:brane@xbc.nu]
>> Sent: zondag 20 augustus 2006 18:38
>>
> ..
>
>
>> * Don't make calling apr_filepath_root Windows-specific; that
>> defeats the whole point of calling that function in the
>> first place.
>>
>
> It was meant as a 'don't punish the guys that are not responsible for the
> problem' thing, but I've removed it now.
>

All the world isn't Unix and Windows. :)

I imagine there are still a few systems out there that use a third
scheme. APR works on OS/2 and Netware, for example; I don't know if
anyone's ported Subversion to those platforms, but if they do, it'll
certainly help to use apr_filepath_root there.

>> * Use svn_path_cstring_from_utf8, which will convert the string from
>>
> internal encoding to whatever APR expects (and is usually a no-op
>
>> on Windows, by the way).
>>
>
> I have a problem here, which I hope you can help me with.
>
> The function svn_path_cstring_from_utf8 returns svn_error_t *, but I don't
> know how to handle that potential error. I've tried to change the return
> type of svn_path_is_root, but that would push the problem to its callers.
> Atleast two of those callers svn_path_basename and svn_path_join are public
> functions, so I can't change those declarations.
>
> I could convert the string somewhere higher in the stack, but that doesn't
> seem right either.
>
> Suggestions?
>

I think you can safely convert an error to a false return value. An
error in this case would indicate that the path isn't encoded in UTF-8,
which will cause problems elsewhere, anyway.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 20 23:22:15 2006

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.