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 2010/11/25 15:27:24 UTC
svn commit: r1039061 -
/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
Author: philip
Date: Thu Nov 25 14:27:24 2010
New Revision: 1039061
URL: http://svn.apache.org/viewvc?rev=1039061&view=rev
Log:
Since SVN_WC__OP_DEPTH no longer elides copyfrom stop compensating for
missing elision in the test code.
* subversion/tests/libsvn_wc/op-depth-test.c
(compare_nodes_rows): Remove eliding code.
(wc_wc_copies, repo_wc_copies, test_delete_of_copies,
test_temp_op_make_copy): Add copyfrom info to expected values.
Modified:
subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
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=1039061&r1=1039060&r2=1039061&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Nov 25 14:27:24 2010
@@ -335,12 +335,6 @@ typedef struct {
* Append an error message to BATON->errors if they differ or are not both
* present.
*
- * If the FOUND row has field values that should have been elided
- * (because they match the parent row), then do so now. We want to ignore
- * any such lack of elision, for the purposes of these tests, because the
- * method of copying in use (at the time this tweak is introduced) does
- * calculate these values itself, it simply copies from the source rows.
- *
* Implements svn_hash_diff_func_t. */
static svn_error_t *
compare_nodes_rows(const void *key, apr_ssize_t klen,
@@ -350,37 +344,6 @@ compare_nodes_rows(const void *key, apr_
comparison_baton_t *b = baton;
nodes_row_t *expected = apr_hash_get(b->expected_hash, key, klen);
nodes_row_t *found = apr_hash_get(b->found_hash, key, klen);
- nodes_row_t elided;
-
- /* If the FOUND row has field values that should have been elided
- * (because they match the parent row), then do so now. */
- if (found && found->op_depth > 0 && found->repo_relpath)
- {
- const char *parent_relpath, *name, *parent_key;
- nodes_row_t *parent_found;
-
- svn_relpath_split(&parent_relpath, &name, found->local_relpath,
- b->scratch_pool);
- parent_key = apr_psprintf(b->scratch_pool, "%d %s",
- found->op_depth, parent_relpath);
- parent_found = apr_hash_get(b->found_hash, parent_key,
- APR_HASH_KEY_STRING);
- if (parent_found && parent_found->op_depth > 0
- && parent_found->repo_relpath
- && found->op_depth == parent_found->op_depth
- && found->repo_revnum == parent_found->repo_revnum
- && strcmp(found->repo_relpath,
- svn_relpath_join(parent_found->repo_relpath, name,
- b->scratch_pool)) == 0)
- {
- /* Iterating in hash order, which is arbitrary, so only make
- changes in a local copy */
- elided = *found;
- found = &elided;
- found->repo_relpath = NULL;
- found->repo_revnum = SVN_INVALID_REVNUM;
- }
- }
if (! expected)
{
@@ -536,8 +499,8 @@ wc_wc_copies(wc_baton_t *b)
/* base dir */
{ source_base_dir, "A/C/copy2", {
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* added file */
@@ -559,18 +522,18 @@ wc_wc_copies(wc_baton_t *b)
/* copied dir */
{ source_copied_dir, "A/C/copy6", {
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* copied tree with everything in it */
{ source_everything, "A/C/copy7", {
{ 3, "", "normal", 1, source_everything },
- { 3, "lambda", "normal", NO_COPY_FROM },
- { 3, "E", "normal", NO_COPY_FROM },
- { 3, "E/alpha", "normal", NO_COPY_FROM },
- { 3, "E/beta", "normal", NO_COPY_FROM },
- { 3, "F", "normal", NO_COPY_FROM },
+ { 3, "lambda", "normal", 1, "A/B/lambda" },
+ { 3, "E", "normal", 1, "A/B/E" },
+ { 3, "E/alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "E/beta", "normal", 1, "A/B/E/beta" },
+ { 3, "F", "normal", 1, "A/B/F" },
/* Each add is an op_root */
{ 4, "file-added", "normal", NO_COPY_FROM },
{ 4, "D-added", "normal", NO_COPY_FROM },
@@ -578,16 +541,16 @@ wc_wc_copies(wc_baton_t *b)
/* Each copied-copy subtree is an op_root */
{ 4, "lambda-copied", "normal", 1, source_base_file },
{ 4, "E-copied", "normal", 1, source_base_dir },
- { 4, "E-copied/alpha", "normal", NO_COPY_FROM },
- { 4, "E-copied/beta", "normal", NO_COPY_FROM }
+ { 4, "E-copied/alpha", "normal", 1, "A/B/E/alpha" },
+ { 4, "E-copied/beta", "normal", 1, "A/B/E/beta" }
} },
/* dir onto a schedule-delete file */
{ source_base_dir, "A/D/gamma", {
{ 0, "", "normal", 1, "A/D/gamma" },
{ 3, "", "normal", 1, source_base_dir },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM }
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" }
} },
/* file onto a schedule-delete dir */
@@ -658,8 +621,8 @@ repo_wc_copies(wc_baton_t *b)
/* dir onto nothing */
{ "A/B/E", "A/C/copy2", {
{ 3, "", "normal", 1, "A/B/E" },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* file onto a schedule-delete file */
@@ -678,16 +641,16 @@ repo_wc_copies(wc_baton_t *b)
{ 3, "pi", "base-deleted", NO_COPY_FROM },
{ 3, "rho", "base-deleted", NO_COPY_FROM },
{ 3, "tau", "base-deleted", NO_COPY_FROM },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* dir onto a schedule-delete file */
{ "A/B/E", "A/D/gamma", {
{ 0, "", "normal", 1, "A/D/gamma" },
{ 3, "", "normal", 1, "A/B/E" },
- { 3, "alpha", "normal", NO_COPY_FROM },
- { 3, "beta", "normal", NO_COPY_FROM },
+ { 3, "alpha", "normal", 1, "A/B/E/alpha" },
+ { 3, "beta", "normal", 1, "A/B/E/beta" },
} },
/* file onto a schedule-delete dir */
@@ -973,8 +936,8 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -984,12 +947,12 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 3, "A/B-copied/E", "normal", 1, "A/D/G" },
- { 3, "A/B-copied/E/pi", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/rho", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/tau", "normal", NO_COPY_FROM},
+ { 3, "A/B-copied/E/pi", "normal", 1, "A/D/G/pi" },
+ { 3, "A/B-copied/E/rho", "normal", 1, "A/D/G/rho" },
+ { 3, "A/B-copied/E/tau", "normal", 1, "A/D/G/tau" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -1000,12 +963,12 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 3, "A/B-copied/E", "normal", 1, "A/D/G" },
- { 3, "A/B-copied/E/pi", "normal", NO_COPY_FROM},
- { 3, "A/B-copied/E/rho", "not-present", NO_COPY_FROM},
- { 3, "A/B-copied/E/tau", "normal", NO_COPY_FROM},
+ { 3, "A/B-copied/E/pi", "normal", 1, "A/D/G/pi" },
+ { 3, "A/B-copied/E/rho", "not-present", 1, "A/D/G/rho" },
+ { 3, "A/B-copied/E/tau", "normal", 1, "A/D/G/tau" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -1016,8 +979,8 @@ test_delete_of_copies(const svn_test_opt
{
nodes_row_t rows[] = {
{ 2, "A/B-copied/E", "not-present", 1, "A/B/E" },
- { 2, "A/B-copied/E/alpha", "not-present", NO_COPY_FROM},
- { 2, "A/B-copied/E/beta", "not-present", NO_COPY_FROM},
+ { 2, "A/B-copied/E/alpha", "not-present", 1, "A/B/E/alpha" },
+ { 2, "A/B-copied/E/beta", "not-present", 1, "A/B/E/beta" },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
@@ -1641,9 +1604,9 @@ test_temp_op_make_copy(const svn_test_op
{ 2, "A/B/C", "base-deleted", NO_COPY_FROM },
{ 3, "A/B/C", "normal", NO_COPY_FROM },
{ 2, "A/F", "normal", 1, "S2" },
- { 2, "A/F/G", "normal", NO_COPY_FROM },
- { 2, "A/F/H", "not-present", NO_COPY_FROM },
- { 2, "A/F/E", "base-deleted", NO_COPY_FROM },
+ { 2, "A/F/G", "normal", 1, "S2/G" },
+ { 2, "A/F/H", "not-present", 1, "S2/H" },
+ { 2, "A/F/E", "base-deleted", 2, "A/F/E" },
{ 0 }
};
/* / norm -
@@ -1669,19 +1632,19 @@ test_temp_op_make_copy(const svn_test_op
{ 0, "A/X", "normal", 2, "A/X" },
{ 0, "A/X/Y", "incomplete", 2, "A/X/Y" },
{ 1, "A", "normal", 2, "A" },
- { 1, "A/B", "base-deleted", NO_COPY_FROM },
- { 1, "A/B/C", "base-deleted", NO_COPY_FROM },
- { 1, "A/F", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/G", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/H", "base-deleted", NO_COPY_FROM },
- { 1, "A/F/E", "base-deleted", NO_COPY_FROM },
- { 1, "A/X", "normal", NO_COPY_FROM },
- { 1, "A/X/Y", "incomplete", NO_COPY_FROM },
+ { 1, "A/B", "base-deleted", 2, "A/B" },
+ { 1, "A/B/C", "base-deleted", 2, "A/B/C" },
+ { 1, "A/F", "base-deleted", 2, "A/F" },
+ { 1, "A/F/G", "base-deleted", 2, "A/F/G" },
+ { 1, "A/F/H", "base-deleted", 2, "A/F/H" },
+ { 1, "A/F/E", "base-deleted", 2, "A/F/E" },
+ { 1, "A/X", "normal", 2, "A/X" },
+ { 1, "A/X/Y", "incomplete", 2, "A/X/Y" },
{ 2, "A/B", "normal", NO_COPY_FROM },
{ 3, "A/B/C", "normal", NO_COPY_FROM },
{ 2, "A/F", "normal", 1, "S2" },
- { 2, "A/F/G", "normal", NO_COPY_FROM },
- { 2, "A/F/H", "not-present", NO_COPY_FROM },
+ { 2, "A/F/G", "normal", 1, "S2/G" },
+ { 2, "A/F/H", "not-present", 1, "S2/H" },
{ 0 }
};