You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/10/29 18:26:19 UTC
svn commit: r1403435 -
/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
Author: stsp
Date: Mon Oct 29 17:26:19 2012
New Revision: 1403435
URL: http://svn.apache.org/viewvc?rev=1403435&view=rev
Log:
In the move-update editor, propagate a wcroot object to all editor functions
at both the driving and receiving ends to make it possible to run DB queries.
* subversion/libsvn_wc/wc_db_update_move.c
(tc_editor_baton): Add wcroot member.
(update_moved_away_file, update_moved_away_dir,
update_moved_away_subtree, drive_tree_conflict_editor): Add a wcroot
parameter and pass it through as appropriate.
(update_moved_away_conflict_victim): Store wcroot pointer in tc_editor baton
and pass it on to update_moved_away_conflict_victim().
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
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=1403435&r1=1403434&r2=1403435&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Mon Oct 29 17:26:19 2012
@@ -58,6 +58,7 @@ struct tc_editor_baton {
const char *src_abspath;
const char *dst_abspath;
svn_wc__db_t *db;
+ svn_wc__db_wcroot_t *wcroot;
svn_skel_t **work_items;
svn_wc_conflict_version_t *old_version;
svn_wc_conflict_version_t *new_version;
@@ -427,6 +428,7 @@ update_moved_away_file(svn_editor_t *tc_
const char *moved_to_abspath,
const char *move_dst_op_root_abspath,
svn_wc__db_t *db,
+ svn_wc__db_wcroot_t *wcroot,
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
@@ -493,6 +495,7 @@ update_moved_away_dir(svn_editor_t *tc_e
const char *moved_to_abspath,
const char *move_dst_op_root_abspath,
svn_wc__db_t *db,
+ svn_wc__db_wcroot_t *wcroot,
apr_pool_t *scratch_pool)
{
/* ### notify */
@@ -510,6 +513,7 @@ update_moved_away_subtree(svn_editor_t *
const char *moved_to_abspath,
const char *move_dst_op_root_abspath,
svn_wc__db_t *db,
+ svn_wc__db_wcroot_t *wcroot,
apr_pool_t *scratch_pool)
{
const apr_array_header_t *children;
@@ -517,7 +521,8 @@ update_moved_away_subtree(svn_editor_t *
int i;
SVN_ERR(update_moved_away_dir(tc_editor, src_abspath, moved_to_abspath,
- move_dst_op_root_abspath, db, scratch_pool));
+ move_dst_op_root_abspath, db, wcroot,
+ scratch_pool));
SVN_ERR(svn_wc__db_base_get_children(&children, db, src_abspath,
scratch_pool, scratch_pool));
@@ -553,12 +558,12 @@ update_moved_away_subtree(svn_editor_t *
SVN_ERR(update_moved_away_file(tc_editor, child_abspath,
child_moved_to_abspath,
move_dst_op_root_abspath,
- db, iterpool));
+ db, wcroot, iterpool));
else if (child_kind == svn_kind_dir)
SVN_ERR(update_moved_away_subtree(tc_editor, child_abspath,
child_moved_to_abspath,
move_dst_op_root_abspath,
- db, iterpool));
+ db, wcroot, iterpool));
}
svn_pool_destroy(iterpool);
@@ -575,6 +580,7 @@ drive_tree_conflict_editor(svn_editor_t
svn_wc_conflict_version_t *old_version,
svn_wc_conflict_version_t *new_version,
svn_wc__db_t *db,
+ svn_wc__db_wcroot_t *wcroot,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool)
@@ -603,10 +609,10 @@ drive_tree_conflict_editor(svn_editor_t
*/
if (old_version->node_kind == svn_node_file)
SVN_ERR(update_moved_away_file(tc_editor, src_abspath, dst_abspath,
- dst_abspath, db, scratch_pool));
+ dst_abspath, db, wcroot, scratch_pool));
else if (old_version->node_kind == svn_node_dir)
SVN_ERR(update_moved_away_subtree(tc_editor, src_abspath, dst_abspath,
- dst_abspath, db, scratch_pool));
+ dst_abspath, db, wcroot, scratch_pool));
SVN_ERR(svn_editor_complete(tc_editor));
@@ -660,6 +666,7 @@ update_moved_away_conflict_victim(void *
tc_editor_baton->dst_abspath,
b->db, scratch_pool, scratch_pool));
tc_editor_baton->db = b->db;
+ tc_editor_baton->wcroot = wcroot;
tc_editor_baton->work_items = b->work_items;
tc_editor_baton->notify_func = b->notify_func;
tc_editor_baton->notify_baton = b->notify_baton;
@@ -679,7 +686,8 @@ update_moved_away_conflict_victim(void *
local_change, incoming_change,
tc_editor_baton->old_version,
tc_editor_baton->new_version,
- b->db, b->cancel_func, b->cancel_baton,
+ b->db, wcroot,
+ b->cancel_func, b->cancel_baton,
scratch_pool));
return SVN_NO_ERROR;