Author: cmpilato
Date: Thu Jan 27 17:05:58 2011
New Revision: 1064200
URL: http://svn.apache.org/viewvc?rev=1064200&view=rev
Log:
On the 'uris-as-urls' branch: Begin ensuring that the relpaths
returned from svn_url_* functions are URI-decoded.
* BRANCH-README
Update status.
* subversion/include/svn_dirent_uri.h
(svn_path_is_child): Now promise to URI-decode the returned
remainder; also require a pool.
* subversion/libsvn_subr/dirent_uri.c
(svn_url_is_child): URI-decoded the returned relpath.
* subversion/tests/libsvn_subr/dirent_uri-test.c
(test_uri_is_child): Add test data to verify the new promise.
* tools/client-side/svnmucc/svnmucc.c
(subtract_anchor): Track new requirements and promises of
svn_url_is_child().
* subversion/libsvn_ra/ra_loader.c
(svn_ra_get_path_relative_to_session,
svn_ra_get_path_relative_to_root): Same as above.
* subversion/libsvn_ra/compat.c
(svn_ra__file_revs_from_log): Same as above.
* subversion/libsvn_ra_neon/session.c
(svn_ra_neon__get_path_relative_to_root): Same as above.
* subversion/libsvn_ra_local/ra_plugin.c
(svn_ra_local__reparent): Same as above.
* subversion/libsvn_wc/adm_ops.c
(svn_wc__set_file_external_location): Same as above.
* subversion/libsvn_wc/adm_files.c
(svn_wc__internal_ensure_adm): Same as above.
* subversion/libsvn_wc/upgrade.c
(ensure_repos_info): Same as above.
* subversion/libsvn_wc/entries.c
(write_entry): Same as above.
* subversion/libsvn_ra_svn/client.c
(path_relative_to_root): Same as above.
* subversion/libsvn_client/copy.c
(repos_to_repos_copy, wc_to_repos_copy): Same as above.
* subversion/libsvn_client/info.c
(push_dir_info): Same as above.
* subversion/libsvn_client/util.c
(svn_client__path_relative_to_root): Same as above.
Modified:
subversion/branches/uris-as-urls/BRANCH-README
subversion/branches/uris-as-urls/subversion/include/svn_dirent_uri.h
subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c
subversion/branches/uris-as-urls/subversion/libsvn_client/info.c
subversion/branches/uris-as-urls/subversion/libsvn_client/util.c
subversion/branches/uris-as-urls/subversion/libsvn_ra/compat.c
subversion/branches/uris-as-urls/subversion/libsvn_ra/ra_loader.c
subversion/branches/uris-as-urls/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/uris-as-urls/subversion/libsvn_ra_neon/session.c
subversion/branches/uris-as-urls/subversion/libsvn_ra_svn/client.c
subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_files.c
subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_ops.c
subversion/branches/uris-as-urls/subversion/libsvn_wc/entries.c
subversion/branches/uris-as-urls/subversion/libsvn_wc/upgrade.c
subversion/branches/uris-as-urls/subversion/tests/libsvn_subr/dirent_uri-test.c
subversion/branches/uris-as-urls/tools/client-side/svnmucc/svnmucc.c
Modified: subversion/branches/uris-as-urls/BRANCH-README
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/BRANCH-README?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/BRANCH-README (original)
+++ subversion/branches/uris-as-urls/BRANCH-README Thu Jan 27 17:05:58 2011
@@ -69,7 +69,7 @@ Step 3:
svn_url_basename [DONE]
svn_url_condense_targets
- svn_url_is_child
+ svn_url_is_child [DONE]
svn_url_split [DONE]
Make svn_url_join_relpath() URI-encoded its input relpath.
Modified: subversion/branches/uris-as-urls/subversion/include/svn_dirent_uri.h
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/include/svn_dirent_uri.h?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/include/svn_dirent_uri.h
(original)
+++ subversion/branches/uris-as-urls/subversion/include/svn_dirent_uri.h Thu
Jan 27 17:05:58 2011
@@ -547,26 +547,17 @@ svn_dirent_get_absolute(const char **pab
const char *relative,
apr_pool_t *pool);
-/** Test if @a child_uri is a child of @a parent_uri.
- * If not, return @c NULL.
- * If so, return a copy of the remainder uri, allocated in @a pool.
- * (The remainder is the component which, added to @a parent_uri, yields
- * @a child_uri. The remainder does not begin with a dir separator.)
+/** Test if @a child_uri is a child of @a parent_uri. If not, return
+ * @c NULL. If so, return a URI-decoded copy of the remainder uri,
+ * allocated in @a pool. (The remainder is the component which, added
+ * to @a parent_uri, yields @a child_uri. The remainder does not
+ * begin with a dir separator.)
*
- * Both uris must be in canonical form, and must either be absolute,
- * or contain no ".." components.
+ * Both uris must be in canonical form.
*
* If @a child_uri is the same as @a parent_uri, it is not considered a child,
* so the result is @c NULL; an empty string is never returned.
*
- * If @a pool is @c NULL , a pointer into @a child_uri will be returned to
- * identify the remainder uri.
- *
- * ### @todo the ".." restriction is unfortunate, and would ideally
- * be lifted by making the implementation smarter. But this is not
- * trivial: if the uri is "../foo", how do you know whether or not
- * the current directory is named "foo" in its parent?
- *
* @since New in 1.7.
*/
const char *
Modified: subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_client/copy.c Thu Jan 27
17:05:58 2011
@@ -917,9 +917,7 @@ repos_to_repos_copy(const apr_array_head
svn_url_dirname(first_pair->dst_abspath_or_url, pool),
pool);
if (dir)
- SVN_ERR(find_absent_parents1(ra_session,
- svn_path_uri_decode(dir, pool),
- new_dirs, pool));
+ SVN_ERR(find_absent_parents1(ra_session, dir, new_dirs, pool));
}
/* If, however, this is *not* a move, TOP_URL only points to the
common ancestor of our destination path(s), or possibly one
@@ -938,7 +936,8 @@ repos_to_repos_copy(const apr_array_head
{
const char *new_url = APR_ARRAY_IDX(new_urls, i, const char *);
dir = svn_url_is_child(top_url, new_url, pool);
- APR_ARRAY_PUSH(new_dirs, const char *) = dir ? dir : "";
+ APR_ARRAY_PUSH(new_dirs, const char *) =
+ dir ? svn_path_uri_encode(dir, pool) : "";
}
}
}
@@ -984,7 +983,6 @@ repos_to_repos_copy(const apr_array_head
src_rel = svn_url_is_child(top_url, pair->src_abspath_or_url, pool);
if (src_rel)
{
- src_rel = svn_path_uri_decode(src_rel, pool);
SVN_ERR(svn_ra_check_path(ra_session, src_rel, pair->src_revnum,
&info->src_kind, pool));
}
@@ -1016,9 +1014,7 @@ repos_to_repos_copy(const apr_array_head
/* Figure out the basename that will result from this operation,
and ensure that we aren't trying to overwrite existing paths. */
dst_rel = svn_url_is_child(top_url, pair->dst_abspath_or_url, pool);
- if (dst_rel)
- dst_rel = svn_path_uri_decode(dst_rel, pool);
- else
+ if (! dst_rel)
dst_rel = "";
SVN_ERR(svn_ra_check_path(ra_session, dst_rel, youngest,
&dst_kind, pool));
@@ -1240,10 +1236,9 @@ wc_to_repos_copy(const apr_array_header_
APR_ARRAY_IDX(copy_pairs, i, svn_client__copy_pair_t *);
svn_pool_clear(iterpool);
- dst_rel = svn_path_uri_decode(svn_url_is_child(top_dst_url,
- pair->dst_abspath_or_url,
- iterpool),
- iterpool);
+ dst_rel = svn_url_is_child(top_dst_url,
+ pair->dst_abspath_or_url,
+ iterpool);
SVN_ERR(svn_ra_check_path(ra_session, dst_rel, SVN_INVALID_REVNUM,
&dst_kind, iterpool));
if (dst_kind != svn_node_none)
Modified: subversion/branches/uris-as-urls/subversion/libsvn_client/info.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_client/info.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_client/info.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_client/info.c Thu Jan 27
17:05:58 2011
@@ -34,6 +34,7 @@
#include "svn_wc.h"
#include "svn_private_config.h"
+#include "private/svn_fspath.h"
#include "private/svn_wc_private.h"
@@ -289,11 +290,9 @@ push_dir_info(svn_ra_session_t *ra_sessi
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
path = svn_relpath_join(dir, name, subpool);
- URL = svn_path_url_add_component2(session_URL, name, subpool);
-
- fs_path = svn_url_is_child(repos_root, URL, subpool);
- fs_path = apr_pstrcat(subpool, "/", fs_path, (char *)NULL);
- fs_path = svn_path_uri_decode(fs_path, subpool);
+ URL = svn_path_url_add_component2(session_URL, name, subpool);
+ fs_path = svn_fspath__canonicalize(svn_url_is_child(repos_root, URL,
+ subpool), subpool);
lock = apr_hash_get(locks, fs_path, APR_HASH_KEY_STRING);
Modified: subversion/branches/uris-as-urls/subversion/libsvn_client/util.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_client/util.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_client/util.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_client/util.c Thu Jan 27
17:05:58 2011
@@ -36,6 +36,7 @@
#include "private/svn_client_private.h"
#include "private/svn_wc_private.h"
+#include "private/svn_fspath.h"
#include "client.h"
@@ -217,10 +218,10 @@ svn_client__path_relative_to_root(const
"root URL '%s'"),
abspath_or_url, repos_root);
}
- rel_url = svn_path_uri_decode(rel_url, result_pool);
- *rel_path = include_leading_slash
- ? apr_pstrcat(result_pool, "/", rel_url, NULL)
- : rel_url;
+ if (include_leading_slash)
+ *rel_path = svn_fspath__canonicalize(rel_url, result_pool);
+ else
+ *rel_path = apr_pstrdup(result_pool, rel_url);
}
return SVN_NO_ERROR;
Modified: subversion/branches/uris-as-urls/subversion/libsvn_ra/compat.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_ra/compat.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_ra/compat.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_ra/compat.c Thu Jan 27
17:05:58 2011
@@ -33,6 +33,7 @@
#include "svn_compat.h"
#include "svn_props.h"
+#include "private/svn_fspath.h"
#include "ra_loader.h"
#include "svn_private_config.h"
@@ -673,16 +674,11 @@ svn_ra__file_revs_from_log(svn_ra_sessio
SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_url, pool));
SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, pool));
- /* Create the initial path, using the repos_url and session_url */
- tmp = svn_url_is_child(repos_url, session_url, pool);
- repos_abs_path = apr_palloc(pool, strlen(tmp) + 1);
- repos_abs_path[0] = '/';
- memcpy(repos_abs_path + 1, tmp, strlen(tmp));
-
condensed_targets = apr_array_make(pool, 1, sizeof(const char *));
APR_ARRAY_PUSH(condensed_targets, const char *) = path;
- lmb.path = svn_path_uri_decode(repos_abs_path, pool);
+ lmb.path = svn_fspath__canonicalize(svn_url_is_child(repos_url, session_url,
+ pool), pool);
lmb.eldest = NULL;
lmb.pool = pool;
Modified: subversion/branches/uris-as-urls/subversion/libsvn_ra/ra_loader.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_ra/ra_loader.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_ra/ra_loader.c Thu Jan
27 17:05:58 2011
@@ -580,7 +580,6 @@ svn_error_t *svn_ra_get_path_relative_to
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
_("'%s' isn't a child of session URL '%s'"),
url, sess_url);
- *rel_path = svn_path_uri_decode(*rel_path, pool);
}
return SVN_NO_ERROR;
}
@@ -604,7 +603,6 @@ svn_error_t *svn_ra_get_path_relative_to
_("'%s' isn't a child of repository root "
"URL '%s'"),
url, root_url);
- *rel_path = svn_path_uri_decode(*rel_path, pool);
}
return SVN_NO_ERROR;
Modified:
subversion/branches/uris-as-urls/subversion/libsvn_ra_local/ra_plugin.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_ra_local/ra_plugin.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_ra_local/ra_plugin.c
(original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_ra_local/ra_plugin.c Thu
Jan 27 17:05:58 2011
@@ -509,9 +509,8 @@ svn_ra_local__reparent(svn_ra_session_t
/* Update our FS_PATH sess member to point to our new
relative-URL-turned-absolute-filesystem-path. */
- relpath = apr_pstrcat(pool, "/", svn_path_uri_decode(relpath, pool),
- (char *)NULL);
- svn_stringbuf_set(sess->fs_path, relpath);
+ svn_stringbuf_set(sess->fs_path,
+ svn_fspath__canonicalize(relpath, pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_ra_neon/session.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_ra_neon/session.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_ra_neon/session.c
(original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_ra_neon/session.c Thu
Jan 27 17:05:58 2011
@@ -1155,7 +1155,6 @@ svn_ra_neon__get_path_relative_to_root(s
_("'%s' isn't a child of repository root "
"URL '%s'"),
url, root_url);
- *rel_path = svn_path_uri_decode(*rel_path, pool);
}
return SVN_NO_ERROR;
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_ra_svn/client.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_ra_svn/client.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_ra_svn/client.c
(original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_ra_svn/client.c Thu Jan
27 17:05:58 2011
@@ -2282,7 +2282,6 @@ static svn_error_t *path_relative_to_roo
_("'%s' isn't a child of repository root "
"URL '%s'"),
url, root_url);
- *rel_path = svn_path_uri_decode(*rel_path, pool);
}
return SVN_NO_ERROR;
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
(original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c Thu
Jan 27 17:05:58 2011
@@ -1476,8 +1476,8 @@ svn_url_is_child(const char *parent_uri,
assert(svn_url_is_canonical(child_uri, NULL));
relpath = is_child(type_uri, parent_uri, child_uri, pool);
-
- /* ### TODO: URI decode a non-NULL relpath? */
+ if (relpath)
+ relpath = svn_path_uri_decode(relpath, pool);
return relpath;
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_files.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_files.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_files.c Thu Jan
27 17:05:58 2011
@@ -607,8 +607,6 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
repos_relpath = svn_url_is_child(repos_root_url, url, scratch_pool);
if (repos_relpath == NULL)
repos_relpath = "";
- else
- repos_relpath = svn_path_uri_decode(repos_relpath, scratch_pool);
/* Early out: we know we're not dealing with an existing wc, so
just create one. */
Modified: subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_ops.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_ops.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_wc/adm_ops.c Thu Jan 27
17:05:58 2011
@@ -2149,7 +2149,8 @@ svn_wc__set_file_external_location(svn_w
if (url)
{
- external_repos_relpath = svn_url_is_child(repos_root_url, url, NULL);
+ external_repos_relpath = svn_url_is_child(repos_root_url, url,
+ scratch_pool);
if (external_repos_relpath == NULL)
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -2157,9 +2158,6 @@ svn_wc__set_file_external_location(svn_w
" is not a file in repository '%s'."),
url, repos_root_url);
- external_repos_relpath = svn_path_uri_decode(external_repos_relpath,
- scratch_pool);
-
SVN_ERR_ASSERT(peg_rev != NULL);
SVN_ERR_ASSERT(rev != NULL);
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_wc/entries.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_wc/entries.c Thu Jan 27
17:05:58 2011
@@ -1735,19 +1735,16 @@ write_entry(struct write_baton **entry_n
{
if (entry->copyfrom_url)
{
- const char *relative_url;
+ const char *relpath;
working_node->copyfrom_repos_id = repos_id;
- relative_url = svn_url_is_child(this_dir->repos, entry->copyfrom_url,
- NULL);
- if (relative_url == NULL)
+ relpath = svn_url_is_child(this_dir->repos,
+ entry->copyfrom_url,
+ result_pool);
+ if (relpath == NULL)
working_node->copyfrom_repos_path = "";
else
- {
- /* copyfrom_repos_path is NOT a URI. decode into repos path. */
- working_node->copyfrom_repos_path =
- svn_path_uri_decode(relative_url, result_pool);
- }
+ working_node->copyfrom_repos_path = relpath;
working_node->copyfrom_revnum = entry->copyfrom_rev;
working_node->op_depth
= svn_wc__db_op_depth_for_upgrade(local_relpath);
@@ -1894,31 +1891,23 @@ write_entry(struct write_baton **entry_n
{
base_node->repos_id = repos_id;
- /* repos_relpath is NOT a URI. decode as appropriate. */
if (entry->url != NULL)
{
- const char *relative_url = svn_url_is_child(this_dir->repos,
- entry->url,
- scratch_pool);
-
- if (relative_url == NULL)
- base_node->repos_relpath = "";
- else
- base_node->repos_relpath = svn_path_uri_decode(relative_url,
- result_pool);
+ const char *relpath = svn_url_is_child(this_dir->repos,
+ entry->url,
+ result_pool);
+ base_node->repos_relpath = relpath ? relpath : "";
}
else
{
- const char *base_path = svn_url_is_child(this_dir->repos,
- this_dir->url,
- scratch_pool);
- if (base_path == NULL)
+ const char *relpath = svn_url_is_child(this_dir->repos,
+ this_dir->url,
+ scratch_pool);
+ if (relpath == NULL)
base_node->repos_relpath = entry->name;
else
base_node->repos_relpath =
- svn_dirent_join(svn_path_uri_decode(base_path, scratch_pool),
- entry->name,
- result_pool);
+ svn_dirent_join(relpath, entry->name, result_pool);
}
}
Modified: subversion/branches/uris-as-urls/subversion/libsvn_wc/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_wc/upgrade.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_wc/upgrade.c Thu Jan 27
17:05:58 2011
@@ -581,7 +581,8 @@ ensure_repos_info(svn_wc_entry_t *entry,
for (hi = apr_hash_first(scratch_pool, repos_cache);
hi; hi = apr_hash_next(hi))
{
- if (svn_url_is_child(svn__apr_hash_index_key(hi), entry->url, NULL))
+ if (svn_url_is_child(svn__apr_hash_index_key(hi), entry->url,
+ scratch_pool))
{
if (!entry->repos)
entry->repos = svn__apr_hash_index_key(hi);
Modified:
subversion/branches/uris-as-urls/subversion/tests/libsvn_subr/dirent_uri-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
---
subversion/branches/uris-as-urls/subversion/tests/libsvn_subr/dirent_uri-test.c
(original)
+++
subversion/branches/uris-as-urls/subversion/tests/libsvn_subr/dirent_uri-test.c
Thu Jan 27 17:05:58 2011
@@ -1958,21 +1958,23 @@ test_uri_is_child(apr_pool_t *pool)
static const char * const paths[] = {
"http://foo/bar",
+ "http://foo/bar%20bell",
"http://foo/baz",
"http://foo",
"http://f",
"file://foo/bar",
- "file://foo/bar/baz",
+ "file://foo/bar/baz%20bol",
};
static const char * const
remainders[COUNT_OF(paths)][COUNT_OF(paths)] = {
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 },
- { "bar", "baz", 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, "baz" },
- { 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { "bar", "bar bell", "baz", 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, "baz bol" },
+ { 0, 0, 0, 0, 0, 0, 0 },
};
for (i = 0; i < COUNT_OF(paths); i++)
Modified: subversion/branches/uris-as-urls/tools/client-side/svnmucc/svnmucc.c
URL:
http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/tools/client-side/svnmucc/svnmucc.c?rev=1064200&r1=1064199&r2=1064200&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/tools/client-side/svnmucc/svnmucc.c
(original)
+++ subversion/branches/uris-as-urls/tools/client-side/svnmucc/svnmucc.c Thu
Jan 27 17:05:58 2011
@@ -365,7 +365,7 @@ subtract_anchor(const char *anchor, cons
if (! strcmp(url, anchor))
return "";
else
- return svn_path_uri_decode(svn_url_is_child(anchor, url, pool), pool);
+ return svn_url_is_child(anchor, url, pool);
}
/* Add PATH to the operations tree rooted at OPERATION, creating any