Author: rhuijben
Date: Fri Apr 22 10:17:41 2011
New Revision: 1095914
URL: http://svn.apache.org/viewvc?rev=1095914&view=rev
Log:
Remove the direct workingqueue install from the property merge code, to allow
installing all the changes of an update at once.
* subversion/include/svn_wc.h
(svn_wc_merge_props3): Update documentation to reflect reality.
(svn_wc_merge_props2): Document the old error codes.
* subversion/libsvn_client/merge.c
(merge_props_changed): Update caller.
* subversion/libsvn_wc/deprecated.c
(svn_wc_merge_props2): Update error codes to their old documented values.
* subversion/libsvn_wc/props.c
(immediate_install_props): Remove unused function.
(svn_wc__perform_props_merge): Use one svn_wc__db_read_info() instead of a
few separate db calls. Install workqueue items and run queue only
if necessary.
(svn_wc__merge_props): Return work items instead of installing them. Create
skel in the result pool.
(svn_wc__internal_propset): Update caller.
* subversion/libsvn_wc/props.h
(svn_wc__merge_props): Rewrite comment.
* subversion/libsvn_wc/update_editor.c
(close_directory): Collect working items and store them when updating. Use
scratch_pool in more places.
(close_file): Collect working items from property merge and store them.
Don't overwrite the all_working_items list.
Modified:
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_wc/deprecated.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/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Fri Apr 22 10:17:41 2011
@@ -6471,7 +6471,10 @@ svn_wc_merge(const char *left,
* #SVN_ERR_CANCELLED), return that error immediately.
*
* If @a local_abspath is not under version control, return the error
- * #SVN_ERR_UNVERSIONED_RESOURCE and don't touch anyone's properties.
+ * #SVN_ERR_WC_PATH_NOT_FOUND and don't touch anyone's properties.
+ *
+ * If @a local_abspath has a status in which it doesn't have properties
+ * (E.g. deleted) return the error SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
*
* @since New in 1.7.
*/
@@ -6499,6 +6502,10 @@ svn_wc_merge_props3(svn_wc_notify_state_
* functionality is not supported on newer APIs -- pristine information
* should only be changed through an update editor drive.
*
+ * For compatibility reasons this function returns
+ * #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either
+ * #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
+ *
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri Apr 22 10:17:41 2011
@@ -1206,8 +1206,8 @@ merge_props_changed(const char *local_di
}
}
- if (err && (err->apr_err == SVN_ERR_ENTRY_NOT_FOUND
- || err->apr_err == SVN_ERR_UNVERSIONED_RESOURCE))
+ if (err && (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND
+ || err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS))
{
/* If the entry doesn't exist in the wc, this is a tree-conflict. */
if (state)
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Fri Apr 22 10:17:41 2011
@@ -2288,22 +2288,32 @@ svn_wc_merge_props2(svn_wc_notify_state_
apr_pool_t *scratch_pool)
{
const char *local_abspath;
+ svn_error_t *err;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
- return svn_error_return(svn_wc__perform_props_merge(
- state,
- svn_wc__adm_get_db(adm_access),
- local_abspath,
- NULL /* left_version */,
- NULL /* right_version */,
- baseprops,
- propchanges,
- base_merge,
- dry_run,
- conflict_func, conflict_baton,
- NULL, NULL,
- scratch_pool));
+ err = svn_wc__perform_props_merge(state,
+ svn_wc__adm_get_db(adm_access),
+ local_abspath,
+ NULL /* left_version */,
+ NULL /* right_version */,
+ baseprops,
+ propchanges,
+ base_merge,
+ dry_run,
+ conflict_func, conflict_baton,
+ NULL, NULL,
+ scratch_pool);
+
+ if (err)
+ switch(err->apr_err)
+ {
+ case SVN_ERR_WC_PATH_NOT_FOUND:
+ case SVN_ERR_WC_PATH_UNEXPECTED_STATUS:
+ err->apr_err = SVN_ERR_UNVERSIONED_RESOURCE;
+ break;
+ }
+ return svn_error_return(err);
}
svn_error_t *
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Fri Apr 22 10:17:41 2011
@@ -125,23 +125,6 @@ svn_wc__get_prejfile_abspath(const char
return SVN_NO_ERROR;
}
-/* */
-static svn_error_t *
-immediate_install_props(svn_wc__db_t *db,
- const char *local_abspath,
- apr_hash_t *working_props,
- apr_pool_t *scratch_pool)
-{
- SVN_ERR(svn_wc__db_op_set_props(db, local_abspath,
- working_props,
- NULL /* conflict */,
- NULL, /* work_items */
- scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
-
/*---------------------------------------------------------------------*/
/*** Merging propchanges into the working copy ***/
@@ -241,25 +224,48 @@ svn_wc__perform_props_merge(svn_wc_notif
void *conflict_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool /* scratch_pool */)
+ apr_pool_t *scratch_pool)
{
- svn_boolean_t hidden;
int i;
+ svn_wc__db_status_t status;
svn_wc__db_kind_t kind;
- apr_hash_t *new_base_props;
+ apr_hash_t *pristine_props = NULL;
+ apr_hash_t *actual_props = NULL;
+ apr_hash_t *new_pristine_props;
apr_hash_t *new_actual_props;
- apr_hash_t *base_props;
- apr_hash_t *actual_props;
+ svn_boolean_t had_props, props_mod;
+ svn_boolean_t have_base;
+ svn_skel_t *work_items;
/* IMPORTANT: svn_wc_merge_prop_diffs relies on the fact that baseprops
may be NULL. */
+ SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ &had_props, &props_mod, &have_base, NULL, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+
/* Checks whether the node exists and returns the hidden flag */
- SVN_ERR(svn_wc__db_node_hidden(&hidden, db, local_abspath, pool));
- if (hidden)
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
- _("The node '%s' was not found."),
- svn_dirent_local_style(local_abspath, pool));
+ if (status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_absent
+ || status == svn_wc__db_status_excluded)
+ {
+ return svn_error_createf(
+ SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ _("The node '%s' was not found."),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+ }
+ else if (status != svn_wc__db_status_normal
+ && status != svn_wc__db_status_added
+ && status != svn_wc__db_status_incomplete)
+ {
+ return svn_error_createf(
+ SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("The node '%s' does not have properties in this state."),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+ }
/* The PROPCHANGES may not have non-"normal" properties in it. If entry
or wc props were allowed, then the following code would install them
@@ -273,84 +279,78 @@ svn_wc__perform_props_merge(svn_wc_notif
_("The property '%s' may not be merged "
"into '%s'."),
change->name,
- svn_dirent_local_style(local_abspath, pool));
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
}
- SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, FALSE, pool));
+ if (had_props)
+ SVN_ERR(svn_wc__get_pristine_props(&pristine_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+ if (pristine_props == NULL)
+ pristine_props = apr_hash_make(scratch_pool);
- SVN_ERR(svn_wc__get_pristine_props(&base_props, db, local_abspath,
- pool, pool));
- if (base_props == NULL)
- base_props = apr_hash_make(pool); /* some nodes have no pristines */
- SVN_ERR(svn_wc__get_actual_props(&actual_props, db, local_abspath,
- pool, pool));
+ if (props_mod)
+ SVN_ERR(svn_wc__get_actual_props(&actual_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+ else
+ actual_props = apr_hash_copy(scratch_pool, pristine_props);
/* Note that while this routine does the "real" work, it's only
prepping tempfiles and writing log commands. */
- SVN_ERR(svn_wc__merge_props(state,
- &new_base_props, &new_actual_props,
+ SVN_ERR(svn_wc__merge_props(&work_items, state,
+ &new_pristine_props, &new_actual_props,
db, local_abspath, kind,
left_version, right_version,
baseprops /* server_baseprops */,
- base_props,
+ pristine_props,
actual_props,
propchanges, base_merge, dry_run,
conflict_func, conflict_baton,
cancel_func, cancel_baton,
- pool, pool));
+ scratch_pool, scratch_pool));
- if (!dry_run)
+ if (dry_run)
{
- const char *dir_abspath;
+ SVN_ERR_ASSERT(! work_items);
+ return SVN_NO_ERROR;
+ }
- if (kind == svn_wc__db_kind_dir)
- dir_abspath = local_abspath;
- else
- dir_abspath = svn_dirent_dirname(local_abspath, pool);
+ {
+ const char *dir_abspath;
+
+ if (kind == svn_wc__db_kind_dir)
+ dir_abspath = local_abspath;
+ else
+ dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
- /* Verify that we're holding this directory's write lock. */
- SVN_ERR(svn_wc__write_check(db, dir_abspath, pool));
+ /* Verify that we're holding this directory's write lock. */
+ SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
- /* After a (not-dry-run) merge, we ALWAYS have props to save. */
- SVN_ERR_ASSERT(new_base_props != NULL && new_actual_props != NULL);
+ /* After a (not-dry-run) merge, we ALWAYS have props to save. */
+ SVN_ERR_ASSERT(new_pristine_props != NULL && new_actual_props != NULL);
/* See props.h */
#ifdef SVN__SUPPORT_BASE_MERGE
- {
- svn_wc__db_status_t status;
- svn_boolean_t have_base;
-
- SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- &have_base, NULL, NULL, NULL,
- db, local_abspath, pool, pool));
-
- if (status == svn_wc__db_status_added)
- SVN_ERR(svn_wc__db_temp_working_set_props(db, local_abspath,
- new_base_props, pool));
- else
- SVN_ERR(svn_wc__db_temp_base_set_props(db, local_abspath,
- new_base_props, pool));
-
- SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, actual_props,
- NULL, NULL, pool));
- }
+ if (status == svn_wc__db_status_added)
+ SVN_ERR(svn_wc__db_temp_working_set_props(db, local_abspath,
+ new_base_props, scratch_pool));
+ else
+ SVN_ERR(svn_wc__db_temp_base_set_props(db, local_abspath,
+ new_base_props, scratch_pool));
#else
- if (base_merge)
- return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- U_("base_merge=TRUE is no longer supported"));
-
- SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, new_actual_props,
- NULL /* conflict */,
- NULL /* work_item */,
- pool));
+ if (base_merge)
+ return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ U_("base_merge=TRUE is no longer supported"));
#endif
+ SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, new_actual_props,
+ NULL /* conflict */,
+ work_items,
+ scratch_pool));
- SVN_ERR(svn_wc__wq_run(db, local_abspath,
- cancel_func, cancel_baton,
- pool));
- }
+ if (work_items != NULL)
+ SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+ scratch_pool));
+ }
return SVN_NO_ERROR;
}
@@ -1391,8 +1391,9 @@ apply_single_prop_change(svn_wc_notify_s
svn_error_t *
-svn_wc__merge_props(svn_wc_notify_state_t *state,
- apr_hash_t **new_base_props,
+svn_wc__merge_props(svn_skel_t **work_items,
+ svn_wc_notify_state_t *state,
+ apr_hash_t **new_pristine_props,
apr_hash_t **new_actual_props,
svn_wc__db_t *db,
const char *local_abspath,
@@ -1400,8 +1401,8 @@ svn_wc__merge_props(svn_wc_notify_state_
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
apr_hash_t *server_baseprops,
- apr_hash_t *base_props,
- apr_hash_t *working_props,
+ 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,
@@ -1417,16 +1418,18 @@ svn_wc__merge_props(svn_wc_notify_state_
svn_boolean_t is_dir;
svn_skel_t *conflict_skel = NULL;
- SVN_ERR_ASSERT(base_props != NULL);
- SVN_ERR_ASSERT(working_props != NULL);
+ SVN_ERR_ASSERT(pristine_props != NULL);
+ SVN_ERR_ASSERT(actual_props != NULL);
- *new_base_props = NULL;
+ *work_items = NULL;
+
+ *new_pristine_props = NULL;
*new_actual_props = NULL;
is_dir = (kind == svn_wc__db_kind_dir);
if (!server_baseprops)
- server_baseprops = base_props;
+ server_baseprops = pristine_props;
if (state)
{
@@ -1460,13 +1463,13 @@ svn_wc__merge_props(svn_wc_notify_state_
? svn_string_dup(incoming_change->value, result_pool) : NULL;
from_val = apr_hash_get(server_baseprops, propname, APR_HASH_KEY_STRING);
- base_val = apr_hash_get(base_props, propname, APR_HASH_KEY_STRING);
+ base_val = apr_hash_get(pristine_props, propname, APR_HASH_KEY_STRING);
if (base_merge)
- apr_hash_set(base_props, propname, APR_HASH_KEY_STRING, to_val);
+ apr_hash_set(pristine_props, propname, APR_HASH_KEY_STRING, to_val);
/* Save MINE for later message generation. */
- mine_val = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ mine_val = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
/* We already know that state is at least `changed', so mark
that, but remember that we may later upgrade to `merged' or
@@ -1477,7 +1480,7 @@ svn_wc__merge_props(svn_wc_notify_state_
SVN_ERR(apply_single_prop_add(state, &conflict_remains,
db, local_abspath,
left_version, right_version,
- is_dir, working_props,
+ is_dir, actual_props,
propname, base_val, to_val,
conflict_func, conflict_baton,
dry_run, result_pool, iterpool));
@@ -1487,7 +1490,7 @@ svn_wc__merge_props(svn_wc_notify_state_
db, local_abspath,
left_version, right_version,
is_dir,
- working_props,
+ actual_props,
propname, base_val, from_val,
conflict_func, conflict_baton,
dry_run, result_pool, iterpool));
@@ -1497,7 +1500,7 @@ svn_wc__merge_props(svn_wc_notify_state_
db, local_abspath,
left_version, right_version,
is_dir,
- working_props,
+ actual_props,
propname, base_val, from_val, to_val,
conflict_func, conflict_baton,
dry_run, result_pool, iterpool));
@@ -1514,7 +1517,7 @@ svn_wc__merge_props(svn_wc_notify_state_
continue; /* skip to next incoming change */
if (conflict_skel == NULL)
- conflict_skel = svn_wc__conflict_skel_new(scratch_pool);
+ conflict_skel = svn_wc__conflict_skel_new(result_pool);
SVN_ERR(svn_wc__conflict_skel_add_prop_conflict(conflict_skel,
propname,
@@ -1522,7 +1525,7 @@ svn_wc__merge_props(svn_wc_notify_state_
mine_val,
to_val,
from_val,
- scratch_pool,
+ result_pool,
iterpool));
}
@@ -1534,8 +1537,8 @@ svn_wc__merge_props(svn_wc_notify_state_
if (dry_run)
return SVN_NO_ERROR;
- *new_base_props = base_props;
- *new_actual_props = working_props;
+ *new_pristine_props = pristine_props;
+ *new_actual_props = actual_props;
if (conflict_skel != NULL)
{
@@ -1552,6 +1555,7 @@ svn_wc__merge_props(svn_wc_notify_state_
opening and closing it. */
const char *reject_dirpath;
const char *reject_filename;
+ svn_skel_t *work_item;
if (is_dir)
{
@@ -1569,36 +1573,29 @@ svn_wc__merge_props(svn_wc_notify_state_
svn_io_file_del_none,
scratch_pool, scratch_pool));
- /* This file will be overwritten when the log is run; that's
+ /* This file will be overwritten when the wq is run; that's
ok, because at least now we have a reservation on
disk. */
- }
-
- /* Mark entry as "conflicted" with a particular .prej file. */
- {
- svn_skel_t *work_item;
- SVN_ERR(svn_wc__wq_tmp_build_set_property_conflict_marker(
+ /* Mark entry as "conflicted" with a particular .prej file. */
+ SVN_ERR(svn_wc__wq_tmp_build_set_property_conflict_marker(
&work_item,
db, local_abspath, reject_path,
- scratch_pool, scratch_pool));
+ result_pool, scratch_pool));
- SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, scratch_pool));
- }
+ *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
+ }
/* Once the prejfile is recorded, then install the file. */
{
svn_skel_t *work_item;
- /* ### careful. CONFLICT_SKEL is NOT dup'd into the provided
- ### result_pool at the moment. we'll get that fixed soon-ish.
- ### this is okay for now since we immediately serialize it and
- ### shove it into the database. */
SVN_ERR(svn_wc__wq_build_prej_install(&work_item,
db, local_abspath,
conflict_skel,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, scratch_pool));
+ result_pool, scratch_pool));
+
+ *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
}
}
@@ -2189,9 +2186,8 @@ svn_wc__internal_propset(svn_wc__db_t *d
property into it. */
apr_hash_set(prophash, name, APR_HASH_KEY_STRING, value);
- /* Drop it right onto the disk. We don't need loggy since we aren't
- coordinating this change with anything else. */
- SVN_ERR(immediate_install_props(db, local_abspath, prophash,
+ /* Drop it right into the db.. */
+ SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, prophash, NULL, NULL,
scratch_pool));
if (notify_func)
Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Fri Apr 22 10:17:41 2011
@@ -82,25 +82,25 @@ svn_wc__internal_propset(svn_wc__db_t *d
/* Given LOCAL_ABSPATH/DB and an array of PROPCHANGES based on
- SERVER_BASEPROPS, merge the changes into the working copy.
- Append all necessary log entries except the property changes to
- ENTRY_ACCUM. Return the new property collections to the caller
- via NEW_BASE_PROPS and NEW_ACTUAL_PROPS, so the caller can combine
- the property update with other operations.
+ SERVER_BASEPROPS, calculate what changes should be applied to the working
+ copy.
- If BASE_PROPS or WORKING_PROPS is NULL, use the props from the
- working copy.
+ Return working queue operations in WORK_ITEMS and a new set of actual
+ (NEW_ACTUAL_PROPS) and pristine properties (NEW_PRISTINE_PROPS).
- If SERVER_BASEPROPS is NULL then use base props as PROPCHANGES
- base.
+ We return the new property collections to the caller, so the caller
+ can combine the property update with other operations.
- If BASE_MERGE is FALSE then only change working properties;
- if TRUE, change both the base and working properties.
+ If SERVER_BASEPROPS is NULL then use the pristine props as PROPCHANGES
+ base.
- If conflicts are found when merging, place them into a temporary
- .prej file, and write log commands to move this file into LOCAL_ABSPATH's
- parent directory, or append the conflicts to the file's already-existing
- .prej file. Modify base properties unconditionally,
+ 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)
+
+ If conflicts are found when merging, create a temporary .prej file,
+ and provide working queue operations to write the conflict information
+ into the .prej file later. Modify base properties unconditionally,
if BASE_MERGE is TRUE, they do not generate conficts.
TODO ### LEFT_VERSION and RIGHT_VERSION ...
@@ -112,8 +112,9 @@ svn_wc__internal_propset(svn_wc__db_t *d
If STATE is non-null, set *STATE to the state of the local properties
after the merge. */
svn_error_t *
-svn_wc__merge_props(svn_wc_notify_state_t *state,
- apr_hash_t **new_base_props,
+svn_wc__merge_props(svn_skel_t **work_items,
+ svn_wc_notify_state_t *state,
+ apr_hash_t **new_pristine_props,
apr_hash_t **new_actual_props,
svn_wc__db_t *db,
const char *local_abspath,
@@ -121,8 +122,8 @@ svn_wc__merge_props(svn_wc_notify_state_
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
apr_hash_t *server_baseprops,
- apr_hash_t *base_props,
- apr_hash_t *working_props,
+ 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,
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1095914&r1=1095913&r2=1095914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Apr 22 10:17:41
2011
@@ -2281,6 +2281,7 @@ close_directory(void *dir_baton,
apr_time_t new_changed_date;
const char *new_changed_author;
apr_pool_t *scratch_pool = db->pool;
+ svn_skel_t *all_work_items = NULL;
/* Skip if we're in a conflicted tree. */
if (db->skip_this)
@@ -2366,6 +2367,8 @@ close_directory(void *dir_baton,
{
if (regular_prop_changes->nelts)
{
+ svn_skel_t *work_item;
+
/* If recording traversal info, then see if the
SVN_PROP_EXTERNALS property on this directory changed,
and record before and after for the change. */
@@ -2404,7 +2407,8 @@ close_directory(void *dir_baton,
/* Merge pending properties into temporary files (ignoring
conflicts). */
- SVN_ERR_W(svn_wc__merge_props(&prop_state,
+ SVN_ERR_W(svn_wc__merge_props(&work_item,
+ &prop_state,
&new_base_props,
&new_actual_props,
eb->db,
@@ -2423,17 +2427,19 @@ close_directory(void *dir_baton,
eb->cancel_func,
eb->cancel_baton,
db->pool,
- pool),
+ scratch_pool),
_("Couldn't do property merge"));
/* After a (not-dry-run) merge, we ALWAYS have props to save. */
SVN_ERR_ASSERT(new_base_props != NULL && new_actual_props != NULL);
+ all_work_items = svn_wc__wq_merge(all_work_items, work_item,
+ scratch_pool);
}
SVN_ERR(accumulate_last_change(&new_changed_rev,
&new_changed_date,
&new_changed_author,
entry_prop_changes,
- pool, pool));
+ scratch_pool, scratch_pool));
}
/* If this directory is merely an anchor for a targeted child, then we
@@ -2465,7 +2471,7 @@ close_directory(void *dir_baton,
&depth, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
eb->db, db->local_abspath,
- pool, pool));
+ scratch_pool, scratch_pool));
/* If we received any changed_* values, then use them. */
if (SVN_IS_VALID_REVNUM(new_changed_rev))
@@ -2518,14 +2524,14 @@ close_directory(void *dir_baton,
NULL /* conflict */,
(! db->shadowed) && new_base_props != NULL,
new_actual_props,
- NULL /* work_items */,
- pool));
+ all_work_items,
+ scratch_pool));
}
/* Process all of the queued work items for this directory. */
SVN_ERR(svn_wc__wq_run(eb->db, db->local_abspath,
eb->cancel_func, eb->cancel_baton,
- pool));
+ scratch_pool));
/* Notify of any prop changes on this directory -- but do nothing if
it's an added or skipped directory, because notification has already
@@ -2550,7 +2556,7 @@ close_directory(void *dir_baton,
notify->revision = *eb->target_revision;
notify->old_revision = db->old_revision;
- eb->notify_func(eb->notify_baton, notify, pool);
+ eb->notify_func(eb->notify_baton, notify, scratch_pool);
}
/* We're done with this directory, so remove one reference from the
@@ -3710,7 +3716,8 @@ close_file(void *file_baton,
/* This will merge the old and new props into a new prop db, and
write <cp> commands to the logfile to install the merged
props. */
- SVN_ERR(svn_wc__merge_props(&prop_state,
+ SVN_ERR(svn_wc__merge_props(&work_item,
+ &prop_state,
&new_base_props,
&new_actual_props,
eb->db,
@@ -3730,12 +3737,19 @@ close_file(void *file_baton,
scratch_pool));
/* We will ALWAYS have properties to save (after a not-dry-run merge).
*/
SVN_ERR_ASSERT(new_base_props != NULL && new_actual_props != NULL);
+ all_work_items = svn_wc__wq_merge(all_work_items, work_item,
+ scratch_pool);
/* Merge the text. This will queue some additional work. */
if (!fb->obstruction_found)
- SVN_ERR(merge_file(&all_work_items, &install_pristine, &install_from,
- &content_state, fb, new_changed_date,
- scratch_pool, scratch_pool));
+ {
+ SVN_ERR(merge_file(&work_item, &install_pristine, &install_from,
+ &content_state, fb, new_changed_date,
+ scratch_pool, scratch_pool));
+
+ all_work_items = svn_wc__wq_merge(all_work_items, work_item,
+ scratch_pool);
+ }
else
install_pristine = FALSE;
@@ -3800,7 +3814,8 @@ close_file(void *file_baton,
/* Store the incoming props (sent as propchanges) in new_base_props
and create a set of new actual props to use for notifications */
- SVN_ERR(svn_wc__merge_props(&prop_state,
+ SVN_ERR(svn_wc__merge_props(&work_item,
+ &prop_state,
&new_base_props,
&new_actual_props,
eb->db,
@@ -3818,6 +3833,9 @@ close_file(void *file_baton,
eb->cancel_func, eb->cancel_baton,
scratch_pool,
scratch_pool));
+
+ all_work_items = svn_wc__wq_merge(all_work_items, work_item,
+ scratch_pool);
}
/* ### NOTE: from this point onwards, we make several changes to the