Martijn Boekhorst wrote:
>Quoting =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu>:
>
>
>
>>Martijn Boekhorst wrote:
>>
>>
>>>Quoting =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu>:
>>>
>>>
>>>>Many programs on Windows accept forward slashes today, and the MS C
>>>>runtime groks them and converts accordingly. So does APR, for that
>>>>
>>>>
>>matter.
>>
>>
>>>So shouldn't subversion?
>>>
>>>
>>No, it should not. The Subversion libraries are not a general-purpose
>>portability layer, unlike the C library. The client program knows best
>>when and how to convert or construct the paths so that they conform to
>>the SVN lib requirements, so we're going to leave that work to the client.
>>
>>
>
>Subversion is not general purpose but I think/hope the client libraries qualify
>as portable - if only from an api design perspective. Currently the path part
>of the api is designed with subversion development in mind, not with api users
>in mind. If everyone who calls the API on a non-unix platform (MacOs/win) has
>to write code so the API understands the platform it is inhabiting, then there
>is an "oppertunity for improvement" with the API as, for that particular
>platform, the wrong standards are imposed.
>
Well, we will have helper functions in libsvn_subr that'll handle those
conversions for us, and the (portable) command-line client will use them.
Basically, we have two problems:
* The Subversion libraries call one another, as well as being called
from the client. If we push the conversions to the level of the
library interface, then we still have to maintain a set of APIs
that don't do the conversion, so that inter-library calls can use
them.
* Client code is more than just converting user input into calls to
libsvn_client. Typically, you'll have several calls to ..._wc and
..._subr before and after. The client writer will know best where
the conversion should be done.
So, basically, it's a question of efficiency -- both the runtime
efficiency of not converting every path more than once (if that
matters), and code complexity, which is more important.
>>We discussed this issue to death several times ago. Please, search the
>>list archives, read those discussions first.
>>
>>
>I'm resurrecting the topic quite consciously since from now 'till this problem
>is grabbed by the horns (possibly never), most client writers will probably
>raise the issue at one point or another (*envisions svn world with many
>clients*).
>
I understand your concern, but I really can't see a better solution than
the one proposed (ATM). I expect that the revamped command-line client
will be a good example for other client writers.
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 26 00:47:53 2002