Author: rhuijben
Date: Fri May 13 10:56:29 2011
New Revision: 1102662
URL: http://svn.apache.org/viewvc?rev=1102662&view=rev
Log:
Remove the unused pool argument from svn_relpath_is_canonical(). I can't
think of a reason why we are ever going to use that later with our
current definition of what is and isn't a valid relpath.
No functional changes.
* subversion/include/svn_dirent_uri.h
(svn_relpath_is_canonical): Remove argument.
* subversion/libsvn_subr/deprecated.c
* subversion/libsvn_subr/dirent_uri.c
* subversion/libsvn_subr/mergeinfo.c
* subversion/libsvn_wc/old-and-busted.c
* subversion/libsvn_wc/relocate.c
* subversion/libsvn_wc/util.c
* subversion/libsvn_wc/wc_db.c
* subversion/mod_dav_svn/util.c
* subversion/tests/libsvn_subr/dirent_uri-test.c
(*): Update callers.
Modified:
subversion/trunk/subversion/include/svn_dirent_uri.h
subversion/trunk/subversion/libsvn_subr/deprecated.c
subversion/trunk/subversion/libsvn_subr/dirent_uri.c
subversion/trunk/subversion/libsvn_subr/mergeinfo.c
subversion/trunk/subversion/libsvn_wc/old-and-busted.c
subversion/trunk/subversion/libsvn_wc/relocate.c
subversion/trunk/subversion/libsvn_wc/util.c
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/mod_dav_svn/util.c
subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
Modified: subversion/trunk/subversion/include/svn_dirent_uri.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_dirent_uri.h?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_dirent_uri.h (original)
+++ subversion/trunk/subversion/include/svn_dirent_uri.h Fri May 13 10:56:29
2011
@@ -494,14 +494,12 @@ svn_boolean_t
svn_dirent_is_canonical(const char *dirent,
apr_pool_t *pool);
-/** Return @c TRUE iff @a relpath is canonical. Use @a scratch_pool for
- * temporary allocations.
+/** Return @c TRUE iff @a relpath is canonical.
*
* @since New in 1.7.
*/
svn_boolean_t
-svn_relpath_is_canonical(const char *relpath,
- apr_pool_t *scratch_pool);
+svn_relpath_is_canonical(const char *relpath);
/** Return @c TRUE iff @a uri is canonical. Use @a pool for temporary
* allocations.
Modified: subversion/trunk/subversion/libsvn_subr/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/deprecated.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_subr/deprecated.c Fri May 13 10:56:29
2011
@@ -1040,7 +1040,7 @@ svn_path_is_canonical(const char *path,
{
return svn_uri_is_canonical(path, pool) ||
svn_dirent_is_canonical(path, pool) ||
- svn_relpath_is_canonical(path, pool);
+ svn_relpath_is_canonical(path);
}
Modified: subversion/trunk/subversion/libsvn_subr/dirent_uri.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dirent_uri.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Fri May 13 10:56:29
2011
@@ -1748,8 +1748,7 @@ relpath_is_canonical(const char *relpath
}
svn_boolean_t
-svn_relpath_is_canonical(const char *relpath,
- apr_pool_t *pool)
+svn_relpath_is_canonical(const char *relpath)
{
return relpath_is_canonical(relpath);
}
@@ -2452,7 +2451,7 @@ svn_fspath__is_child(const char *parent_
result = svn_relpath_is_child(parent_fspath + 1, child_fspath + 1, pool);
- assert(result == NULL || svn_relpath_is_canonical(result, pool));
+ assert(result == NULL || svn_relpath_is_canonical(result));
return result;
}
@@ -2469,7 +2468,7 @@ svn_fspath__skip_ancestor(const char *pa
else
result = child_fspath;
- assert(svn_relpath_is_canonical(result, NULL)
+ assert(svn_relpath_is_canonical(result)
|| strcmp(result, child_fspath) == 0);
return result;
}
@@ -2534,7 +2533,7 @@ svn_fspath__join(const char *fspath,
{
char *result;
assert(svn_fspath__is_canonical(fspath));
- assert(svn_relpath_is_canonical(relpath, result_pool));
+ assert(svn_relpath_is_canonical(relpath));
if (relpath[0] == '\0')
result = apr_pstrdup(result_pool, fspath);
Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Fri May 13 10:56:29 2011
@@ -1819,8 +1819,7 @@ svn_mergeinfo__add_suffix_to_mergeinfo(s
{
apr_hash_index_t *hi;
- SVN_ERR_ASSERT(suffix_relpath && svn_relpath_is_canonical(suffix_relpath,
- scratch_pool));
+ SVN_ERR_ASSERT(suffix_relpath && svn_relpath_is_canonical(suffix_relpath));
*out_mergeinfo = apr_hash_make(result_pool);
Modified: subversion/trunk/subversion/libsvn_wc/old-and-busted.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/old-and-busted.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/trunk/subversion/libsvn_wc/old-and-busted.c Fri May 13 10:56:29
2011
@@ -197,7 +197,7 @@ read_path(const char **result,
apr_pool_t *pool)
{
SVN_ERR(read_str(result, buf, end, pool));
- if (*result && **result && !svn_relpath_is_canonical(*result, pool))
+ if (*result && **result && !svn_relpath_is_canonical(*result))
return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
_("Entry contains non-canonical path '%s'"),
*result);
Modified: subversion/trunk/subversion/libsvn_wc/relocate.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/relocate.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/relocate.c (original)
+++ subversion/trunk/subversion/libsvn_wc/relocate.c Fri May 13 10:56:29 2011
@@ -50,7 +50,7 @@ url_remove_final_relpath(const char *url
const char *relpath_end;
SVN_ERR_ASSERT_NO_RETURN(svn_path_is_url(url));
- SVN_ERR_ASSERT_NO_RETURN(svn_relpath_is_canonical(relpath, scratch_pool));
+ SVN_ERR_ASSERT_NO_RETURN(svn_relpath_is_canonical(relpath));
if (relpath[0] == 0)
return result;
Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Fri May 13 10:56:29 2011
@@ -356,7 +356,7 @@ svn_wc_conflict_version_create(const cha
version = apr_pcalloc(pool, sizeof(*version));
SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_canonical(repos_url, pool) &&
- svn_relpath_is_canonical(path_in_repos, pool) &&
+ svn_relpath_is_canonical(path_in_repos) &&
SVN_IS_VALID_REVNUM(peg_rev));
version->repos_url = repos_url;
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 13 10:56:29 2011
@@ -1447,7 +1447,7 @@ svn_wc__db_from_relpath(const char **loc
svn_wc__db_wcroot_t *wcroot;
const char *unused_relpath;
#if 0
- SVN_ERR_ASSERT(svn_relpath_is_canonical(local_relpath, scratch_pool));
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(local_relpath));
#endif
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &unused_relpath, db,
@@ -8645,7 +8645,7 @@ svn_wc__db_global_update(svn_wc__db_t *d
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
/* ### allow NULL for NEW_REPOS_RELPATH to indicate "no change"? */
- SVN_ERR_ASSERT(svn_relpath_is_canonical(new_repos_relpath, scratch_pool));
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(new_repos_relpath));
SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(new_revision));
SVN_ERR_ASSERT(new_props != NULL);
SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(new_changed_rev));
@@ -11062,7 +11062,7 @@ svn_wc__db_temp_op_start_directory_updat
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(new_rev));
- SVN_ERR_ASSERT(svn_relpath_is_canonical(new_repos_relpath, scratch_pool));
+ SVN_ERR_ASSERT(svn_relpath_is_canonical(new_repos_relpath));
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
local_abspath, scratch_pool, scratch_pool));
Modified: subversion/trunk/subversion/mod_dav_svn/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/util.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/util.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/util.c Fri May 13 10:56:29 2011
@@ -496,7 +496,7 @@ dav_svn__test_canonical(const char *path
return NULL;
if ((path[0] == '/') && svn_fspath__is_canonical(path))
return NULL;
- if (svn_relpath_is_canonical(path, pool))
+ if (svn_relpath_is_canonical(path))
return NULL;
/* Otherwise, generate a generic HTTP_BAD_REQUEST error. */
Modified: subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1102662&r1=1102661&r2=1102662&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Fri May 13
10:56:29 2011
@@ -1042,7 +1042,7 @@ test_relpath_is_canonical(apr_pool_t *po
svn_boolean_t canonical;
const char* canonicalized;
- canonical = svn_relpath_is_canonical(tests[i].path, pool);
+ canonical = svn_relpath_is_canonical(tests[i].path);
if (tests[i].canonical != canonical)
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"svn_relpath_is_canonical(\"%s\") returned "