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 2013/07/01 18:53:35 UTC
svn commit: r1498564 - /subversion/trunk/subversion/libsvn_client/copy.c
Author: rhuijben
Date: Mon Jul 1 16:53:35 2013
New Revision: 1498564
URL: http://svn.apache.org/r1498564
Log:
Allow meta-data only moves to succeed when there is already an unversioned
file as the move target.
This 'fix-after-move' scenario is exactly one of the scenarios where this
option was added for.
Found via AnkhSVN user issue.
* subversion/libsvn_client/copy.c
(verify_wc_dsts): Add metadata_only argument and don't check for local
unversioned obstructions if it is set.
(verify_wc_srcs_and_dsts): Add metadata_only argument and update caller.
(repos_to_wc_copy_locked): Update caller.
(try_copy): Update caller.
Modified:
subversion/trunk/subversion/libsvn_client/copy.c
Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1498564&r1=1498563&r2=1498564&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Mon Jul 1 16:53:35 2013
@@ -385,6 +385,7 @@ static svn_error_t *
verify_wc_dsts(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
svn_boolean_t is_move,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -435,8 +436,11 @@ verify_wc_dsts(const apr_array_header_t
}
/* Check that there is no unversioned obstruction */
- SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind,
- iterpool));
+ if (metadata_only)
+ dst_kind = svn_node_none;
+ else
+ SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind,
+ iterpool));
if (dst_kind != svn_node_none)
{
@@ -527,6 +531,7 @@ static svn_error_t *
verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
svn_boolean_t is_move,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -557,7 +562,7 @@ verify_wc_srcs_and_dsts(const apr_array_
scratch_pool));
}
- SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, ctx,
+ SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, metadata_only, ctx,
result_pool, iterpool));
svn_pool_destroy(iterpool);
@@ -1727,8 +1732,8 @@ repos_to_wc_copy_locked(svn_boolean_t *t
/* We've already checked for physical obstruction by a working file.
But there could also be logical obstruction by an entry whose
working file happens to be missing.*/
- SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, ctx,
- scratch_pool, iterpool));
+ SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, FALSE /* metadata_only */,
+ ctx, scratch_pool, iterpool));
/* Decide whether the two repositories are the same or not. */
{
@@ -2210,7 +2215,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
if ((! srcs_are_urls) && (! dst_is_url))
{
SVN_ERR(verify_wc_srcs_and_dsts(copy_pairs, make_parents, is_move,
- ctx, pool, pool));
+ metadata_only, ctx, pool, pool));
/* Copy or move all targets. */
if (is_move)