You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/12/18 18:36:29 UTC
svn commit: r1220465 [13/13] - in /subversion/branches/file-handle-cache: ./
build/ build/ac-macros/ contrib/client-side/emacs/
contrib/server-side/mod_dontdothat/ notes/
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/binding...
Modified: subversion/branches/file-handle-cache/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/subversion/tests/libsvn_wc/op-depth-test.c?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/file-handle-cache/subversion/tests/libsvn_wc/op-depth-test.c Sun Dec 18 17:36:24 2011
@@ -322,35 +322,50 @@ typedef struct nodes_row_t {
svn_revnum_t repo_revnum;
const char *repo_relpath;
svn_boolean_t file_external;
+ const char *moved_to;
+ svn_boolean_t moved_here;
} nodes_row_t;
/* Macro for filling in the REPO_* fields of a non-base NODES_ROW_T
* that has no copy-from info. */
#define NO_COPY_FROM SVN_INVALID_REVNUM, NULL
+#define MOVED_HERE FALSE, NULL, TRUE
/* Return a human-readable string representing ROW. */
static const char *
print_row(const nodes_row_t *row,
apr_pool_t *result_pool)
{
- const char *file_external_str;
+ const char *file_external_str, *moved_here_str, *moved_to_str;
if (row == NULL)
return "(null)";
+ if (row->moved_to)
+ moved_to_str = apr_psprintf(result_pool, ", to %s", row->moved_to);
+ else
+ moved_to_str = "";
+
+ if (row->moved_here)
+ moved_here_str = ", here";
+ else
+ moved_here_str = "";
+
if (row->file_external)
file_external_str = ", file-external";
else
file_external_str = "";
if (row->repo_revnum == SVN_INVALID_REVNUM)
- return apr_psprintf(result_pool, "%d, %s, %s%s",
+ return apr_psprintf(result_pool, "%d, %s, %s%s%s%s",
row->op_depth, row->local_relpath, row->presence,
+ moved_here_str, moved_to_str,
file_external_str);
else
- return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s",
+ return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s%s%s",
row->op_depth, row->local_relpath, row->presence,
row->repo_relpath, (int)row->repo_revnum,
+ moved_here_str, moved_to_str,
file_external_str);
}
@@ -393,7 +408,12 @@ compare_nodes_rows(const void *key, apr_
else if (expected->repo_revnum != found->repo_revnum
|| (strcmp_null(expected->repo_relpath, found->repo_relpath) != 0)
|| (strcmp_null(expected->presence, found->presence) != 0)
- || (expected->file_external != found->file_external))
+ || (expected->file_external != found->file_external)
+ || (expected->moved_here != found->moved_here)
+ || (expected->moved_to && !found->moved_to)
+ || (!expected->moved_to && found->moved_to)
+ || (expected->moved_to
+ && strcmp(expected->moved_to, found->moved_to)))
{
b->errors = svn_error_createf(
SVN_ERR_TEST_FAILED, b->errors,
@@ -423,7 +443,7 @@ check_db_rows(svn_test__sandbox_t *b,
svn_sqlite__stmt_t *stmt;
static const char *const statements[] = {
"SELECT op_depth, nodes.presence, nodes.local_relpath, revision,"
- " repos_path, file_external, def_local_relpath"
+ " repos_path, file_external, def_local_relpath, moved_to, moved_here"
" FROM nodes "
" LEFT OUTER JOIN externals"
" ON nodes.local_relpath = externals.local_relpath"
@@ -460,6 +480,8 @@ check_db_rows(svn_test__sandbox_t *b,
comparison_baton.errors
= svn_error_createf(SVN_ERR_TEST_FAILED, comparison_baton.errors,
"incomplete {%s}", print_row(row, b->pool));
+ row->moved_to = svn_sqlite__column_text(stmt, 7, b->pool);
+ row->moved_here = svn_sqlite__column_boolean(stmt, 8);
key = apr_psprintf(b->pool, "%d %s", row->op_depth, row->local_relpath);
apr_hash_set(found_hash, key, APR_HASH_KEY_STRING, row);
@@ -1691,9 +1713,9 @@ test_wc_move(const svn_test_opts_t *opts
{ 0, "", "normal", 1, "" },
{ 0, "A", "normal", 1, "A" },
{ 0, "A/B", "normal", 1, "A/B" },
- { 0, "A/B/C", "normal", 1, "A/B/C" },
+ { 0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/B/C-move" },
{ 3, "A/B/C", "base-deleted", NO_COPY_FROM },
- { 3, "A/B/C-move", "normal", 1, "A/B/C" },
+ { 3, "A/B/C-move", "normal", 1, "A/B/C", MOVED_HERE },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "", rows));
@@ -1704,14 +1726,14 @@ test_wc_move(const svn_test_opts_t *opts
nodes_row_t rows[] = {
{ 0, "", "normal", 1, "" },
{ 0, "A", "normal", 1, "A" },
- { 0, "A/B", "normal", 1, "A/B" },
- { 0, "A/B/C", "normal", 1, "A/B/C" },
+ { 0, "A/B", "normal", 1, "A/B", FALSE, "A/B-move" },
+ { 0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/B-move/C-move" },
{ 2, "A/B", "base-deleted", NO_COPY_FROM },
{ 2, "A/B/C", "base-deleted", NO_COPY_FROM },
- { 2, "A/B-move", "normal", 1, "A/B" },
- { 2, "A/B-move/C", "normal", 1, "A/B/C" },
+ { 2, "A/B-move", "normal", 1, "A/B", MOVED_HERE },
+ { 2, "A/B-move/C", "normal", 1, "A/B/C", MOVED_HERE },
{ 3, "A/B-move/C", "base-deleted", NO_COPY_FROM },
- { 3, "A/B-move/C-move", "normal", 1, "A/B/C" },
+ { 3, "A/B-move/C-move", "normal", 1, "A/B/C", MOVED_HERE },
{ 0 }
};
SVN_ERR(check_db_rows(&b, "", rows));
@@ -3146,7 +3168,9 @@ test_shadowed_update(const svn_test_opts
SVN_ERR(wc_update(&b, "", 2));
SVN_ERR(wc_copy(&b, "A", "A_tmp"));
SVN_ERR(wc_update(&b, "", 1));
- SVN_ERR(wc_move(&b, "A_tmp", "A"));
+ SVN_ERR(wc_move(&b, "A_tmp", "A")); /* ### XFAIL: sets moved-here on
+ A but A_tmp is removed and so
+ does not have moved-to. */
SVN_ERR(wc_mkdir(&b, "K"));
SVN_ERR(wc_mkdir(&b, "K/L"));
@@ -3720,6 +3744,730 @@ incomplete_switch(const svn_test_opts_t
return SVN_NO_ERROR;
}
+static svn_error_t *
+nested_moves_child_first(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_first", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A/B/C", "A/B/C2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/B/C2"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {3, "A/B/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/B2/C2"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A/B2/C", "base-deleted", NO_COPY_FROM},
+ {3, "A/B2/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A2/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A2/B2/C2"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+ {3, "A2/B2/C2","normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Revert should leave the A to A2 move */
+ SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+ SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_moves_child_last(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_last", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A2/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A2/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A2/B2/C2"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+ {3, "A2/B2/C2","normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Revert should leave the A to A2 move */
+ SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+ SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_copy(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_in_copy", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+ SVN_ERR(wc_copy(&b, "A", "A2"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {1, "A2", "normal", 1, "A"},
+ {1, "A2/B", "normal", 1, "A/B"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A2/B", "A2/B2")); /* ### Moved-here gets recorded, but
+ not moved-to. */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {1, "A2", "normal", 1, "A"},
+ {1, "A2/B", "normal", 1, "A/B"},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_replace(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_in_replace", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "X"));
+ SVN_ERR(wc_mkdir(&b, "X/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+ SVN_ERR(wc_delete(&b, "A"));
+ SVN_ERR(wc_copy(&b, "X", "A"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A/B", "A/B2")); /* ### Moved-to gets recorded on A/B
+ at op-depth=0, that's not the node
+ that got moved. */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B2", "normal", 1, "X/B", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+copy_a_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "copy_a_move", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ SVN_ERR(wc_move(&b, "A/B/C", "A/C2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/C2"},
+ {2, "A/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+ /* Copying a move doesn't copy any moved-to/here artifacts, which
+ means that moving inside a copy is not the same as copying
+ something that contains a move? Is this behaviour correct? */
+ SVN_ERR(wc_copy(&b, "A", "A2"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A/C2"},
+ {2, "A/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A"},
+ {1, "A2/B", "normal", 1, "A/B"},
+ {1, "A2/B/C", "normal", 1, "A/B/C"},
+ {2, "A2/C2", "normal", 1, "A/B/C"},
+ {3, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_to_swap(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_to_swap", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "X"));
+ SVN_ERR(wc_mkdir(&b, "X/Y"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A/B", "X/B"));
+ SVN_ERR(wc_move(&b, "X/Y", "A/Y"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "X/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/Y", "normal", 1, "X/Y", FALSE, "A/Y"},
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {2, "X/Y", "base-deleted", NO_COPY_FROM},
+ {2, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ SVN_ERR(wc_move(&b, "X", "A"));
+ SVN_ERR(wc_move(&b, "A2", "X"));
+
+ /* Is this correct or should A/Y and X/B at op-depth=1 be marked
+ moved-here? */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "X"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A/B"},
+ {0, "X", "normal", 1, "X", FALSE, "A"},
+ {0, "X/Y", "normal", 1, "X/Y", FALSE, "X/Y"},
+ {1, "A", "normal", 1, "X", MOVED_HERE},
+ {1, "A/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/Y", "base-deleted", NO_COPY_FROM},
+ {2, "A/Y", "base-deleted", NO_COPY_FROM},
+ {2, "X/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B", "normal", 1, "A/B", MOVED_HERE},
+ {2, "X/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* Revert and try in different order */
+ SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ SVN_ERR(wc_move(&b, "X", "A"));
+ SVN_ERR(wc_move(&b, "A2", "X"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "X"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X", FALSE, "A"},
+ {0, "X/Y", "normal", 1, "X/Y"},
+ {1, "A", "normal", 1, "X", MOVED_HERE},
+ {1, "A/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/Y", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ SVN_ERR(wc_move(&b, "A/Y", "X/Y"));
+ SVN_ERR(wc_move(&b, "X/B", "A/B"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "X"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A/B"},
+ {0, "X", "normal", 1, "X", FALSE, "A"},
+ {0, "X/Y", "normal", 1, "X/Y", FALSE, "X/Y"},
+ {1, "A", "normal", 1, "X", MOVED_HERE},
+ {1, "A/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "X", "normal", 1, "A", MOVED_HERE},
+ {1, "X/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "X/Y", "base-deleted", NO_COPY_FROM},
+ {2, "A/Y", "base-deleted", NO_COPY_FROM},
+ {2, "X/B", "base-deleted", NO_COPY_FROM},
+ {2, "A/B", "normal", 1, "A/B", MOVED_HERE},
+ {2, "X/Y", "normal", 1, "X/Y", MOVED_HERE},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+revert_nested_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+ nodes_row_t nodes_A_moved[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ nodes_row_t nodes_AB_moved[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A2/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+ nodes_row_t nodes_ABC_moved[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "A2/B2"},
+ {0, "A/B/C", "normal", 1, "A/B/C", FALSE, "A2/B2/C2"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A2/B/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {2, "A2/B", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B/C", "base-deleted", NO_COPY_FROM},
+ {2, "A2/B2", "normal", 1, "A/B", MOVED_HERE},
+ {2, "A2/B2/C", "normal", 1, "A/B/C", MOVED_HERE},
+ {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+ {3, "A2/B2/C2", "normal", 1, "A/B/C", MOVED_HERE},
+ {0}
+ };
+
+ SVN_ERR(svn_test__sandbox_create(&b, "revert_nested_move", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+ SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+ SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
+
+ SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+ SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
+ SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+ SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+ SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+ SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+ SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
+ SVN_ERR(wc_revert(&b, "A2/B2/C", svn_depth_infinity));
+ SVN_ERR(wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
+
+ SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+ SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+ SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_on_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_on_move", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "X"));
+ SVN_ERR(wc_mkdir(&b, "X/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A/B", "B2"));
+ SVN_ERR(wc_delete(&b, "A"));
+ SVN_ERR(wc_copy(&b, "X", "A"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "B2"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "B2", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* A/B to B2 is already recorded in A/B but the copy has given us
+ another A/B that we can move. A second move overwites the first
+ move stored in A/B even though it's a different node being moved,
+ and that breaks the recording of the move to B2. */
+ SVN_ERR(wc_move(&b, "A/B", "B3"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A"},
+ {0, "A/B", "normal", 1, "A/B", FALSE, "B2"}, /* XFAIL */
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "B2", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B3", "normal", 1, "X/B", MOVED_HERE},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"}, /* moved_to=B3? */
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_on_move2(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_on_move2", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_mkdir(&b, "X"));
+ SVN_ERR(wc_mkdir(&b, "X/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ SVN_ERR(wc_delete(&b, "A"));
+ SVN_ERR(wc_copy(&b, "X", "A"));
+
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ /* A/B is already moved to A2/B but there is no explicit moved_to,
+ we derive it from A. The copy has given us another A/B that we
+ can move doing so stores explicit moved_to in A/B that breaks the
+ recording of the first move to A2/B. */
+ SVN_ERR(wc_move(&b, "A/B", "B3"));
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"}, /* XFAIL */
+ {0, "X", "normal", 1, "X"},
+ {0, "X/B", "normal", 1, "X/B"},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {1, "B3", "normal", 1, "X/B", MOVED_HERE},
+ {1, "A", "normal", 1, "X"},
+ {1, "A/B", "normal", 1, "X/B"}, /* moved_to=B3? */
+ {2, "A/B", "base-deleted", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_added(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ svn_test__sandbox_t b;
+
+ SVN_ERR(svn_test__sandbox_create(&b, "move_added", opts, pool));
+
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ SVN_ERR(wc_commit(&b, ""));
+ SVN_ERR(wc_update(&b, "", 1));
+
+ SVN_ERR(wc_mkdir(&b, "A/B/C"));
+ SVN_ERR(wc_move(&b, "A", "A2"));
+ SVN_ERR(wc_mkdir(&b, "A2/B/C2"));
+
+ /* Both A2/B/C and A2/B/C2 are simple adds inside the move. It
+ doesn't seem right for A2/B/C to be marked moved_here. */
+ {
+ nodes_row_t nodes[] = {
+ {0, "", "normal", 1, ""},
+ {0, "A", "normal", 1, "A", FALSE, "A2"},
+ {0, "A/B", "normal", 1, "A/B"},
+ {1, "A", "base-deleted", NO_COPY_FROM},
+ {1, "A/B", "base-deleted", NO_COPY_FROM},
+ {1, "A2", "normal", 1, "A", MOVED_HERE},
+ {1, "A2/B", "normal", 1, "A/B", MOVED_HERE},
+ {3, "A2/B/C", "normal", NO_COPY_FROM}, /* XFAIL */
+ {3, "A2/B/C2", "normal", NO_COPY_FROM},
+ {0}
+ };
+ SVN_ERR(check_db_rows(&b, "", nodes));
+ }
+
+ return SVN_NO_ERROR;
+}
+
+
+
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -3766,7 +4514,7 @@ struct svn_test_descriptor_t test_funcs[
"test_op_delete"),
SVN_TEST_OPTS_PASS(test_child_replace_with_same_origin,
"test_child_replace_with_same"),
- SVN_TEST_OPTS_PASS(test_shadowed_update,
+ SVN_TEST_OPTS_XFAIL(test_shadowed_update,
"test_shadowed_update"),
SVN_TEST_OPTS_PASS(test_copy_of_deleted,
"test_copy_of_deleted (issue #3873)"),
@@ -3788,5 +4536,25 @@ struct svn_test_descriptor_t test_funcs[
"test_wc_wc_copy_absent"),
SVN_TEST_OPTS_PASS(incomplete_switch,
"incomplete_switch (issue 4040)"),
+ SVN_TEST_OPTS_PASS(nested_moves_child_first,
+ "nested_moves_child_first"),
+ SVN_TEST_OPTS_PASS(nested_moves_child_last,
+ "nested_moves_child_last"),
+ SVN_TEST_OPTS_XFAIL(move_in_copy,
+ "move_in_copy"),
+ SVN_TEST_OPTS_XFAIL(move_in_replace,
+ "move_in_replace"),
+ SVN_TEST_OPTS_PASS(copy_a_move,
+ "copy_a_move"),
+ SVN_TEST_OPTS_PASS(move_to_swap,
+ "move_to_swap"),
+ SVN_TEST_OPTS_PASS(revert_nested_move,
+ "revert_nested_move"),
+ SVN_TEST_OPTS_XFAIL(move_on_move,
+ "move_on_move"),
+ SVN_TEST_OPTS_XFAIL(move_on_move2,
+ "move_on_move2"),
+ SVN_TEST_OPTS_XFAIL(move_added,
+ "move_added"),
SVN_TEST_NULL
};
Modified: subversion/branches/file-handle-cache/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/client-side/svnmucc/svnmucc.c?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/file-handle-cache/tools/client-side/svnmucc/svnmucc.c Sun Dec 18 17:36:24 2011
@@ -109,6 +109,7 @@ create_ra_callbacks(svn_ra_callbacks2_t
const char *username,
const char *password,
const char *config_dir,
+ svn_config_t *cfg_config,
svn_boolean_t non_interactive,
svn_boolean_t no_auth_cache,
apr_pool_t *pool)
@@ -119,7 +120,8 @@ create_ra_callbacks(svn_ra_callbacks2_t
non_interactive,
username, password, config_dir,
no_auth_cache,
- FALSE, NULL, NULL, NULL, pool));
+ FALSE /* trust_server_certs */,
+ cfg_config, NULL, NULL, pool));
(*callbacks)->open_tmp_file = open_tmp_file;
@@ -629,13 +631,17 @@ execute(const apr_array_header_t *action
struct operation root;
svn_error_t *err;
apr_hash_t *config;
+ svn_config_t *cfg_config;
int i;
SVN_ERR(svn_config_get_config(&config, config_dir, pool));
SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
"svnmucc: ", "--config-option"));
+ cfg_config = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
+ APR_HASH_KEY_STRING);
SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password, config_dir,
- non_interactive, no_auth_cache, pool));
+ cfg_config, non_interactive, no_auth_cache,
+ pool));
SVN_ERR(svn_ra_open4(&session, NULL, anchor, NULL, ra_callbacks,
NULL, config, pool));
Modified: subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/cronjob
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/cronjob?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/cronjob (original)
+++ subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/cronjob Sun Dec 18 17:36:24 2011
@@ -58,7 +58,7 @@ if [ "$?" -ne "0" ]; then
echo "$subject"
else
- rev="$(svn info /home/neels/pat/trunk/src | grep Revision)"
+ rev="$(/home/neels/pat/stable/prefix/bin/svn info /home/neels/pat/trunk/src | grep Revision)"
if [ -z "$rev" ]; then
subject="Working copy problem."
echo "$subject" > "$results"
Modified: subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/run
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/run?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/run (original)
+++ subversion/branches/file-handle-cache/tools/dev/benchmarks/suite1/run Sun Dec 18 17:36:24 2011
@@ -18,17 +18,10 @@
# under the License.
# Where are the svn binaries you want to benchmark?
-if [ "$USER" = "neels" ]; then
- SVN_A_NAME="1.7.x"
- SVN_A="$HOME/pat/bench/prefix/bin/svn"
- SVN_B_NAME="trunk"
- SVN_B="$HOME/pat/trunk/prefix/bin/svn"
-else
- SVN_A_NAME="1.6"
- SVN_A="$HOME/src/svn-1.6.x/subversion/svn/svn"
- SVN_B_NAME="trunk"
- SVN_B="$HOME/src/svn/subversion/svn/svn"
-fi
+SVN_A_NAME="1.7.x"
+SVN_A="$HOME/pat/bench/prefix/bin/svn"
+SVN_B_NAME="trunk"
+SVN_B="$HOME/pat/trunk/prefix/bin/svn"
benchmark="$PWD/benchmark.py"
@@ -71,6 +64,11 @@ cs=100
started="$(date)"
echo "Started at $started"
+echo "
+*Disclaimer:* this tests only file://-URL access on a GNU/Linux VM.
+This is intended to measure changes in performance of the local working
+copy layer, *only*. These results are *not* generally true for everyone."
+
batch $al $as $N
batch $bl $bs $N
batch $cl $cs $N
Modified: subversion/branches/file-handle-cache/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/dev/unix-build/Makefile.svn?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/file-handle-cache/tools/dev/unix-build/Makefile.svn Sun Dec 18 17:36:24 2011
@@ -1352,7 +1352,8 @@ endif
.PHONY: libpath
libpath:
- @echo export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH
+ @echo export LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
+ "PYTHONPATH=$(SVN_PREFIX)/lib/svn-python"
.PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
Modified: subversion/branches/file-handle-cache/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/dist/backport.pl?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/dist/backport.pl (original)
+++ subversion/branches/file-handle-cache/tools/dist/backport.pl Sun Dec 18 17:36:24 2011
@@ -68,12 +68,12 @@ sub merge {
if ($entry{branch}) {
# NOTE: This doesn't escape the branch into the pattern.
- $pattern = printf '^ [*] %s branch\|Branch:\n *%s', $entry{branch}, $entry{branch};
+ $pattern = sprintf '\V\(%s branch\|branches\/%s\|Branch:\n *%s\)', $entry{branch}, $entry{branch}, $entry{branch};
$mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
print $logmsg_fh "Reintergrate the $entry{header}:";
print $logmsg_fh "";
} elsif (@{$entry{revisions}}) {
- $pattern = 'r' . $entry{revisions}->[0];
+ $pattern = '^ [*] \V' . 'r' . $entry{revisions}->[0];
$mergeargs = join " ", (map { "-c$_" } @{$entry{revisions}}), '^/subversion/trunk';
if (@{$entry{revisions}} > 1) {
print $logmsg_fh "Merge the $entry{header} from trunk:";
@@ -88,7 +88,6 @@ sub merge {
print $logmsg_fh $_ for @{$entry{entry}};
close $logmsg_fh or die "Can't close $logmsg_filename: $!";
- $pattern = '\V'.$pattern;
my $script = <<"EOF";
#!/bin/sh
set -e
@@ -96,7 +95,7 @@ $SVN diff > $backupfile
$SVN revert -R .
$SVN up
$SVN merge $mergeargs
-$VIM -e -s -n -N -i NONE -u NONE -c '/^ [*] $pattern/normal! dap' -c wq $STATUS
+$VIM -e -s -n -N -i NONE -u NONE -c '/$pattern/normal! dap' -c wq $STATUS
if $WET_RUN; then
$SVN commit -F $logmsg_filename
else
@@ -109,8 +108,7 @@ EOF
$script .= <<"EOF" if $entry{branch};
reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
if $WET_RUN; then
- $SVN rm $BRANCHES/$entry{branch}\
- -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+ $SVN rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
else
echo "Removing reintegrated '$entry{branch}' branch"
fi
@@ -205,11 +203,13 @@ sub main {
usage, exit 0 if @ARGV;
usage, exit 1 unless -r $STATUS;
+ my $sawapproved;
@ARGV = $STATUS;
while (<>) {
my @lines = split /\n/;
# Section header?
+ next unless $sawapproved ||= /^Approved changes/;
print "\n\n=== $lines[0]" and next if $lines[0] =~ /^[A-Z].*:$/i;
# Backport entry?
Modified: subversion/branches/file-handle-cache/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/dist/dist.sh?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/dist/dist.sh (original)
+++ subversion/branches/file-handle-cache/tools/dist/dist.sh Sun Dec 18 17:36:24 2011
@@ -265,15 +265,14 @@ ver_minor=`echo $VERSION | cut -d '.' -f
ver_patch=`echo $VERSION | cut -d '.' -f 3`
vsn_file="$DISTPATH/subversion/include/svn_version.h"
-
-if [ "$VERSION" != "trunk" ]; then
+if [ "$VERSION" != "trunk" ] && [ "$VERSION" != "nightly" ]; then
sed \
- -e "/#define *SVN_VER_MAJOR/s/[0-9]\\+/$ver_major/" \
- -e "/#define *SVN_VER_MINOR/s/[0-9]\\+/$ver_minor/" \
- -e "/#define *SVN_VER_PATCH/s/[0-9]\\+/$ver_patch/" \
+ -e "/#define *SVN_VER_MAJOR/s/[0-9][0-9]*/$ver_major/" \
+ -e "/#define *SVN_VER_MINOR/s/[0-9][0-9]*/$ver_minor/" \
+ -e "/#define *SVN_VER_PATCH/s/[0-9][0-9]*/$ver_patch/" \
-e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
-e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
- -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
+ -e "/#define *SVN_VER_REVISION/s/[0-9][0-9]*/$REVISION/" \
< "$vsn_file" > "$vsn_file.tmp"
else
# Don't munge the version number if we are creating a nightly trunk tarball
@@ -283,7 +282,6 @@ else
-e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
< "$vsn_file" > "$vsn_file.tmp"
fi
-
mv -f "$vsn_file.tmp" "$vsn_file"
echo "Creating svn_version.h.dist, for use in tagging matching tarball..."
Propchange: subversion/branches/file-handle-cache/tools/server-side/mod_dontdothat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 18 17:36:24 2011
@@ -0,0 +1,2 @@
+*.slo
+.libs
Modified: subversion/branches/file-handle-cache/tools/server-side/svnauthz-validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/server-side/svnauthz-validate.c?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/server-side/svnauthz-validate.c (original)
+++ subversion/branches/file-handle-cache/tools/server-side/svnauthz-validate.c Sun Dec 18 17:36:24 2011
@@ -40,10 +40,12 @@ main(int argc, const char **argv)
svn_authz_t *authz;
const char *authz_file;
- if (argc <= 1)
+ if (argc != 2 && argc != 4 && argc != 5)
{
- printf("Usage: %s PATH \n\n", argv[0]);
- printf("Loads the authz file at PATH and validates its syntax. \n"
+ printf("Usage: %s FILE [USER PATH [REPOS_NAME]]\n\n", argv[0]);
+ printf("Loads the authz file at FILE and validates its syntax.\n"
+ "Optionally reports the access available to USER for PATH in\n"
+ "repository REPOS_NAME.\n"
"Returns:\n"
" 0 when syntax is OK.\n"
" 1 when syntax is invalid.\n"
@@ -62,6 +64,31 @@ main(int argc, const char **argv)
/* Read the access file and validate it. */
err = svn_repos_authz_read(&authz, authz_file, TRUE, pool);
+ if (!err && (argc == 4 || argc == 5))
+ {
+ const char *user = argv[2], *path = argv[3];
+ const char *repos = argc == 5 ? argv[4] : "";
+ svn_boolean_t read_access, write_access;
+
+ if (path[0] != '/')
+ path = apr_pstrcat(pool, "/", path, NULL);
+
+ err = svn_repos_authz_check_access(authz, repos, path, user,
+ svn_authz_write, &write_access,
+ pool);
+ if (!write_access && !err)
+ err = svn_repos_authz_check_access(authz, repos, path, user,
+ svn_authz_read, &read_access,
+ pool);
+ if (!err)
+ printf("user '%s' has %s access to '%s'%s%s\n",
+ user,
+ write_access ? "rw" : read_access ? "r" : "no",
+ path,
+ repos[0] ? "in repository " : "",
+ repos);
+ }
+
svn_pool_destroy(pool);
if (err)
Modified: subversion/branches/file-handle-cache/tools/server-side/svnpredumpfilter.py
URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/tools/server-side/svnpredumpfilter.py?rev=1220465&r1=1220464&r2=1220465&view=diff
==============================================================================
--- subversion/branches/file-handle-cache/tools/server-side/svnpredumpfilter.py (original)
+++ subversion/branches/file-handle-cache/tools/server-side/svnpredumpfilter.py Sun Dec 18 17:36:24 2011
@@ -33,6 +33,7 @@ log -vq' when run against the root of th
will be filtered by a user with universal read access to the
repository's data. Do not use the --use-merge-history (-g) or
--stop-on-copy when generating this revision log stream.
+Use the default ordering of revisions (that is, '-r HEAD:0').
Return errorcode 0 if there are no additional dependencies found, 1 if
there were; any other errorcode indicates a fatal error.