Greg Hudson <ghudson@MIT.EDU> writes:
> On Fri, 2004-12-10 at 13:50, kfogel@tigris.org wrote:
> > + /* Split 'url' to get the parent, but split 'path_or_url' to get
> > + the basename. We're going to use the former as a URL, but
> > + the latter as a non-URL. If any URI-encoding happened in the
> > + earlier conversion from 'path_or_url' to 'url', we want the
> > + effects reflected in 'parent_url' but not in 'base_name'. */
> > + svn_path_split (url, &parent_url, NULL, pool);
> > + svn_path_split (path_or_url, NULL, &base_name, pool);
>
> If path_or_url is a URL, won't it (at least potentially) contain encoded
> characters right from the get go?
>
> In other words, won't
>
> svn ls -v http://.../path/to/foo%20bar
>
> still fail with this fix?
Nice catch. Yes, r12273 fixed one kind of bug, but not another. I
think the solution is simple, though:
Index: subversion/libsvn_client/ls.c
===================================================================
--- subversion/libsvn_client/ls.c (revision 12333)
+++ subversion/libsvn_client/ls.c (working copy)
@@ -118,6 +118,8 @@
effects reflected in 'parent_url' but not in 'base_name'. */
svn_path_split (url, &parent_url, NULL, pool);
svn_path_split (path_or_url, NULL, &base_name, pool);
+ if (svn_path_is_url (path_or_url))
+ base_name = svn_path_uri_decode (base_name);
/* Re-open the session to the file's parent instead. */
SVN_ERR (svn_client__open_ra_session (&session, ra_lib, parent_url,
Does this seem right to you?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 16 22:05:32 2004