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 2013/02/22 12:50:20 UTC
svn commit: r1449003 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/commit_util.c
libsvn_client/copy.c libsvn_client/update.c libsvn_wc/node.c
Author: philip
Date: Fri Feb 22 11:50:19 2013
New Revision: 1449003
URL: http://svn.apache.org/r1449003
Log:
Different fix for issue 4111, update under add with not-present parent.
This reverts part of r1448784.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_is_not_present): Add base_only parameter.
* subversion/libsvn_client/update.c
(update_internal): Use new API to detect missing base nodes.
* subversion/libsvn_wc/node.c
(svn_wc__node_is_not_present): Add base_only parameter.
(svn_wc__node_get_base): Revert r1448784 fix.
* subversion/libsvn_client/commit_util.c
(harvest_not_present_for_copy): Adjust call.
* subversion/libsvn_client/copy.c
(verify_wc_dsts): Adjust call.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/commit_util.c
subversion/trunk/subversion/libsvn_client/copy.c
subversion/trunk/subversion/libsvn_client/update.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=1449003&r1=1449002&r2=1449003&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Fri Feb 22 11:50:19 2013
@@ -564,6 +564,8 @@ svn_wc__node_get_deleted_ancestor(const
* @a local_abspath has status svn_wc__db_status_excluded. Set
* @a *server_excluded to TRUE when @a local_abspath has status
* svn_wc__db_status_server_excluded. Otherwise set these values to FALSE.
+ * If @a base_only is TRUE then only the base node will be examined,
+ * otherwise the current base or working node will be examined.
*
* If a value is not interesting you can pass #NULL.
*
@@ -577,6 +579,7 @@ svn_wc__node_is_not_present(svn_boolean_
svn_boolean_t *server_excluded,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
+ svn_boolean_t base_only,
apr_pool_t *scratch_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=1449003&r1=1449002&r2=1449003&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Fri Feb 22 11:50:19 2013
@@ -483,7 +483,7 @@ harvest_not_present_for_copy(svn_wc_cont
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__node_is_not_present(¬_present, NULL, NULL, wc_ctx,
- this_abspath, scratch_pool));
+ this_abspath, FALSE, scratch_pool));
if (!not_present)
continue;
Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1449003&r1=1449002&r2=1449003&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Fri Feb 22 11:50:19 2013
@@ -410,7 +410,7 @@ verify_wc_dsts(const apr_array_header_t
SVN_ERR(svn_wc__node_is_not_present(&is_not_present, &is_excluded,
&is_server_excluded, ctx->wc_ctx,
- pair->dst_abspath_or_url,
+ pair->dst_abspath_or_url, FALSE,
iterpool));
if (is_excluded || is_server_excluded)
Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1449003&r1=1449002&r2=1449003&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Fri Feb 22 11:50:19 2013
@@ -213,6 +213,7 @@ update_internal(svn_revnum_t *result_rev
svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
SVN_CONFIG_CATEGORY_CONFIG,
APR_HASH_KEY_STRING) : NULL;
+ svn_boolean_t is_not_present, is_excluded, is_server_excluded;
if (result_rev)
*result_rev = SVN_INVALID_REVNUM;
@@ -229,6 +230,16 @@ update_internal(svn_revnum_t *result_rev
/* Check if our anchor exists in BASE. If it doesn't we can't update. */
SVN_ERR(svn_client__wc_node_get_base(&anchor_loc, anchor_abspath,
ctx->wc_ctx, pool, pool));
+ err = svn_wc__node_is_not_present(&is_not_present, &is_excluded,
+ &is_server_excluded,
+ ctx->wc_ctx, anchor_abspath, TRUE, pool);
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ is_not_present = TRUE; /* Causes the update to skip */
+ }
+ else
+ SVN_ERR(err);
/* It does not make sense to update conflict victims. */
err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
@@ -245,7 +256,8 @@ update_internal(svn_revnum_t *result_rev
SVN_ERR(err);
if (! anchor_loc
- || text_conflicted || prop_conflicted || tree_conflicted)
+ || text_conflicted || prop_conflicted || tree_conflicted
+ || is_not_present || is_excluded || is_server_excluded)
{
if (ctx->notify_func2)
{
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1449003&r1=1449002&r2=1449003&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Fri Feb 22 11:50:19 2013
@@ -576,17 +576,30 @@ svn_wc__node_is_not_present(svn_boolean_
svn_boolean_t *is_server_excluded,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
+ svn_boolean_t base_only,
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- SVN_ERR(svn_wc__db_read_info(&status,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
- wc_ctx->db, local_abspath,
- scratch_pool, scratch_pool));
+ if (base_only)
+ {
+ SVN_ERR(svn_wc__db_base_get_info(&status,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ wc_ctx->db, local_abspath,
+ scratch_pool, scratch_pool));
+ }
+ else
+ {
+ SVN_ERR(svn_wc__db_read_info(&status,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ wc_ctx->db, local_abspath,
+ scratch_pool, scratch_pool));
+ }
if (is_not_present)
*is_not_present = (status == svn_wc__db_status_not_present);
@@ -653,17 +666,15 @@ svn_wc__node_get_base(svn_revnum_t *revi
{
svn_error_t *err;
svn_wc__db_lock_t *lock;
- svn_wc__db_status_t status;
- err = svn_wc__db_base_get_info(&status, NULL, revision, repos_relpath,
+ err = svn_wc__db_base_get_info(NULL, NULL, revision, repos_relpath,
repos_root_url, repos_uuid, NULL,
NULL, NULL, NULL, NULL, NULL,
lock_token ? &lock : NULL,
NULL, NULL, NULL,
wc_ctx->db, local_abspath,
result_pool, scratch_pool);
- if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- || (!err && status == svn_wc__db_status_not_present))
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
{
svn_error_clear(err);
if (revision)