You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/11/14 12:51:05 UTC
svn commit: r1409172 - /subversion/trunk/subversion/libsvn_client/add.c
Author: rhuijben
Date: Wed Nov 14 11:51:04 2012
New Revision: 1409172
URL: http://svn.apache.org/viewvc?rev=1409172&view=rev
Log:
* subversion/libsvn_client/add.c
(add_file): Compose revert error instead of clearing it.
(svn_client__get_all_auto_props): Use iterpool through the entire function
instead of just created and destroyed in an outer loop.
Use do { } while () to avoid several compiler warnings.
Modified:
subversion/trunk/subversion/libsvn_client/add.c
Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=1409172&r1=1409171&r2=1409172&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Wed Nov 14 11:51:04 2012
@@ -348,14 +348,15 @@ add_file(const char *local_abspath,
{
/* Don't leave the job half-done. If we fail to set a property,
* (try to) un-add the file. */
- svn_error_clear(svn_wc_revert4(ctx->wc_ctx,
+ return svn_error_compose_create(
+ err,
+ svn_wc_revert4(ctx->wc_ctx,
local_abspath,
svn_depth_empty,
FALSE /* use_commit_times */,
NULL /* changelists */,
NULL, NULL, NULL, NULL,
pool));
- return svn_error_trace(err);
}
}
}
@@ -701,6 +702,7 @@ svn_client__get_all_auto_props(apr_hash_
svn_boolean_t use_autoprops;
collect_auto_props_baton_t autoprops_baton;
svn_error_t *err = NULL;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
svn_boolean_t target_is_url = svn_path_is_url(path_or_url);
svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
SVN_CONFIG_CATEGORY_CONFIG,
@@ -708,6 +710,7 @@ svn_client__get_all_auto_props(apr_hash_
*autoprops = apr_hash_make(result_pool);
autoprops_baton.result_pool = result_pool;
autoprops_baton.autoprops = *autoprops;
+
/* Are "traditional" auto-props enabled? If so grab them from the
config. This is our starting set auto-props, which may be overriden
@@ -729,12 +732,12 @@ svn_client__get_all_auto_props(apr_hash_
/* If PATH_OR_URL is a WC path, then it might be unversioned, in which case
we find it's nearest versioned parent. */
- while (err == NULL)
+ do
{
err = svn_client_propget5(&props, &inherited_config_auto_props,
SVN_PROP_INHERITABLE_AUTO_PROPS, path_or_url,
&rev, &rev, NULL, svn_depth_empty, NULL, ctx,
- scratch_pool, scratch_pool);
+ scratch_pool, iterpool);
if (err)
{
if (target_is_url || err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE)
@@ -750,6 +753,7 @@ svn_client__get_all_auto_props(apr_hash_
break;
}
}
+ while (err == NULL);
/* Stash any explicit PROPS for PARENT_PATH into the inherited props array,
since these are actually inherited props for LOCAL_ABSPATH. */
@@ -774,7 +778,6 @@ svn_client__get_all_auto_props(apr_hash_
apr_hash_index_t *hi;
svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
inherited_config_auto_props, i, svn_prop_inherited_item_t *);
- apr_pool_t *iterpool = svn_pool_create(scratch_pool);
for (hi = apr_hash_first(scratch_pool, elt->prop_hash);
hi;
@@ -828,9 +831,11 @@ svn_client__get_all_auto_props(apr_hash_
if (*ch == '\n')
ch++;
}
- svn_pool_destroy(iterpool);
}
}
+
+ svn_pool_destroy(iterpool);
+
return SVN_NO_ERROR;
}