> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: Saturday, February 28, 2009 9:48 AM
> To: dev_at_subversion.tigris.org
> Subject: Re: svn commit: r36202 - trunk/subversion/libsvn_ra_serf
>
> Eh? Aren't all parameters *supposed* to be canonical URLs to start
> with? (just like all paths)
>
> Or do we say that paths/urls are internal-format, but not necessarily
> canonical?
No, we do say that they must be canonical.
But the urls we receive from apr / mod_dav_svn over the network are not :(
What I did was updating the code to make sure they are now.
E.g. from property.c in this patch
> > - basecoll_url = apr_psprintf(pool, "%s/%ld/",
> > + basecoll_url = apr_psprintf(pool, "%s/%ld",
> > session->rev_root_stub, revision);
Generated a non canonical url that just happened to work correctly with the old code that recanonicalized before joining.
And almost every property returned from mod_dav_svn has a final '/' too :(
But we can't assume those values are correct after fixing them, to stay compatible with older mod_dav_svn versions.
Bert
>
> On Fri, Feb 27, 2009 at 22:50, Bert Huijben <rhuijben_at_sharpsvn.net>
> wrote:
> > Author: rhuijben
> > Date: Fri Feb 27 13:50:27 2009
> > New Revision: 36202
> >
> > Log:
> > Make libsvn_ra_serf canonicalize urls it receives to allow it to
> > use svn_path_url_add_component2. This resolves all obsolete warnings
> > in libsvn_ra_serf.
> >
> > * subversion/libsvn_ra_serf/blame.c
> > (svn_ra_serf__get_file_revs): In all these ...
> > * subversion/libsvn_ra_serf/commit.c
> > (global): Include svn_dirent_uri.h.
> > (handle_checkout, checkout_dir, get_version_url, checkout_file,
> > setup_copy_dir_headers, post_headers_iterator_callback, open_root,
> > delete_entry, add_directory, open_directory, add_file, open_file,
> > close_file): ...
> > * subversion/libsvn_ra_serf/getlocations.c
> > (svn_ra_serf__get_locations): ...
> > * subversion/libsvn_ra_serf/getlocationsegments.c
> > (svn_ra_serf__get_location_segments): ...
> > * subversion/libsvn_ra_serf/getlocks.c
> > (svn_ra_serf__get_locks): ...
> > * subversion/libsvn_ra_serf/get_deleted_rev.c
> > (svn_ra_serf__get_deleted_rev): ...
> > * subversion/libsvn_ra_serf/locks.c
> > (svn_ra_serf__get_lock): ...
> > * subversion/libsvn_ra_serf/log.c
> > (svn_ra_serf__get_log): ...
> > * subversion/libsvn_ra_serf/mergeinfo.c
> > (svn_ra_serf__get_mergeinfo): ...
> > * subversion/libsvn_ra_serf/options.c
> > (global): Include svn_dirent_uri.h.
> > (end_options): ...
> > * subversion/libsvn_ra_serf/property.c
> > (global): Include svn_dirent_uri.h.
> > (svn_ra_serf__get_baseline_info): ...
> > * subversion/libsvn_ra_serf/serf.c
> > (fetch_path_props, svn_ra_serf__get_dir): ...
> > * subversion/libsvn_ra_serf/update.c
> > (svn_ra_serf__get_file): ... functions, make sure incoming and
> generated
> > urls are always canonical and use svn_path_url_add_component2()
> that
> > assumes the components are already canonical.
> >
> > Modified:
> > trunk/subversion/libsvn_ra_serf/blame.c
> > trunk/subversion/libsvn_ra_serf/commit.c
> > trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
> > trunk/subversion/libsvn_ra_serf/getlocations.c
> > trunk/subversion/libsvn_ra_serf/getlocationsegments.c
> > trunk/subversion/libsvn_ra_serf/getlocks.c
> > trunk/subversion/libsvn_ra_serf/locks.c
> > trunk/subversion/libsvn_ra_serf/log.c
> > trunk/subversion/libsvn_ra_serf/mergeinfo.c
> > trunk/subversion/libsvn_ra_serf/options.c
> > trunk/subversion/libsvn_ra_serf/property.c
> > trunk/subversion/libsvn_ra_serf/serf.c
> > trunk/subversion/libsvn_ra_serf/update.c
> >
> > Modified: trunk/subversion/libsvn_ra_serf/blame.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/blame.
> c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/blame.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/blame.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -435,7 +435,7 @@ svn_ra_serf__get_file_revs(svn_ra_sessio
> > SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url,
> &relative_url, session,
> > NULL, session-
> >repos_url.path,
> > end, NULL, pool));
> > - req_url = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + req_url = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/commit.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/commit
> .c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/commit.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/commit.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -30,6 +30,7 @@
> > #include "svn_delta.h"
> > #include "svn_base64.h"
> > #include "svn_version.h"
> > +#include "svn_dirent_uri.h"
> > #include "svn_path.h"
> > #include "svn_props.h"
> >
> > @@ -280,7 +281,7 @@ handle_checkout(serf_request_t *request,
> > }
> > apr_uri_parse(pool, location, &uri);
> >
> > - ctx->resource_url = apr_pstrdup(ctx->pool, uri.path);
> > + ctx->resource_url = svn_uri_canonicalize(uri.path, ctx->pool);
> > }
> >
> > return status;
> > @@ -348,9 +349,9 @@ checkout_dir(dir_context_t *dir)
> > dir->checkout->activity_url = dir->commit->activity_url;
> > dir->checkout->activity_url_len = dir->commit-
> >activity_url_len;
> > dir->checkout->resource_url =
> > - svn_path_url_add_component(dir->parent_dir->checkout-
> >resource_url,
> > - svn_path_basename(dir->name,
> dir->pool),
> > - dir->pool);
> > + svn_path_url_add_component2(dir->parent_dir->checkout-
> >resource_url,
> > + svn_path_basename(dir->name,
> dir->pool),
> > + dir->pool);
> >
> > apr_hash_set(dir->commit->copied_entries,
> > apr_pstrdup(dir->commit->pool, dir->name),
> > @@ -456,7 +457,7 @@ get_version_url(const char **checked_in_
> >
> > if (current_version)
> > {
> > - *checked_in_url = current_version->data;
> > + *checked_in_url = svn_uri_canonicalize(current_version-
> >data, pool);
> > return SVN_NO_ERROR;
> > }
> > }
> > @@ -490,9 +491,11 @@ get_version_url(const char **checked_in_
> > return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
> > _("Path '%s' not present"),
> > session->repos_url.path);
> > +
> > + root_checkout = svn_uri_canonicalize(root_checkout, pool);
> > }
> >
> > - *checked_in_url = svn_path_url_add_component(root_checkout,
> relpath, pool);
> > + *checked_in_url = svn_path_url_add_component2(root_checkout,
> relpath, pool);
> >
> > return SVN_NO_ERROR;
> > }
> > @@ -528,9 +531,9 @@ checkout_file(file_context_t *file)
> > file->checkout->activity_url_len = file->commit-
> >activity_url_len;
> > diff_path = svn_path_is_child(dir->name, file->name, file-
> >pool);
> > file->checkout->resource_url =
> > - svn_path_url_add_component(dir->checkout->resource_url,
> > - diff_path,
> > - file->pool);
> > + svn_path_url_add_component2(dir->checkout->resource_url,
> > + diff_path,
> > + file->pool);
> > return SVN_NO_ERROR;
> > }
> > }
> > @@ -875,9 +878,9 @@ setup_copy_dir_headers(serf_bucket_t *he
> > /* The Dest URI must be absolute. Bummer. */
> > uri = dir->commit->session->repos_url;
> > uri.path =
> > - (char*)svn_path_url_add_component(dir->parent_dir->checkout-
> >resource_url,
> > - svn_path_basename(dir->name,
> pool),
> > - pool);
> > + (char*)svn_path_url_add_component2(dir->parent_dir->checkout-
> >resource_url,
> > + svn_path_basename(dir-
> >name, pool),
> > + pool);
> >
> > absolute_uri = apr_uri_unparse(pool, &uri, 0);
> >
> > @@ -995,9 +998,9 @@ post_headers_iterator_callback(void *bat
> > given, and store the whole lot of it in the commit context.
> */
> > prc_cc->txn_name = apr_pstrdup(prc_cc->pool, val);
> > prc_cc->txn_url =
> > - svn_path_url_add_component(sess->txn_stub, val, prc_cc-
> >pool);
> > + svn_path_url_add_component2(sess->txn_stub, val, prc_cc-
> >pool);
> > prc_cc->txn_root_url =
> > - svn_path_url_add_component(sess->txn_root_stub, val, prc_cc-
> >pool);
> > + svn_path_url_add_component2(sess->txn_root_stub, val,
> prc_cc->pool);
> > }
> > return 0;
> > }
> > @@ -1088,8 +1091,8 @@ open_root(void *edit_baton,
> > SVN_ERR(svn_ra_serf__get_relative_path(&rel_path,
> > ctx->session-
> >repos_url.path,
> > ctx->session, NULL,
> dir_pool));
> > - ctx->txn_root_url = svn_path_url_add_component(ctx-
> >txn_root_url,
> > - rel_path, ctx-
> >pool);
> > + ctx->txn_root_url = svn_path_url_add_component2(ctx-
> >txn_root_url,
> > + rel_path, ctx-
> >pool);
> >
> > /* Build our directory baton. */
> > dir = apr_pcalloc(dir_pool, sizeof(*dir));
> > @@ -1135,8 +1138,8 @@ open_root(void *edit_baton,
> > "requested activity-collection-set
> value"));
> >
> > ctx->activity_url =
> > - svn_path_url_add_component(activity_str,
> svn_uuid_generate(ctx->pool),
> > - ctx->pool);
> > + svn_path_url_add_component2(activity_str,
> svn_uuid_generate(ctx->pool),
> > + ctx->pool);
> > ctx->activity_url_len = strlen(ctx->activity_url);
> >
> > /* Create our activity URL now on the server. */
> > @@ -1269,16 +1272,16 @@ delete_entry(const char *path,
> >
> > if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit))
> > {
> > - delete_target = svn_path_url_add_component(dir->commit-
> >txn_root_url,
> > - path, dir->pool);
> > + delete_target = svn_path_url_add_component2(dir->commit-
> >txn_root_url,
> > + path, dir->pool);
> > }
> > else
> > {
> > /* Ensure our directory has been checked out */
> > SVN_ERR(checkout_dir(dir));
> > - delete_target = svn_path_url_add_component(dir->checkout-
> >resource_url,
> > -
> svn_path_basename(path, pool),
> > - pool);
> > + delete_target = svn_path_url_add_component2(dir->checkout-
> >resource_url,
> > +
> svn_path_basename(path, pool),
> > + pool);
> > }
> >
> > /* DELETE our entry */
> > @@ -1373,8 +1376,8 @@ add_directory(const char *path,
> >
> > if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit))
> > {
> > - dir->url = svn_path_url_add_component(parent->commit-
> >txn_root_url,
> > - path, dir->pool);
> > + dir->url = svn_path_url_add_component2(parent->commit-
> >txn_root_url,
> > + path, dir->pool);
> > mkcol_target = dir->url;
> > }
> > else
> > @@ -1382,10 +1385,10 @@ add_directory(const char *path,
> > /* Ensure our parent is checked out. */
> > SVN_ERR(checkout_dir(parent));
> >
> > - dir->url = svn_path_url_add_component(parent->commit-
> >checked_in_url,
> > - path, dir->pool);
> > - mkcol_target = svn_path_url_add_component(parent->checkout-
> >resource_url,
> > -
> svn_path_basename(path,
> > + dir->url = svn_path_url_add_component2(parent->commit-
> >checked_in_url,
> > + path, dir->pool);
> > + mkcol_target = svn_path_url_add_component2(parent->checkout-
> >resource_url,
> > +
> svn_path_basename(path,
> >
> dir->pool),
> > dir->pool);
> > }
> > @@ -1421,8 +1424,8 @@ add_directory(const char *path,
> > dir->commit->conn,
> > uri.path, dir-
> >copy_revision,
> > NULL, dir_pool));
> > - req_url = svn_path_url_add_component(basecoll_url,
> rel_copy_path,
> > - dir->pool);
> > + req_url = svn_path_url_add_component2(basecoll_url,
> rel_copy_path,
> > + dir->pool);
> >
> > handler->method = "COPY";
> > handler->path = req_url;
> > @@ -1478,8 +1481,8 @@ open_directory(const char *path,
> >
> > if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit))
> > {
> > - dir->url = svn_path_url_add_component(parent->commit-
> >txn_root_url,
> > - path, dir->pool);
> > + dir->url = svn_path_url_add_component2(parent->commit-
> >txn_root_url,
> > + path, dir->pool);
> > }
> > else
> > {
> > @@ -1627,8 +1630,8 @@ add_file(const char *path,
> > transaction root tree for this thing. */
> > if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit))
> > {
> > - new_file->url = svn_path_url_add_component(dir->commit-
> >txn_root_url,
> > - path, new_file-
> >pool);
> > + new_file->url = svn_path_url_add_component2(dir->commit-
> >txn_root_url,
> > + path, new_file-
> >pool);
> > head_target_url = new_file->url;
> > }
> > /* Otherwise, we'll look at the public HEAD URL, but only if we
> > @@ -1642,8 +1645,8 @@ add_file(const char *path,
> > SVN_ERR(checkout_dir(dir));
> >
> > new_file->url =
> > - svn_path_url_add_component(dir->checkout->resource_url,
> > - svn_path_basename(path, new_file-
> >pool),
> > + svn_path_url_add_component2(dir->checkout->resource_url,
> > + svn_path_basename(path,
> new_file->pool),
> > new_file->pool);
> >
> > while (deleted_parent && deleted_parent[0] != '\0')
> > @@ -1660,8 +1663,8 @@ add_file(const char *path,
> > (deleted_parent && deleted_parent[0] != '\0')))
> > {
> > head_target_url =
> > - svn_path_url_add_component(dir->commit->session-
> >repos_url.path,
> > - path, new_file->pool);
> > + svn_path_url_add_component2(dir->commit->session-
> >repos_url.path,
> > + path, new_file->pool);
> > }
> > }
> >
> > @@ -1723,8 +1726,8 @@ open_file(const char *path,
> >
> > if (USING_HTTPV2_COMMIT_SUPPORT(parent->commit))
> > {
> > - new_file->url = svn_path_url_add_component(parent->commit-
> >txn_root_url,
> > - path, new_file-
> >pool);
> > + new_file->url = svn_path_url_add_component2(parent->commit-
> >txn_root_url,
> > + path, new_file-
> >pool);
> > }
> > else
> > {
> > @@ -1844,7 +1847,7 @@ close_file(void *file_baton,
> > ctx->commit->conn,
> > uri.path, ctx-
> >copy_revision,
> > NULL, pool));
> > - req_url = svn_path_url_add_component(basecoll_url,
> rel_copy_path, pool);
> > + req_url = svn_path_url_add_component2(basecoll_url,
> rel_copy_path, pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> > handler->method = "COPY";
> >
> > Modified: trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/get_de
> leted_rev.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/get_deleted_rev.c Fri Feb 27
> 12:48:28 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/get_deleted_rev.c Fri Feb 27
> 13:50:27 2009 (r36202)
> > @@ -200,7 +200,7 @@ svn_ra_serf__get_deleted_rev(svn_ra_sess
> > ras, NULL, NULL,
> peg_revision, NULL,
> > pool));
> >
> > - req_url = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + req_url = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > parser_ctx = apr_pcalloc(pool, sizeof(*parser_ctx));
> > parser_ctx->pool = pool;
> >
> > Modified: trunk/subversion/libsvn_ra_serf/getlocations.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/getloc
> ations.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/getlocations.c Fri Feb 27
> 12:48:28 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/getlocations.c Fri Feb 27
> 13:50:27 2009 (r36202)
> > @@ -229,7 +229,7 @@ svn_ra_serf__get_locations(svn_ra_sessio
> > NULL, NULL, peg_revision,
> NULL,
> > pool));
> >
> > - req_url = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + req_url = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/getlocationsegments.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/getloc
> ationsegments.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/getlocationsegments.c Fri
> Feb 27 12:48:28 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/getlocationsegments.c Fri
> Feb 27 13:50:27 2009 (r36202)
> > @@ -176,7 +176,7 @@ svn_ra_serf__get_location_segments(svn_r
> > SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url,
> &relative_url, session,
> > NULL, NULL, peg_revision,
> NULL, pool));
> >
> > - req_url = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + req_url = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/getlocks.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/getloc
> ks.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/getlocks.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/getlocks.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -297,7 +297,7 @@ svn_ra_serf__get_locks(svn_ra_session_t
> > lock_ctx->hash = apr_hash_make(pool);
> > lock_ctx->done = FALSE;
> >
> > - req_url = svn_path_url_add_component(session->repos_url.path,
> path, pool);
> > + req_url = svn_path_url_add_component2(session->repos_url.path,
> path, pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/locks.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/locks.
> c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/locks.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/locks.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -496,7 +496,7 @@ svn_ra_serf__get_lock(svn_ra_session_t *
> > svn_error_t *err;
> > int status_code;
> >
> > - req_url = svn_path_url_add_component(session->repos_url.path,
> path, pool);
> > + req_url = svn_path_url_add_component2(session->repos_url.path,
> path, pool);
> >
> > lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx));
> >
> > @@ -596,8 +596,8 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s
> > lock_ctx->lock->comment = comment;
> >
> > lock_ctx->force = force;
> > - req_url = svn_path_url_add_component(session->repos_url.path,
> > - lock_ctx->path, subpool);
> > + req_url = svn_path_url_add_component2(session->repos_url.path,
> > + lock_ctx->path,
> subpool);
> >
> > handler = apr_pcalloc(subpool, sizeof(*handler));
> >
> > @@ -746,8 +746,8 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
> > unlock_ctx.force = force;
> > unlock_ctx.token = apr_pstrcat(subpool, "<", token, ">", NULL);
> >
> > - req_url = svn_path_url_add_component(session->repos_url.path,
> path,
> > - subpool);
> > + req_url = svn_path_url_add_component2(session->repos_url.path,
> path,
> > + subpool);
> >
> > handler = apr_pcalloc(subpool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/log.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/log.c?
> pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/log.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/log.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -576,7 +576,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r
> > SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url,
> &relative_url, session,
> > NULL, NULL, peg_rev, NULL,
> pool));
> >
> > - req_url = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + req_url = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > handler = apr_pcalloc(pool, sizeof(*handler));
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/mergeinfo.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/mergei
> nfo.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/mergeinfo.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/mergeinfo.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -240,7 +240,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
> > SVN_ERR(svn_ra_serf__get_baseline_info(&basecoll_url,
> &relative_url, session,
> > NULL, NULL, revision, NULL,
> pool));
> >
> > - path = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + path = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> >
> > mergeinfo_ctx = apr_pcalloc(pool, sizeof(*mergeinfo_ctx));
> > mergeinfo_ctx->pool = pool;
> >
> > Modified: trunk/subversion/libsvn_ra_serf/options.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/option
> s.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/options.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/options.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -32,6 +32,7 @@
> > #include "svn_config.h"
> > #include "svn_delta.h"
> > #include "svn_version.h"
> > +#include "svn_dirent_uri.h"
> > #include "svn_path.h"
> > #include "svn_private_config.h"
> >
> > @@ -182,7 +183,8 @@ end_options(svn_ra_serf__xml_parser_t *p
> > strcmp(name.name, "href") == 0)
> > {
> > options_ctx->collect_cdata = FALSE;
> > - options_ctx->activity_collection = options_ctx->attr_val;
> > + options_ctx->activity_collection =
> > + svn_uri_canonicalize(options_ctx->attr_val,
> options_ctx->pool);
> > pop_state(options_ctx);
> > }
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/property.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/proper
> ty.c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/property.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/property.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -24,6 +24,7 @@
> > #include "svn_base64.h"
> > #include "svn_xml.h"
> > #include "svn_props.h"
> > +#include "svn_dirent_uri.h"
> >
> > #include "private/svn_dav_protocol.h"
> > #include "svn_private_config.h"
> > @@ -970,7 +971,7 @@ svn_ra_serf__get_baseline_info(const cha
> > const char *decoded_root =
> > svn_path_uri_decode(session->repos_root.path, pool);
> >
> > - basecoll_url = apr_psprintf(pool, "%s/%ld/",
> > + basecoll_url = apr_psprintf(pool, "%s/%ld",
> > session->rev_root_stub, revision);
> >
> > if (latest_revnum)
> > @@ -1026,7 +1027,9 @@ svn_ra_serf__get_baseline_info(const cha
> > _("The OPTIONS response did not
> include "
> > "the requested checked-in
> value"));
> > }
> > -
> > +
> > + baseline_url = svn_uri_canonicalize(baseline_url, pool);
> > +
> > SVN_ERR(svn_ra_serf__retrieve_props(props, session, conn,
> > baseline_url, revision,
> "0",
> > baseline_props, pool));
> > @@ -1041,7 +1044,9 @@ svn_ra_serf__get_baseline_info(const cha
> > _("The OPTIONS response did not
> include the "
> > "requested baseline-collection
> value"));
> > }
> > -
> > +
> > + basecoll_url = svn_uri_canonicalize(basecoll_url, pool);
> > +
> > if (latest_revnum)
> > {
> > const char *version_name;
> >
> > Modified: trunk/subversion/libsvn_ra_serf/serf.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/serf.c
> ?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/serf.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/serf.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -498,7 +498,7 @@ fetch_path_props(svn_ra_serf__propfind_c
> > /* If we have a relative path, append it. */
> > if (rel_path)
> > {
> > - path = svn_path_url_add_component(path, rel_path, pool);
> > + path = svn_path_url_add_component2(path, rel_path, pool);
> > }
> >
> > props = apr_hash_make(pool);
> > @@ -527,7 +527,7 @@ fetch_path_props(svn_ra_serf__propfind_c
> > * the revision's baseline-collection.
> > */
> > prop_ctx = NULL;
> > - path = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + path = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> > revision = SVN_INVALID_REVNUM;
> > svn_ra_serf__deliver_props(&prop_ctx, props, session, session-
> >conns[0],
> > path, revision, "0",
> > @@ -777,7 +777,7 @@ svn_ra_serf__get_dir(svn_ra_session_t *r
> > /* If we have a relative path, URI encode and append it. */
> > if (rel_path)
> > {
> > - path = svn_path_url_add_component(path, rel_path, pool);
> > + path = svn_path_url_add_component2(path, rel_path, pool);
> > }
> >
> > props = apr_hash_make(pool);
> > @@ -793,7 +793,7 @@ svn_ra_serf__get_dir(svn_ra_session_t *r
> > session, NULL, path,
> revision,
> > fetched_rev, pool));
> >
> > - path = svn_path_url_add_component(basecoll_url, relative_url,
> pool);
> > + path = svn_path_url_add_component2(basecoll_url, relative_url,
> pool);
> > revision = SVN_INVALID_REVNUM;
> > }
> >
> >
> > Modified: trunk/subversion/libsvn_ra_serf/update.c
> > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_serf/update
> .c?pathrev=36202&r1=36201&r2=36202
> >
> =======================================================================
> =======
> > --- trunk/subversion/libsvn_ra_serf/update.c Fri Feb 27 12:48:28
> 2009 (r36201)
> > +++ trunk/subversion/libsvn_ra_serf/update.c Fri Feb 27 13:50:27
> 2009 (r36202)
> > @@ -2591,7 +2591,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
> > /* Fetch properties. */
> > fetch_props = apr_hash_make(pool);
> >
> > - fetch_url = svn_path_url_add_component(session->repos_url.path,
> path, pool);
> > + fetch_url = svn_path_url_add_component2(session->repos_url.path,
> path, pool);
> >
> > /* The simple case is if we want HEAD - then a GET on the fetch_url
> is fine.
> > *
> > @@ -2605,7 +2605,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
> > SVN_ERR(svn_ra_serf__get_baseline_info(&baseline_url,
> &rel_path,
> > session, conn,
> fetch_url,
> > revision, NULL, pool));
> > - fetch_url = svn_path_url_add_component(baseline_url, rel_path,
> pool);
> > + fetch_url = svn_path_url_add_component2(baseline_url,
> rel_path, pool);
> > revision = SVN_INVALID_REVNUM;
> > }
> >
> > ------------------------------------------------------
> >
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageI
> d=1241042
> >
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageI
> d=1243603
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1244068
Received on 2009-02-28 11:52:02 CET