Peter Samuelson wrote:
> [Julian Foad]
> > Proposal for switching to a dedicated "fs path" API:
> > 
> > Step 1:  Introduce a new API for FS paths, as a thin layer that maps to
> > existing path APIs.  It must assert that the fspath arguments and fspath
> > return values begin with '/'.  Initially it should map directly to
> > svn_uri_*, so that it can be seen to be a direct replacement.
> 
> So do these or do these not involve doing URI escaping?  %20 for space,
> etc.

No escaping involved here - these are not URLs and these are not
relative-URLs and so do not have any escaping inside them.  When we make
a URL from a base URL and a repo-relpath, *then* we will escape it.

I believe, but haven't checked recently, that the present set of
svn_uri_* functions doesn't touch or care about percent-escaping when
handling these paths.  Because we have forced them to handle this case,
they don't assert that their arguments are canonical.  After we make
this transition, then the svn_uri_* functions should be able (from a
correctness point of view) to assert that their 'URI' inputs and outputs
are canonical.


>   By calling them 'fs paths', the assumption is that these are in
> UTF-8, and there is no marshalling / escaping to even think about,
> except when converting it to or from a URI or dirent.  Is that the
> intent?

Yes.


> > Bikeshed: svn_fspath__* or svn_fs__path_* or something else?
> 
> svn_fspath__ seems better to me.  svn_fs__path_ sounds like this is all
> internal to libsvn_fs, whereas I understand you want this in
> libsvn_subr for layers to use that are _not_ specifically talking about
> svn_fs internals.

Correct, so yes, I agree.

- Julian


Reply via email to