Author: neels
Date: Thu Apr 22 00:50:18 2010
New Revision: 936586
URL: http://svn.apache.org/viewvc?rev=936586&view=rev
Log:
Follow-up on r935095, r936464.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_get_commit_base_rev): Tweak comment.
* subversion/libsvn_wc/node.c
(svn_wc__node_get_commit_base_rev):
Properly match older behaviour by returning the revert-base for plain
deletes and replaces (non-copy/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=936586&r1=936585&r2=936586&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Apr 22
00:50:18 2010
@@ -478,8 +478,8 @@ svn_wc__node_get_base_rev(svn_revnum_t *
* return the revision of the copy/move source. Do the same even when the node
* has been removed from a recursive copy (subpath excluded from the copy).
*
- * If this node is locally added or replaced and is not moved-here or
- * copied-here, return SVN_INVALID_REVNUM.
+ * Else, if this node is locally added, return SVN_INVALID_REVNUM, or if this
+ * node is locally deleted or replaced, return the revert-base revision.
*/
svn_error_t *
svn_wc__node_get_commit_base_rev(svn_revnum_t *base_revision,
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=936586&r1=936585&r2=936586&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Apr 22 00:50:18 2010
@@ -633,12 +633,13 @@ svn_wc__node_get_commit_base_rev(svn_rev
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
+ svn_boolean_t base_shadowed;
SVN_ERR(svn_wc__db_read_info(&status, NULL,
commit_base_revision,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, &base_shadowed, NULL, NULL,
wc_ctx->db, local_abspath, scratch_pool,
scratch_pool));
@@ -656,6 +657,13 @@ svn_wc__node_get_commit_base_rev(svn_rev
NULL, NULL, commit_base_revision,
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
+
+ if (! SVN_IS_VALID_REVNUM(*commit_base_revision) && base_shadowed)
+ /* It is a replace that does not feature a copy/move-here.
+ Return the revert-base revision. */
+ return svn_wc__node_get_base_rev(commit_base_revision,
+ wc_ctx, local_abspath,
+ scratch_pool);
}
else if (status == svn_wc__db_status_deleted)
{