Author: rhuijben
Date: Thu Feb 5 19:48:29 2015
New Revision: 1657674
URL: http://svn.apache.org/r1657674
Log:
Stop doing some work twice in the move-update logic, now that we can rely
on the layer duplicate code to the right thing.
* subversion/libsvn_wc/wc-queries.sql
(STMT_DELETE_NO_LOWER_LAYER,
STMT_REPLACE_WITH_BASE_DELETED): Remove recursion over descendants.
* subversion/libsvn_wc/wc_db_update_move.c
(delete_move_leaf): Stop handling descendants too, as our only caller
does that for us.
* subversion/libsvn_wc/wc_db_update_move.c
(delete_move_leaf): This function is called per node, so no need to recurse.
(update_moved_away_node): Remove unneeded call.
Handled from the layer update.
Modified:
subversion/trunk/subversion/libsvn_wc/wc-queries.sql
subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1657674&r1=1657673&r2=1657674&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Feb 5 19:48:29
2015
@@ -971,7 +971,7 @@ VALUES(?1, ?2, ?3, ?4, MAP_BASE_DELETED,
-- STMT_DELETE_NO_LOWER_LAYER
DELETE FROM nodes
WHERE wc_id = ?1
- AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND local_relpath = ?2
AND op_depth = ?3
AND NOT EXISTS (SELECT 1 FROM nodes n
WHERE n.wc_id = ?1
@@ -986,7 +986,7 @@ SELECT wc_id, local_relpath, op_depth, p
kind, moved_to, MAP_BASE_DELETED
FROM nodes
WHERE wc_id = ?1
- AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND local_relpath = ?2
AND op_depth = ?3
/* If this query is updated, STMT_INSERT_DELETE_LIST should too.
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=1657674&r1=1657673&r2=1657674&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Feb 5
19:48:29 2015
@@ -1233,7 +1233,7 @@ tc_editor_delete(update_move_baton_t *b,
return SVN_NO_ERROR;
}
-/* Delete handling for both WORKING and shadowed nodes */
+/* Delete handling for a node and its shadowing */
static svn_error_t *
delete_move_leaf(svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
@@ -1276,21 +1276,13 @@ delete_move_leaf(svn_wc__db_wcroot_t *wc
else
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_WORKING_OP_DEPTH));
+ STMT_DELETE_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
op_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
}
- /* Retract any base-delete for descendants. */
- {
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_WORKING_BASE_DELETE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
- op_depth));
- SVN_ERR(svn_sqlite__step_done(stmt));
- }
- /* And for the node itself */
+ /* Retract base-delete for the node itself */
SVN_ERR(svn_wc__db_retract_parent_delete(wcroot, local_relpath, op_depth,
scratch_pool));
@@ -1534,14 +1526,6 @@ update_moved_away_node(update_move_baton
if (src_kind != svn_node_none && src_kind != dst_kind)
{
- if (shadowed)
- {
- SVN_ERR(svn_wc__db_extend_parent_delete(
- NULL,
- b->wcroot, dst_relpath, src_kind,
- relpath_depth(b->move_root_dst_relpath),
- scratch_pool));
- }
if (src_kind == svn_node_file || src_kind == svn_node_symlink)
{
SVN_ERR(tc_editor_add_file(b, dst_relpath,