> -----Original Message-----
> From: Hyrum K. Wright [mailto:hyrum_at_hyrumwright.org]
> Sent: dinsdag 15 september 2009 3:39
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r39319 - trunk/subversion/libsvn_wc
>
> Author: hwright
> Date: Mon Sep 14 18:38:47 2009
> New Revision: 39319
>
> Log:
> Properly escape returned URLs when getting them directly through the
> node API.
>
> This fixes lock test 31 on the dav buildbot.
>
> * subversion/libsvn_wc/node.c
> (svn_wc__node_get_url): Escape the repos_relpath before creating the
> url.
>
> Modified:
> trunk/subversion/libsvn_wc/node.c
>
> Modified: trunk/subversion/libsvn_wc/node.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/node.c?path
> rev=39319&r1=39318&r2=39319
> =======================================================================
> =======
> --- trunk/subversion/libsvn_wc/node.c Mon Sep 14 15:25:26 2009
> (r39318)
> +++ trunk/subversion/libsvn_wc/node.c Mon Sep 14 18:38:47 2009
> (r39319)
> @@ -281,7 +281,9 @@ svn_wc__node_get_url(const char **url,
> }
>
> SVN_ERR_ASSERT(repos_root_url != NULL && repos_relpath != NULL);
> - *url = svn_uri_join(repos_root_url, repos_relpath, result_pool);
> + *url = svn_uri_join(repos_root_url,
> + svn_path_uri_encode(repos_relpath,
> scratch_pool),
> + result_pool);
svn_path_url_add_component2() does all this in one operation.
Another, probably better solution for several cases is to also pass the
repos_relpath to the caller.
Using the repository relative path allows the caller to handle multiple urls
to the same repository (just check the UUID) and at the same time the caller
can forget about encoding the uri/url for most purposes.
Bert
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2394902
Received on 2009-09-15 09:20:02 CEST