> -----Original Message----- > From: cmpil...@apache.org [mailto:cmpil...@apache.org] > Sent: vrijdag 21 januari 2011 17:44 > To: comm...@subversion.apache.org > Subject: svn commit: r1061895 - in /subversion/branches/uris-as- > urls/subversion/svn: checkout-cmd.c cl.h diff-cmd.c export-cmd.c info-cmd.c > log-cmd.c merge-cmd.c switch-cmd.c util.c > > Author: cmpilato > Date: Fri Jan 21 16:43:49 2011 > New Revision: 1061895 > > URL: http://svn.apache.org/viewvc?rev=1061895&view=rev > Log: > On the 'uris-as-urls' branch, review and correct some use of the > svn_uri_* APIs. (One step of many similar ones.) > > * subversion/svn/merge-cmd.c > (svn_cl__merge): Review, correct (as needed), and rename uses of the > svn_uri_* API. > > * subversion/svn/switch-cmd.c > (svn_cl__switch): Same as above. > > * subversion/svn/checkout-cmd.c > (svn_cl__checkout): Same as above. > > * subversion/svn/info-cmd.c > (svn_cl__info): Same as above. > > * subversion/svn/log-cmd.c > (log_entry_receiver): Same as above. > > * subversion/svn/diff-cmd.c > (summarize_regular): Same as above, but also fixes preexisting URI > encoding bugs. > (summarize_xml, svn_cl__diff): Replace uses of svn_cl__path_join() > with more explicit code. > > * subversion/svn/export-cmd.c > (svn_cl__export): Same as above, but also fixes a preexisting URI > encoding bug. > > * subversion/svn/cl.h, > (svn_cl__path_join): Remove as unused. > > * subversion/svn/util.c > (svn_cl__path_join): Remove as unused. > (svn_cl__opt_parse_path): Track renamed svn_uri_canonicalize() function. > > Modified: > subversion/branches/uris-as-urls/subversion/svn/checkout-cmd.c > subversion/branches/uris-as-urls/subversion/svn/cl.h > subversion/branches/uris-as-urls/subversion/svn/diff-cmd.c > subversion/branches/uris-as-urls/subversion/svn/export-cmd.c > subversion/branches/uris-as-urls/subversion/svn/info-cmd.c > subversion/branches/uris-as-urls/subversion/svn/log-cmd.c > subversion/branches/uris-as-urls/subversion/svn/merge-cmd.c > subversion/branches/uris-as-urls/subversion/svn/switch-cmd.c > subversion/branches/uris-as-urls/subversion/svn/util.c > > Modified: subversion/branches/uris-as-urls/subversion/svn/checkout-cmd.c > URL: http://svn.apache.org/viewvc/subversion/branches/uris-as- > urls/subversion/svn/checkout- > cmd.c?rev=1061895&r1=1061894&r2=1061895&view=diff > ========================================================== > ==================== > --- subversion/branches/uris-as-urls/subversion/svn/checkout-cmd.c > (original) > +++ subversion/branches/uris-as-urls/subversion/svn/checkout-cmd.c Fri > Jan 21 16:43:49 2011 > @@ -93,9 +93,8 @@ svn_cl__checkout(apr_getopt_t *os, > > /* Discard the peg-revision, if one was provided. */ > SVN_ERR(svn_opt_parse_path(&pegrev, &local_dir, local_dir, pool)); > - > - local_dir = svn_uri_basename(local_dir, pool); > - local_dir = svn_path_uri_decode(local_dir, pool); > + local_dir = svn_path_uri_decode(svn_url_basename(local_dir, pool), > + pool);
I think the uri-decode should be handled in svn_url_basename (and _is_child, etc.) for the caller. That way they always return a valid relpath and the callers can stop handling the encode/decode. Bert