Alo,
I'm new here and don't know if this is relevant. I just thought I'd
mention that you should be careful with the concept of a 'dirsep' as a way
of making paths cross platform.
Sun tried to make their paths general by using a 'dirsep' in java. This
never really worked. It allowed some simple translation between DOS and
Unix paths, but some more complex cases failed. Under MacOS (pre-X) it was
such a disaster that apple just moved to using Unix paths in java rather
than MacOS paths.
examples: On MacOS relative paths start with filesep whereas under Unix
absolute paths do. On MacOS there is no '..' for the parent directory;
that case is handled by two dirseps in a row.
Two ways around this are:
i) Use unix paths. This standardizes the semantics.
ii) Use URLs. This also standardizes the semantics and is probably the
better solution.
later,
\x/ill :-}
--On Monday, September 17, 2001 8:26 PM -0400 Garrett Rooney
<rooneg@electricjellyfish.net> wrote:
> so in the process of making svn_path_canonicalize actually do more
> than remove a trailing /, i've run into a small snag.
>
> my new code removes redundant components (// and /./ at the moment,
> well, dirsep dirsep and dirsep . dirsep actually, but anyway), and tha
> tworks fine, but the problem is that it seems that in several places
> we're passing url's to svn_path_canonicalize. of course, it's finding
> the // after http: and turning it into a single /. so later on when we
> parse the url we get screwed up results and crash.
>
> now it doesn't seem right to have svn_path_canonicalize try to deal
> with url's, since url's aren't really paths. would anyone mind the
> addition of svn_url_canonicalize (or something similar) in libsvn_subr
> which can call svn_path_canonicalize on the path portion?
>
> attached is the change to svn_path_canonicalize, just so you can see
> what i've got. don't use it though, or you'll crash trying to run
> 'svn update'.
>
> --
> garrett rooney Unix was not designed to stop you from
> rooneg@electricjellyfish.net doing stupid things, because that
> would http://electricjellyfish.net/ stop you from doing clever
> things.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:41 2006