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

Re: Issues 584 & 603 -- / vs. \

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-25 22:41:08 CEST

On Tue, Jun 25, 2002 at 10:08:14PM +0200, Martijn Boekhorst wrote:
>...
> Doesn't it make more sense for a win32 version to use the \ path convention and

Nope. You're talking about Subversion paths, not Win32 paths. Subversion
defines "/" for separators for all paths (files, repository, URLs).

> perhaps layer/wrap these things with either macros or stubs? Using MAX_PATH as
> a constant we can allocate one / thread and use thread local storage (related
> question, are the client libs thread-safe?), then, a macro could be included
> for windows clients to convert these and wrap the original call.

That would break as soon as one function called another. They would compete
for the per-thread buffer.

> Eg. if I may be nasty :
> #define svn_wc_check_wc(path, is_wc, pool)\
> svn_wc_check_wc(PATH_LOCAL_TO_SVN(path), is_wc, pool);

Nope. If a path is translated on its way into, say, libsvn_client, then we
shouldn't continue translating the thing every time we pass it to a WC
function.

>...
> Just thinking out loud here and these are probably silly thoughts, but using
> forward slashes on a win32 platform is really quite 'strange', regardless of
> URL formatting which needs translation anyway;

The simple design point is that Subversion (internally) uses a particular
separator for all paths. Client applications need to transform from the
local/native style to the SVN style when calling the libraries.

> and in addition represents a
> barrier for entry since I couldn't find it documented anywhere (which could be
> my failure to look for it ofcourse).

It isn't documented, but it will be one day.

Ben just detailed the needs for many of the inputs to the SVN libraries.
(although I question what other types of inputs we have, and if we need any
 processing on them, too)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 25 22:38:51 2002

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.