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 2012/12/04 10:33:56 UTC
svn commit: r1416837 - in /subversion/trunk/subversion/libsvn_wc:
wc-queries.sql wc_db_update_move.c
Author: philip
Date: Tue Dec 4 09:33:55 2012
New Revision: 1416837
URL: http://svn.apache.org/viewvc?rev=1416837&view=rev
Log:
Revert r1416661 as I'm going to try a different approach.
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=1416837&r1=1416836&r2=1416837&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Tue Dec 4 09:33:55 2012
@@ -220,34 +220,6 @@ DELETE FROM nodes
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND op_depth = 0
--- STMT_DELETE_WORKING_OP_DEPTH
-DELETE FROM nodes
-WHERE wc_id = ?1
- AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND op_depth = ?3
-
--- STMT_SELECT_LOCAL_RELPATH_OP_DEPTH
-SELECT local_relpath
-FROM nodes
-WHERE wc_id = ?1
- AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND op_depth = ?3
-
--- STMT_COPY_NODE_MOVE
-INSERT INTO nodes (
- wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
- revision, presence, depth, kind, changed_revision, changed_date,
- changed_author, checksum, properties, translated_size, last_mod_time,
- symlink_target, moved_here )
-SELECT
- wc_id, ?4 /*local_relpath */, ?5 /*op_depth*/, ?6 /* parent_relpath */,
- repos_id,
- repos_path, revision, presence, depth, kind, changed_revision,
- changed_date, changed_author, checksum, properties, translated_size,
- last_mod_time, symlink_target, 1
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
-
-- STMT_SELECT_OP_DEPTH_CHILDREN
SELECT local_relpath FROM nodes
WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = ?3
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=1416837&r1=1416836&r2=1416837&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Tue Dec 4 09:33:55 2012
@@ -672,83 +672,6 @@ update_moved_away_subtree(svn_editor_t *
return SVN_NO_ERROR;
}
-/* Update the single op-depth layer in the move destination subtree
- rooted at DST_RELPATH to make it match the move source subtree
- rooted at SRC_RELPATH. */
-static svn_error_t *
-replace_moved_layer(const char *src_relpath,
- const char *dst_relpath,
- svn_wc__db_t *db,
- svn_wc__db_wcroot_t *wcroot,
- apr_pool_t *scratch_pool)
-{
- svn_sqlite__stmt_t *stmt;
- svn_boolean_t have_row;
- int src_op_depth;
- int dst_op_depth = relpath_depth(dst_relpath);
-
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_NODE_INFO));
- SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, src_relpath));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
- src_op_depth = svn_sqlite__column_int(stmt, 0);
- SVN_ERR(svn_sqlite__reset(stmt));
- if (!have_row)
- return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
- _("'%s' is not deleted"),
- svn_dirent_local_style(src_relpath,
- scratch_pool));
-
- /* Delete entire subtree at one op-depth. */
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_DELETE_WORKING_OP_DEPTH));
- SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
- dst_relpath, dst_op_depth));
- SVN_ERR(svn_sqlite__step_done(stmt));
-
- /* Copy entire subtree at one op-depth. */
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_LOCAL_RELPATH_OP_DEPTH));
- SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
- src_relpath, src_op_depth));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- while (have_row)
- {
- svn_error_t *err;
- svn_sqlite__stmt_t *stmt2;
- const char *src_cp_relpath = svn_sqlite__column_text(stmt, 0, NULL);
- const char *dst_cp_relpath
- = svn_relpath_join(dst_relpath,
- svn_relpath_skip_ancestor(src_relpath,
- src_cp_relpath),
- scratch_pool);
-
- err = svn_sqlite__get_statement(&stmt2, wcroot->sdb,
- STMT_COPY_NODE_MOVE);
- if (!err)
- err = svn_sqlite__bindf(stmt2, "isdsds", wcroot->wc_id,
- src_cp_relpath, src_op_depth,
- dst_cp_relpath, dst_op_depth,
- svn_relpath_dirname(dst_cp_relpath,
- scratch_pool));
- if (!err)
- err = svn_sqlite__step_done(stmt2);
- if (err)
- return svn_error_compose_create(err, svn_sqlite__reset(stmt));
-
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- }
- SVN_ERR(svn_sqlite__reset(stmt));
-
- /* TODO: extend/retract any base-deleted layers to account for
- added/removed nodes in the replaced layer. */
-
- return SVN_NO_ERROR;
-}
-
/* Transfer changes from the move source to the move destination.
*
* Drive the editor TC_EDITOR with the difference between DST_RELPATH
@@ -802,9 +725,6 @@ drive_tree_conflict_editor(svn_editor_t
SVN_ERR(svn_editor_complete(tc_editor));
- SVN_ERR(replace_moved_layer(src_relpath, dst_relpath, db, wcroot,
- scratch_pool));
-
return SVN_NO_ERROR;
}