Author: rhuijben
Date: Thu Jan 15 08:51:47 2015
New Revision: 1651980
URL: http://svn.apache.org/r1651980
Log:
Resolve the issue identified in r1651963, by properly calculating the depth
of the location where the moved to information should be stored after another
move.
* subversion/libsvn_wc/wc_db.c
(delete_update_movedto): Make this assertion maintainer only, like other
similar checks in wc_db.c.
(delete_node): Fix depth calculation.
* subversion/tests/libsvn_wc/op-depth-test.c
(nested_move_delete): Reorder nodes, to make them easier to review.
(test_funcs): Remove XFail assumption from nested_move_delete.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1651980&r1=1651979&r2=1651980&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jan 15 08:51:47 2015
@@ -7594,7 +7594,11 @@ delete_update_movedto(svn_wc__db_wcroot_
op_depth,
new_moved_to_relpath));
SVN_ERR(svn_sqlite__update(&affected, stmt));
- assert(affected == 1);
+#ifdef SVN_DEBUG
+ /* Not fatal in release mode. The move recording is broken,
+ but the rest of the working copy can handle this. */
+ SVN_ERR_ASSERT(affected == 1);
+#endif
return SVN_NO_ERROR;
}
@@ -7984,7 +7988,12 @@ delete_node(void *baton,
child_relpath))
child_op_depth = delete_op_depth;
else
- child_op_depth = relpath_depth(child_relpath);
+ {
+ /* Calculate depth of the shadowing at the new
location */
+ child_op_depth = child_op_depth
+ - relpath_depth(local_relpath)
+ +
relpath_depth(b->moved_to_relpath);
+ }
fixup = TRUE;
}
Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1651980&r1=1651979&r2=1651980&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Jan 15
08:51:47 2015
@@ -9759,8 +9759,8 @@ nested_move_delete(const svn_test_opts_t
{2, "A/B/E/beta", "base-deleted", NO_COPY_FROM},
{0, "A/B/F", "normal", 1, "A/B/F"},
{2, "A/B/F", "base-deleted", NO_COPY_FROM},
- {2, "A/B/lambda", "base-deleted", NO_COPY_FROM, "A/Z/lambda"},
{0, "A/B/lambda", "normal", 1, "A/B/lambda"},
+ {2, "A/B/lambda", "base-deleted", NO_COPY_FROM, "A/Z/lambda"},
{0}
};
nodes_row_t nodes_AZ[] = {
@@ -9971,7 +9971,7 @@ static struct svn_test_descriptor_t test
"repo_wc_copy"),
SVN_TEST_OPTS_XFAIL(break_move_in_delete,
"break move in delete (issue 4491)"),
- SVN_TEST_OPTS_XFAIL(nested_move_delete,
+ SVN_TEST_OPTS_PASS(nested_move_delete,
"nested move delete"),
SVN_TEST_NULL
};