You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2013/03/04 14:35:55 UTC
svn commit: r1452300 - in /subversion/trunk/subversion/libsvn_wc:
conflicts.c wc_db.h wc_db_update_move.c
Author: philip
Date: Mon Mar 4 13:35:54 2013
New Revision: 1452300
URL: http://svn.apache.org/r1452300
Log:
The move-update function is a transaction that installs work queue items
and so it should not return work queue items to the caller.
* subversion/libsvn_wc/wc_db.h
(svn_wc__db_update_moved_away_conflict_victim): Remove work items parameter.
* subversion/libsvn_wc/conflicts.c
(resolve_tree_conflict_on_node): Adjust call.
* subversion/libsvn_wc/wc_db_update_move.c
(struct tc_editor_baton): Remove work items parameter.
(create_conflict_markers): Don't merge items.
(tc_editor_alter_directory): Install work items.
(update_working_file): Remove work items parameter, install work items.
(tc_editor_alter_file): Adjust call.
(update_moved_away_conflict_victim,
svn_wc__db_update_moved_away_conflict_victim): Remove work items parameter.
Modified:
subversion/trunk/subversion/libsvn_wc/conflicts.c
subversion/trunk/subversion/libsvn_wc/wc_db.h
subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1452300&r1=1452299&r2=1452300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Mon Mar 4 13:35:54 2013
@@ -2706,7 +2706,6 @@ resolve_tree_conflict_on_node(svn_skel_t
if (conflict_choice == svn_wc_conflict_choose_mine_conflict)
{
SVN_ERR(svn_wc__db_update_moved_away_conflict_victim(
- work_items,
db, local_abspath,
notify_func, notify_baton,
cancel_func, cancel_baton,
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1452300&r1=1452299&r2=1452300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Mon Mar 4 13:35:54 2013
@@ -3326,12 +3326,9 @@ svn_wc__db_follow_moved_to(apr_array_hea
apr_pool_t *scratch_pool);
/* Update a moved-away tree conflict victim at VICTIM_ABSPATH with changes
- * brought in by the update operation which flagged the tree conflict.
- * Set *WORK_ITEMS to a list of work items, allocated in RESULT_POOL, that
- * need to run as part of marking the conflict resolved. */
+ * brought in by the update operation which flagged the tree conflict. */
svn_error_t *
-svn_wc__db_update_moved_away_conflict_victim(svn_skel_t **work_items,
- svn_wc__db_t *db,
+svn_wc__db_update_moved_away_conflict_victim(svn_wc__db_t *db,
const char *victim_abspath,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1452300&r1=1452299&r2=1452300&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Mon Mar 4 13:35:54 2013
@@ -114,7 +114,6 @@
*/
struct tc_editor_baton {
- svn_skel_t **work_items;
svn_wc__db_t *db;
svn_wc__db_wcroot_t *wcroot;
const char *move_root_dst_relpath;
@@ -658,6 +657,7 @@ typedef struct working_node_version_t
const svn_checksum_t *checksum; /* for files only */
} working_node_version_t;
+/* Return *WORK_ITEMS to create a conflict on LOCAL_ABSPATH. */
static svn_error_t *
create_conflict_markers(svn_skel_t **work_items,
const char *local_abspath,
@@ -671,7 +671,6 @@ create_conflict_markers(svn_skel_t **wor
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_skel_t *work_item;
svn_wc_conflict_version_t *original_version;
svn_wc_conflict_version_t *conflicted_version;
@@ -700,12 +699,11 @@ create_conflict_markers(svn_skel_t **wor
/* According to this func's doc string, it is "Currently only used for
* property conflicts as text conflict markers are just in-wc files." */
- SVN_ERR(svn_wc__conflict_create_markers(&work_item, db,
+ SVN_ERR(svn_wc__conflict_create_markers(work_items, db,
local_abspath,
conflict_skel,
result_pool,
scratch_pool));
- *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
return SVN_NO_ERROR;
}
@@ -826,7 +824,9 @@ tc_editor_alter_directory(void *baton,
if (conflict_skel)
{
- SVN_ERR(create_conflict_markers(b->work_items, dst_abspath,
+ svn_skel_t *work_items;
+
+ SVN_ERR(create_conflict_markers(&work_items, dst_abspath,
b->db, move_dst_repos_relpath,
conflict_skel, b->operation,
&old_version, &new_version,
@@ -835,6 +835,8 @@ tc_editor_alter_directory(void *baton,
SVN_ERR(svn_wc__db_mark_conflict_internal(b->wcroot, dst_relpath,
conflict_skel,
scratch_pool));
+ SVN_ERR(svn_wc__db_wq_add(b->db, b->wcroot->abspath, work_items,
+ scratch_pool));
}
SVN_ERR(update_move_list_add(b->wcroot, dst_relpath,
@@ -863,8 +865,7 @@ tc_editor_alter_directory(void *baton,
* Set *WORK_ITEMS to any required work items, allocated in RESULT_POOL.
* Use SCRATCH_POOL for temporary allocations. */
static svn_error_t *
-update_working_file(svn_skel_t **work_items,
- const char *local_relpath,
+update_working_file(const char *local_relpath,
const char *repos_relpath,
svn_wc_operation_t operation,
const working_node_version_t *old_version,
@@ -884,9 +885,7 @@ update_working_file(svn_skel_t **work_it
apr_array_header_t *propchanges;
enum svn_wc_merge_outcome_t merge_outcome;
svn_wc_notify_state_t prop_state, content_state;
- svn_skel_t *work_item;
-
- *work_items = NULL;
+ svn_skel_t *work_item, *work_items = NULL;
SVN_ERR(update_working_props(&prop_state, &conflict_skel, &propchanges,
&actual_props, db, local_abspath,
@@ -924,7 +923,7 @@ update_working_file(svn_skel_t **work_it
NULL, NULL, /* cancel_func + baton */
result_pool, scratch_pool));
- *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
+ work_items = svn_wc__wq_merge(work_items, work_item, result_pool);
if (merge_outcome == svn_wc_merge_conflict)
{
@@ -951,16 +950,21 @@ update_working_file(svn_skel_t **work_it
* too. */
if (conflict_skel)
{
- SVN_ERR(create_conflict_markers(work_items, local_abspath, db,
+ SVN_ERR(create_conflict_markers(&work_item, local_abspath, db,
repos_relpath, conflict_skel,
operation, old_version, new_version,
svn_kind_file,
result_pool, scratch_pool));
+
SVN_ERR(svn_wc__db_mark_conflict_internal(wcroot, local_relpath,
conflict_skel,
scratch_pool));
+
+ work_items = svn_wc__wq_merge(work_items, work_item, result_pool);
}
+ SVN_ERR(svn_wc__db_wq_add(db, wcroot->abspath, work_items, scratch_pool));
+
SVN_ERR(update_move_list_add(wcroot, local_relpath,
svn_wc_notify_update_update,
svn_node_file,
@@ -1019,10 +1023,7 @@ tc_editor_alter_file(void *baton,
/* Update file and prop contents if the update has changed them. */
if (!svn_checksum_match(new_checksum, old_version.checksum) || new_props)
{
- svn_skel_t *work_items;
-
- SVN_ERR(update_working_file(b->work_items, dst_relpath,
- move_dst_repos_relpath,
+ SVN_ERR(update_working_file(dst_relpath, move_dst_repos_relpath,
b->operation, &old_version, &new_version,
b->wcroot, b->db,
b->result_pool, scratch_pool));
@@ -1779,8 +1780,7 @@ suitable_for_move(svn_wc__db_wcroot_t *w
/* The body of svn_wc__db_update_moved_away_conflict_victim(), which see.
*/
static svn_error_t *
-update_moved_away_conflict_victim(svn_skel_t **work_items,
- svn_wc__db_t *db,
+update_moved_away_conflict_victim(svn_wc__db_t *db,
svn_wc__db_wcroot_t *wcroot,
const char *victim_relpath,
svn_wc_operation_t operation,
@@ -1828,7 +1828,6 @@ update_moved_away_conflict_victim(svn_sk
tc_editor_baton->new_version= new_version;
tc_editor_baton->db = db;
tc_editor_baton->wcroot = wcroot;
- tc_editor_baton->work_items = work_items;
tc_editor_baton->result_pool = result_pool;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -1878,8 +1877,7 @@ update_moved_away_conflict_victim(svn_sk
svn_error_t *
-svn_wc__db_update_moved_away_conflict_victim(svn_skel_t **work_items,
- svn_wc__db_t *db,
+svn_wc__db_update_moved_away_conflict_victim(svn_wc__db_t *db,
const char *victim_abspath,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
@@ -1915,7 +1913,7 @@ svn_wc__db_update_moved_away_conflict_vi
SVN_WC__DB_WITH_TXN(
update_moved_away_conflict_victim(
- work_items, db, wcroot, local_relpath,
+ db, wcroot, local_relpath,
operation, local_change, incoming_change,
move_src_op_root_relpath,
old_version, new_version,