You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/03/17 16:56:53 UTC
svn commit: r1082541 - in /subversion/trunk/subversion: include/
include/private/ libsvn_client/ libsvn_ra_neon/ libsvn_wc/
Author: julianfoad
Date: Thu Mar 17 15:56:53 2011
New Revision: 1082541
URL: http://svn.apache.org/viewvc?rev=1082541&view=rev
Log:
Fix pool usage bugs and inconsistencies involving result_pool and
scratch_pool being swapped.
* subversion/include/private/svn_wc_private.h,
subversion/libsvn_wc/node.c
(svn_wc__node_get_working_rev_info): Put result_pool before scratch_pool.
This causes the only caller, subversion/svn/status-cmd.c:print_status(),
to get the results in result_pool rather than scratch_pool.
* subversion/include/svn_wc.h,
subversion/libsvn_wc/update_editor.c
(svn_wc_get_wc_root): Put the results into result_pool rather than
scratch_pool. Put result_pool before scratch_pool. The callers need no
adjustment as the only caller passes the same pool for both parameters.
* subversion/libsvn_client/client.h,
subversion/libsvn_client/externals.c
(svn_client__crawl_for_externals): Put result_pool before scratch_pool.
The callers need no adjustment as they all pass the same pool for both
parameters.
* subversion/libsvn_client/patch.c
(read_line): Same.
* subversion/libsvn_wc/relocate.c
(url_remove_final_relpath): Same.
* subversion/libsvn_client/locking_commands.c
(condense_targets): Put result_pool before scratch_pool.
(organize_lock_targets): Adjust calls accordingly.
* subversion/libsvn_ra_neon/ra_neon.h
(svn_ra_neon__request_get_location): Remove this unused prototype.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_client/client.h
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/libsvn_client/locking_commands.c
subversion/trunk/subversion/libsvn_client/patch.c
subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
subversion/trunk/subversion/libsvn_wc/node.c
subversion/trunk/subversion/libsvn_wc/relocate.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Mar 17 15:56:53 2011
@@ -517,8 +517,8 @@ svn_wc__node_get_working_rev_info(svn_re
const char **changed_author,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/** This whole function is for legacy, and it sucks. It does not really
Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Thu Mar 17 15:56:53 2011
@@ -5166,8 +5166,8 @@ svn_error_t *
svn_wc_get_wc_root(const char **wcroot_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/** @} */
Modified: subversion/trunk/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Thu Mar 17 15:56:53 2011
@@ -1005,8 +1005,8 @@ svn_client__crawl_for_externals(apr_hash
const char *local_abspath,
svn_depth_t depth,
svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Helper function to fix issue #2267,
* "support svn:externals on locally added directories".
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Thu Mar 17 15:56:53 2011
@@ -1423,8 +1423,8 @@ svn_client__crawl_for_externals(apr_hash
const char *local_abspath,
svn_depth_t depth,
svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
apr_hash_t *externals_hash = apr_hash_make(result_pool);
Modified: subversion/trunk/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/locking_commands.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/locking_commands.c Thu Mar 17 15:56:53 2011
@@ -152,8 +152,8 @@ condense_targets(const char **common_par
const apr_array_header_t *targets,
svn_boolean_t targets_are_uris,
svn_boolean_t remove_redundancies,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
if (targets_are_uris)
{
@@ -252,7 +252,7 @@ organize_lock_targets(const char **commo
/* Get the common parent URL and a bunch of relpaths, one per target. */
SVN_ERR(condense_targets(&common_url, &rel_targets, targets,
- TRUE, TRUE, scratch_pool, result_pool));
+ TRUE, TRUE, result_pool, scratch_pool));
if (! (common_url && *common_url))
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("No common parent found, unable to operate "
@@ -278,7 +278,7 @@ organize_lock_targets(const char **commo
/* Get the common parent dirent and a bunch of relpaths, one per
target. */
SVN_ERR(condense_targets(&common_dirent, &rel_targets, targets,
- FALSE, TRUE, scratch_pool, result_pool));
+ FALSE, TRUE, result_pool, scratch_pool));
if (! (common_dirent && *common_dirent))
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("No common parent found, unable to operate "
@@ -311,7 +311,7 @@ organize_lock_targets(const char **commo
condense those into a single common parent URL and a bunch of
paths relative to that. */
SVN_ERR(condense_targets(&common_url, &rel_urls, target_urls,
- TRUE, FALSE, scratch_pool, result_pool));
+ TRUE, FALSE, result_pool, scratch_pool));
if (! (common_url && *common_url))
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Unable to lock/unlock across multiple "
Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Thu Mar 17 15:56:53 2011
@@ -740,8 +740,8 @@ init_patch_target(patch_target_t **patch
static svn_error_t *
read_line(target_content_info_t *content_info,
const char **line,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_stringbuf_t *line_raw;
const char *eol_str;
Modified: subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/ra_neon.h Thu Mar 17 15:56:53 2011
@@ -1013,16 +1013,6 @@ const char *
svn_ra_neon__request_get_location(svn_ra_neon__request_t *request,
apr_pool_t *pool);
-/* Canonicalize an absolute URI, in the general sense. URI might be a
- * full, absolute, schema-ful URL. It might be just the path portion
- * of a URL. Whatever the case, it is a URI-encoded identifier of
- * *some sort*, as will be the returned form thereof.
- */
-const char *
-svn_ra_neon__uri_canonicalize(const char *uri,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool);
-
/*
* Implements the get_locations RA layer function. */
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Mar 17 15:56:53 2011
@@ -956,8 +956,8 @@ svn_wc__node_get_working_rev_info(svn_re
const char **changed_author,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
svn_boolean_t have_base;
Modified: subversion/trunk/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/relocate.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/relocate.c (original)
+++ subversion/trunk/subversion/libsvn_wc/relocate.c Thu Mar 17 15:56:53 2011
@@ -42,8 +42,8 @@
static const char *
url_remove_final_relpath(const char *url,
const char *relpath,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
char *result = apr_pstrdup(result_pool, url);
char *result_end;
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1082541&r1=1082540&r2=1082541&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Mar 17 15:56:53 2011
@@ -1117,8 +1117,8 @@ accumulate_last_change(svn_revnum_t *cha
apr_time_t *changed_date,
const char **changed_author,
const apr_array_header_t *entry_props,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
int i;
@@ -5023,11 +5023,11 @@ svn_error_t *
svn_wc_get_wc_root(const char **wcroot_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
- apr_pool_t *scratch_pool,
- apr_pool_t *result_pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
return svn_wc__db_get_wcroot(wcroot_abspath, wc_ctx->db,
- local_abspath, scratch_pool, result_pool);
+ local_abspath, result_pool, scratch_pool);
}