On Wed, Nov 11, 2009 at 01:15:06PM +0000, Julian Foad wrote:
> On Wed, 2009-11-11 at 14:08 +0100, Stefan Sperling wrote:
> > On Wed, Nov 11, 2009 at 12:25:49PM +0000, Julian Foad wrote:
> > > DIRENT:
> > >
> > > A "dirent" represents a native operating-system path... but let's be
> > > clear exactly what kinds of absolute and relative path this includes.
> > >
> > > The representation seems a bit odd, using Subversion's "canonical path"
> > > rules ("/" separator, etc.), rather than the native form, and so
> > > requiring "to_internal_style" and "to_native_style" conversions.
> >
> > One observation I've made recently: On UNIX, passing a path containing
> > backslash-separators (e.g. a path parsed from a patch file) to
> > svn_dirent_internal_style() does absolutely nothing.
> > It just returns the path unmodified.
>
> Isn't that working as designed? A Unix path is allowed to contain
> backslash characters, and they are not treated as path separators, so
> "my\file" is a valid Unix filename, consisting of one component.
Yes, but there's no function that deals with the case where you get
a Windows path on unix and need to normalise it to internal style.
I don't know if dirent_uri should provide that. But I had to cook
a custom hack in libsvn_client/patch.c to deal with this case.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416574
Received on 2009-11-11 15:03:02 CET