Author: julianfoad
Date: Thu Dec 6 14:58:31 2012
New Revision: 1417926
URL: http://svn.apache.org/viewvc?rev=1417926&view=rev
Log:
Remove the 'base_merge' parameter from svn_wc__merge_props(), instead
doing a 'base merge' iff the 'new_pristine_props' output parameter is given,
for simplicity.
Also stop altering the 'pristine_props' input hash. No current callers were
affected by that, but by golly it's impolite. We are still altering the
'actual_props' input hash; I'll deal with that later.
* subversion/libsvn_wc/props.h
(svn_wc__merge_props): Remove the 'base_merge' parameter and update the
doc string accordingly.
(svn_wc__perform_props_merge): Update doc string to explain its
'base_merge' parameter, since there is no longer an equivalent
documentation under svn_wc__merge_props().
* subversion/libsvn_wc/props.c
(svn_wc__perform_props_merge): Track the change.
(svn_wc__merge_props): Remove the 'base_merge' parameter and change how
the 'new_pristine_props' output parameter works. No longer alter the
'pristine_props' input hash.
* subversion/libsvn_wc/externals.c
(close_file): Track the change.
* subversion/libsvn_wc/merge.c
(svn_wc_merge5): Track the change.
* subversion/libsvn_wc/update_editor.c
(close_directory, close_file): Track the change.
Modified:
subversion/trunk/subversion/libsvn_wc/externals.c
subversion/trunk/subversion/libsvn_wc/merge.c
subversion/trunk/subversion/libsvn_wc/props.c
subversion/trunk/subversion/libsvn_wc/props.h
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1417926&r1=1417925&r2=1417926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Thu Dec 6 14:58:31 2012
@@ -742,7 +742,6 @@ close_file(void *file_baton,
base_props,
actual_props,
regular_prop_changes,
- TRUE /* base_merge */,
FALSE /* dry_run */,
eb->cancel_func, eb->cancel_baton,
pool, pool));
Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1417926&r1=1417925&r2=1417926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Thu Dec 6 14:58:31 2012
@@ -1230,7 +1230,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
if (merge_props_outcome)
{
int i;
- apr_hash_t *new_pristine_props;
+
/* The PROPCHANGES may not have non-"normal" properties in it. If entry
or wc props were allowed, then the following code would install them
into the BASE and/or WORKING properties(!). */
@@ -1249,10 +1249,10 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
SVN_ERR(svn_wc__merge_props(&conflict_skel,
merge_props_outcome,
- &new_pristine_props, &new_actual_props,
+ NULL, &new_actual_props,
wc_ctx->db, target_abspath,
original_props, pristine_props, actual_props,
- prop_diff, FALSE /* base_merge */,
+ prop_diff,
dry_run,
cancel_func, cancel_baton,
scratch_pool, scratch_pool));
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1417926&r1=1417925&r2=1417926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu Dec 6 14:58:31 2012
@@ -294,12 +294,13 @@ svn_wc__perform_props_merge(svn_wc_notif
/* Note that while this routine does the "real" work, it's only
prepping tempfiles and writing log commands. */
SVN_ERR(svn_wc__merge_props(&conflict_skel, state,
- &new_pristine_props, &new_actual_props,
+ base_merge ? &new_pristine_props : NULL,
+ &new_actual_props,
db, local_abspath,
baseprops /* server_baseprops */,
pristine_props,
actual_props,
- propchanges, base_merge, dry_run,
+ propchanges, dry_run,
cancel_func, cancel_baton,
scratch_pool, scratch_pool));
@@ -1185,7 +1186,6 @@ svn_wc__merge_props(svn_skel_t **conflic
apr_hash_t *pristine_props,
apr_hash_t *actual_props,
const apr_array_header_t *propchanges,
- svn_boolean_t base_merge,
svn_boolean_t dry_run,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -1205,7 +1205,8 @@ svn_wc__merge_props(svn_skel_t **conflic
necessary */
old_actual_props = apr_hash_copy(scratch_pool, actual_props);
- *new_pristine_props = NULL;
+ if (new_pristine_props)
+ *new_pristine_props = apr_hash_copy(result_pool, pristine_props);
*new_actual_props = NULL;
if (!server_baseprops)
@@ -1248,8 +1249,9 @@ svn_wc__merge_props(svn_skel_t **conflic
base_val = apr_hash_get(pristine_props, propname, APR_HASH_KEY_STRING);
- if (base_merge)
- apr_hash_set(pristine_props, propname, APR_HASH_KEY_STRING, to_val);
+ if (new_pristine_props)
+ apr_hash_set(*new_pristine_props, propname, APR_HASH_KEY_STRING,
+ to_val);
apr_hash_set(their_props, propname, APR_HASH_KEY_STRING, to_val);
@@ -1305,7 +1307,6 @@ svn_wc__merge_props(svn_skel_t **conflic
if (dry_run)
return SVN_NO_ERROR;
- *new_pristine_props = pristine_props;
*new_actual_props = actual_props;
if (conflict_props != NULL)
Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=1417926&r1=1417925&r2=1417926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Thu Dec 6 14:58:31 2012
@@ -79,14 +79,12 @@ svn_wc__internal_propget(const svn_strin
If SERVER_BASEPROPS is NULL then use the pristine props as PROPCHANGES
base.
- If BASE_MERGE is FALSE then only change working properties; if TRUE,
- change both the pristine and working properties. (Only the update editor
- should use BASE_MERGE is TRUE)
-
TODO ### DRY_RUN ...
- Return the new set of actual properties in *NEW_ACTUAL_PROPS, and the
- new set of pristine properties in NEW_PRISTINE_PROPS.
+ Return the new set of actual properties in *NEW_ACTUAL_PROPS. If
+ NEW_PRISTINE_PROPS is non-null, then also apply PROPCHANGES to
+ PRISTINE_PROPS and return the new set of pristine properties in
+ *NEW_PRISTINE_PROPS.
Return any conflicts of the actual props in *CONFLICT_SKEL. (Changes
made to the pristine properties, if BASE_MERGE is TRUE, do not
@@ -105,7 +103,6 @@ svn_wc__merge_props(svn_skel_t **conflic
apr_hash_t *pristine_props,
apr_hash_t *actual_props,
const apr_array_header_t *propchanges,
- svn_boolean_t base_merge,
svn_boolean_t dry_run,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -142,7 +139,13 @@ svn_wc__create_prejfile(const char **tmp
apr_pool_t *scratch_pool);
-/* Just like svn_wc_merge_props3(), but WITH a BASE_MERGE parameter. */
+/* Just like svn_wc_merge_props3(), but WITH a BASE_MERGE parameter.
+
+ If SVN__SUPPORT_BASE_MERGE is defined and BASE_MERGE is true, then
+ also use PROPCHANGES to modify the node's pristine properties. (That
+ cannot generate conficts.) If SVN__SUPPORT_BASE_MERGE is not defined
+ and BASE_MERGE is true, throw an error.
+ */
svn_error_t *
svn_wc__perform_props_merge(svn_wc_notify_state_t *state,
svn_wc__db_t *db,
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1417926&r1=1417925&r2=1417926&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Dec 6 14:58:31
2012
@@ -2493,7 +2493,6 @@ close_directory(void *dir_baton,
base_props,
actual_props,
regular_prop_changes,
- TRUE /* base_merge */,
FALSE /* dry_run */,
eb->cancel_func,
eb->cancel_baton,
@@ -4107,7 +4106,6 @@ close_file(void *file_baton,
current_base_props,
current_actual_props,
regular_prop_changes, /* propchanges */
- TRUE /* base_merge */,
FALSE /* dry_run */,
eb->cancel_func, eb->cancel_baton,
scratch_pool,
@@ -4241,7 +4239,6 @@ close_file(void *file_baton,
current_base_props /* pristine_props */,
fake_actual_props /* actual_props */,
regular_prop_changes, /* propchanges */
- TRUE /* base_merge */,
FALSE /* dry_run */,
eb->cancel_func, eb->cancel_baton,
scratch_pool,