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/12/13 17:21:35 UTC
svn commit: r1421361 - /subversion/trunk/subversion/libsvn_wc/props.c
Author: rhuijben
Date: Thu Dec 13 16:21:34 2012
New Revision: 1421361
URL: http://svn.apache.org/viewvc?rev=1421361&view=rev
Log:
* subversion/libsvn_wc/props.c
(svn_wc_merge_props3): Extract lock checking from actual merge code.
Modified:
subversion/trunk/subversion/libsvn_wc/props.c
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1421361&r1=1421360&r2=1421361&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Thu Dec 13 16:21:34 2012
@@ -306,6 +306,18 @@ svn_wc_merge_props3(svn_wc_notify_state_
return SVN_NO_ERROR;
}
+ {
+ const char *dir_abspath;
+
+ if (kind == svn_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, scratch_pool));
+ }
+
if (conflict_skel)
{
svn_skel_t *work_item;
@@ -323,30 +335,18 @@ svn_wc_merge_props3(svn_wc_notify_state_
work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
}
- {
- const char *dir_abspath;
-
- if (kind == svn_kind_dir)
- dir_abspath = local_abspath;
- else
- dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+ /* After a (not-dry-run) merge, we ALWAYS have props to save. */
+ SVN_ERR_ASSERT(new_actual_props != NULL);
- /* 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_actual_props != NULL);
-
- SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, new_actual_props,
- svn_wc__has_magic_property(propchanges),
- conflict_skel,
- work_items,
- scratch_pool));
+ SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, new_actual_props,
+ svn_wc__has_magic_property(propchanges),
+ conflict_skel,
+ work_items,
+ scratch_pool));
- if (work_items != NULL)
- SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
- scratch_pool));
- }
+ if (work_items != NULL)
+ SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+ scratch_pool));
if (conflict_skel && conflict_func)
SVN_ERR(svn_wc__conflict_invoke_resolver(db, local_abspath, conflict_skel,