You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/05/20 22:51:26 UTC
svn commit: r1340836 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/commit_util.c libsvn_wc/node.c
Author: rhuijben
Date: Sun May 20 20:51:26 2012
New Revision: 1340836
URL: http://svn.apache.org/viewvc?rev=1340836&view=rev
Log:
Use status walker information to detect file externals in the commit harvester.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_get_commit_status): Remove unused argument.
* subversion/libsvn_client/commit_util.c
(harvest_status_callback): Update caller. Remove variable.
Allow svn cp FILE-EXTERNAL URL -m "".
* subversion/libsvn_wc/node.c
(svn_wc__node_get_commit_status): Remove fetching of update_root, and
add a few more cheap checks to avoid the extra db query.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/commit_util.c
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=1340836&r1=1340835&r2=1340836&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sun May 20 20:51:26 2012
@@ -1058,7 +1058,6 @@ svn_wc__node_get_commit_status(svn_boole
svn_revnum_t *revision,
svn_revnum_t *original_revision,
const char **original_repos_relpath,
- svn_boolean_t *update_root,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1340836&r1=1340835&r2=1340836&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Sun May 20 20:51:26 2012
@@ -559,7 +559,6 @@ harvest_status_callback(void *status_bat
svn_boolean_t is_deleted;
svn_boolean_t is_replaced;
svn_boolean_t is_op_root;
- svn_boolean_t is_update_root;
svn_revnum_t original_rev;
const char *original_relpath;
svn_boolean_t copy_mode;
@@ -699,24 +698,13 @@ harvest_status_callback(void *status_bat
&is_op_root,
&node_rev,
&original_rev, &original_relpath,
- &is_update_root,
wc_ctx, local_abspath,
scratch_pool, scratch_pool));
- /* Handle file externals.
- * (IS_UPDATE_ROOT is more generally defined, but at the moment this
- * condition matches only file externals.)
- *
- * Don't copy files that svn:externals brought into the WC. So in copy_mode,
- * even explicit targets are skipped.
- *
- * Hande file externals only when passed as explicit target. Note that
+ /* Hande file externals only when passed as explicit target. Note that
* svn_client_commit6() passes all committable externals in as explicit
- * targets iff they count.
- */
- if (is_update_root
- && status->kind == svn_node_file
- && (copy_mode || ! is_harvest_root))
+ * targets iff they count. */
+ if (status->file_external && !is_harvest_root)
{
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1340836&r1=1340835&r2=1340836&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sun May 20 20:51:26 2012
@@ -1513,7 +1513,6 @@ svn_wc__node_get_commit_status(svn_boole
svn_revnum_t *revision,
svn_revnum_t *original_revision,
const char **original_repos_relpath,
- svn_boolean_t *update_root,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -1556,19 +1555,18 @@ svn_wc__node_get_commit_status(svn_boole
}
/* Retrieve some information from BASE which is needed for replacing
- and/or deleting BASE nodes. (We don't need lock here) */
+ and/or deleting BASE nodes. */
if (have_base
- && ((revision && !SVN_IS_VALID_REVNUM(*revision))
- || (update_root && status == svn_wc__db_status_normal)))
+ && !have_more_work
+ && op_root
+ && (revision && !SVN_IS_VALID_REVNUM(*revision)))
{
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, revision, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, update_root,
+ NULL, NULL, NULL,
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
}
- else if (update_root)
- *update_root = FALSE;
return SVN_NO_ERROR;
}