On Nov 16, 2003, at 11:01 AM, D.J. Heap wrote:
> Barry Scott wrote:
>> DJ,
>> There is a need for two functions. One to use when supplying input,
>> the
>> other to take output from svn and convert into native form.
>> Maybe the output path version is simply a function that replaces each
>> '/' with '\'? I believe I always know by context if its a URL or path
>> and can avoid calling on a URL trivially.
>> Barry
>
> We already have those...svn_path_internal_style and
> svn_path_local_style -- but they don't do case canonization or utf8
> conversion or handle urls. They seem to be for internal use mostly.
> Perhaps we should make them more functional, though?
>
> Here's a patch for converting input paths for the libraries. I agree
> that we probably need one for the other direction, but I would like to
> see what people think about this one.
>
> Any objections or thoughts? If it looks like the direction is ok,
> then I'll make a function for the other direction and clean them up a
> bit (to use subpools for temp stuff mostly) and submit a real one.
>
> DJ
> Index: subversion/include/svn_path.h
> ===================================================================
> --- subversion/include/svn_path.h (revision 7765)
> +++ subversion/include/svn_path.h (working copy)
> @@ -172,6 +172,14 @@
> const char *svn_path_canonicalize (const char *path, apr_pool_t
> *pool);
>
>
> +/** Convert @a raw_target path or url to the library required form
> and return
> + * the results in @a *target, allocated in @a pool.
> + */
> +svn_error_t *
> +svn_path_convert_target (const char** target, const char *raw_target,
> + apr_pool_t *pool);
>
If we're going to go down this path we really need to document
precisely what this function is converting FROM. As it stands it seems
like some magical function that converts from whatever the hell
encoding you pass it into what Subversion expects internally, and that
just can't work in all cases.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 16 17:18:51 2003