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 2011/07/30 12:47:40 UTC
svn commit: r1152447 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_wc/node.c
Author: stsp
Date: Sat Jul 30 10:47:39 2011
New Revision: 1152447
URL: http://svn.apache.org/viewvc?rev=1152447&view=rev
Log:
Add a new libsvn_wc API function: svn_wc__node_was_moved_away().
* subversion/include/private/svn_wc_private.h
(svn_wc__node_was_moved_away): Declare.
* subversion/libsvn_wc/node.c
(svn_wc__node_was_moved_away): New. Provides the MOVED_TO_ABSPATH of
a node that was moved-away, as well the COPY_OP_ROOT_ABSPATH of the
copy-half of the move.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1152447&r1=1152446&r2=1152447&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sat Jul 30 10:47:39 2011
@@ -1127,6 +1127,24 @@ svn_wc__delete_internal(svn_wc_context_t
void *notify_baton,
apr_pool_t *scratch_pool);
+/* If the node at LOCAL_ABSPATH was moved away set *MOVED_TO_ABSPATH to
+ * the absolute path of the copied move-target node, and *COPY_OP_ROOT_ABSPATH
+ * to the absolute path of the root node of the copy operation.
+ *
+ * If the node was not moved, set *MOVED_TO_ABSPATH and *COPY_OP_ROOT_ABSPATH
+ * to NULL.
+ *
+ * Either MOVED_TO_ABSPATH or OP_ROOT_ABSPATH may be NULL to indicate
+ * that the caller is not interested in the result.
+ */
+svn_error_t *
+svn_wc__node_was_moved_away(const char **moved_to_abspath,
+ const char **copy_op_root_abspath,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* If the node at LOCAL_ABSPATH was moved here set *MOVED_FROM_ABSPATH to
* the absolute path of the deleted move-source node, and set
* *DELETE_OP_ROOT_ABSPATH to the absolute path of the root node of the
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1152447&r1=1152446&r2=1152447&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sat Jul 30 10:47:39 2011
@@ -1795,6 +1795,33 @@ svn_wc__check_for_obstructions(svn_wc_no
svn_error_t *
+svn_wc__node_was_moved_away(const char **moved_to_abspath,
+ const char **op_root_abspath,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_boolean_t is_deleted;
+
+ if (moved_to_abspath)
+ *moved_to_abspath = NULL;
+ if (op_root_abspath)
+ *op_root_abspath = NULL;
+
+ SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, wc_ctx, local_abspath,
+ scratch_pool));
+ if (is_deleted)
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, moved_to_abspath, NULL,
+ op_root_abspath, wc_ctx->db,
+ local_abspath,
+ result_pool, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
svn_wc__node_was_moved_here(const char **moved_from_abspath,
const char **delete_op_root_abspath,
svn_wc_context_t *wc_ctx,