* subversion/libsvn_wc/adm_ops.c (svn_wc__delete_internal): New. This is like svn_wc_delete4() but has one additional parameter MOVED_TO_ABSPATH. If not NULL, this indicates that the delete is the delete-half of a move. (svn_wc_delete4): Reimplement as a wrapper around svn_wc__delete_internal().
* subversion/libsvn_wc/wc-queries.sql (STMT_INSERT_DELETE_FROM_NODE_RECURSIVE): Adjust to only insert children of the node being deleted. (STMT_INSERT_DELETE_NODE): New. This statement deletes a single node, and allows populating the moved_to column in NODES.
* subversion/libsvn_wc/copy.c (svn_wc_move): Call svn_wc__delete_internal() with a MOVED_TO_ABSPATH instead of calling svn_wc_delete4().
* subversion/libsvn_wc/wc_db.c (op_delete_baton_t): Add new field MOVED_TO_RELPATH. (op_delete_txn): Use STMT_INSERT_DELETE_NODE to delete LOCAL_ABSPATH itself, and possibly mark LOCAL_ABSPATH has having been moved elsewhere. Use STMT_INSERT_DELETE_FROM_NODE_RECURSIVE to delete children of LOCAL_ABSPATH (before, this statement was also used to delete LOCAL_ABSPATH itself). (svn_wc__db_op_delete): New parameter MOVED_TO_ABSPATH. Convert this to a relpath and put that into the op_delete baton. (scan_deletion_txn): Update a comment that referred to the BASE_NODE table. This is now called NODES_BASE in the query this code is evaluating.
* subversion/libsvn_wc/wc_db.h (svn_wc__db_op_delete): Add MOVED_TO_ABSPATH parameter and update docstring.
* subversion/tests/libsvn_wc/op-depth-test.c, subversion/libsvn_wc/update_editor.c (do_delete, add_directory): Adjust calls to svn_wc__db_op_delete().