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/10/10 10:14:40 UTC
svn commit: r1530872 - in /subversion/trunk/subversion:
libsvn_wc/wc_db_update_move.c tests/libsvn_wc/op-depth-test.c
Author: rhuijben
Date: Thu Oct 10 08:14:40 2013
New Revision: 1530872
URL: http://svn.apache.org/r1530872
Log:
Add op-depth test for issue #4436.
* subversion/tests/libsvn_wc/op-depth-test.c
(move_child_to_parent_revert): New function.
(test_funcs): Add move_child_to_parent_revert as XFail.
* subversion/libsvn_wc/wc_db_update_move.c
(svn_wc__db_resolve_break_moved_away_internal): Add assertion to avoid hard
to diagnose segfault from op-depth-tests.c on the next statement.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1530872&r1=1530871&r2=1530872&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Oct 10 08:14:40 2013
@@ -2442,6 +2442,10 @@ svn_wc__db_resolve_break_moved_away_inte
relpath_depth(local_relpath) - 1,
wcroot, local_relpath,
scratch_pool, scratch_pool));
+
+ SVN_ERR_ASSERT(move_src_op_root_relpath != NULL
+ && move_dst_op_root_relpath != NULL);
+
SVN_ERR(break_move(wcroot, local_relpath,
relpath_depth(move_src_op_root_relpath),
move_dst_op_root_relpath,
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=1530872&r1=1530871&r2=1530872&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Oct 10 08:14:40 2013
@@ -8262,6 +8262,44 @@ copy_mixed_rev_mods(const svn_test_opts_
return SVN_NO_ERROR;
}
+static svn_error_t *
+move_child_to_parent_revert(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_child_to_parent_revert", opts,
+ pool));
+
+ SVN_ERR(sbox_wc_mkdir(&b, "A"));
+ SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+ SVN_ERR(sbox_wc_commit(&b, ""));
+
+
+ SVN_ERR(sbox_wc_move(&b, "A/B", "B"));
+ SVN_ERR(sbox_wc_delete(&b, "A"));
+
+ /* Verify that the move is still recorded correctly */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 0, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM, "B"},
+
+ {1, "B", "normal", 1, "A/B", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(sbox_wc_revert(&b, "A", svn_depth_infinity));
+
+ return SVN_NO_ERROR;
+}
+
+
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -8419,5 +8457,7 @@ struct svn_test_descriptor_t test_funcs[
"move update with replaced parent (issue 4388)"),
SVN_TEST_OPTS_XFAIL(copy_mixed_rev_mods,
"copy mixed-rev with mods"),
+ SVN_TEST_OPTS_XFAIL(move_child_to_parent_revert,
+ "move child to parent and revert (issue 4436)"),
SVN_TEST_NULL
};