You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/11/05 14:23:01 UTC
svn commit: r1031554 [2/2] - in /subversion/branches/issue-3668-3669: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/
subversion/bi...
Modified: subversion/branches/issue-3668-3669/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/tests/cmdline/info_tests.py?rev=1031554&r1=1031553&r2=1031554&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/issue-3668-3669/subversion/tests/cmdline/info_tests.py Fri Nov 5 13:23:00 2010
@@ -285,6 +285,39 @@ def info_on_mkdir(sbox):
('depth', {}, 'infinity'),
('schedule', {}, 'add')])
+def info_wcroot_abspaths(sbox):
+ """wc root paths in 'svn info' output"""
+
+ def check_wcroot_paths(lines, wcroot_abspath):
+ "check that paths found on input lines beginning 'Path: ' are as expected"
+ path = None
+ target = None
+ for line in lines:
+ if line.startswith('Path: '):
+ target = line[6:].rstrip()
+ if line.startswith('Working Copy Root Path: '):
+ path = line[24:].rstrip()
+ if target is not None and path is not None:
+ break
+
+ if target is None:
+ target = "(UNKNOWN)"
+
+ if path is None:
+ print "No WC root path for '%s'" % (target)
+ raise svntest.Failure
+
+ if path != wcroot_abspath:
+ print("For target '%s'..." % (target))
+ print(" Reported WC root path: %s" % (path))
+ print(" Expected WC root path: %s" % (wcroot_abspath))
+ raise svntest.Failure
+
+ sbox.build(read_only=True)
+ exit_code, output, errput = svntest.main.run_svn(None, 'info', '-R', sbox.wc_dir)
+ check_wcroot_paths(output, os.path.abspath(sbox.wc_dir))
+
+
########################################################################
# Run the tests
@@ -293,6 +326,7 @@ test_list = [ None,
info_with_tree_conflicts,
info_on_added_file,
info_on_mkdir,
+ info_wcroot_abspaths,
]
if __name__ == '__main__':
Modified: subversion/branches/issue-3668-3669/subversion/tests/cmdline/input_validation_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/tests/cmdline/input_validation_tests.py?rev=1031554&r1=1031553&r2=1031554&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/branches/issue-3668-3669/subversion/tests/cmdline/input_validation_tests.py Fri Nov 5 13:23:00 2010
@@ -201,6 +201,13 @@ def invalid_lock_targets(sbox):
run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working "
"copy targets", 'lock', target1, target2)
+def invalid_status_targets(sbox):
+ "non-working copy paths for 'status'"
+ sbox.build(read_only=True)
+ for target in _invalid_wc_path_targets:
+ run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'status',
+ target)
+
########################################################################
# Run the tests
@@ -223,6 +230,7 @@ test_list = [ None,
invalid_resolved_targets,
invalid_revert_targets,
invalid_lock_targets,
+ invalid_status_targets,
]
if __name__ == '__main__':
Modified: subversion/branches/issue-3668-3669/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/tests/cmdline/schedule_tests.py?rev=1031554&r1=1031553&r2=1031554&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/issue-3668-3669/subversion/tests/cmdline/schedule_tests.py Fri Nov 5 13:23:00 2010
@@ -522,7 +522,7 @@ def revert_inside_newly_added_dir(sbox):
# Now change into the newly added directory, revert and make sure
# no error is output.
os.chdir('foo')
- sbox.simple_revert('.')
+ svntest.main.run_svn(None, 'revert', '.')
#----------------------------------------------------------------------
# Regression test for issue #1609:
Modified: subversion/branches/issue-3668-3669/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/tests/cmdline/svntest/sandbox.py?rev=1031554&r1=1031553&r2=1031554&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/issue-3668-3669/subversion/tests/cmdline/svntest/sandbox.py Fri Nov 5 13:23:00 2010
@@ -195,16 +195,10 @@ class Sandbox:
def simple_rm(self, *targets):
assert len(targets) > 0
- if len(targets) == 1 and is_url(targets[0]):
- assert not self.read_only
- targets = ('-m', svntests.main.make_log_msg(), targets[0])
svntest.main.run_svn(False, 'rm', *targets)
def simple_mkdir(self, *targets):
assert len(targets) > 0
- if len(targets) == 1 and is_url(targets[0]):
- assert not self.read_only
- targets = ('-m', svntests.main.make_log_msg(), targets[0])
svntest.main.run_svn(False, 'mkdir', *targets)
def simple_add(self, *targets):
Modified: subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/op-depth-test.c?rev=1031554&r1=1031553&r2=1031554&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/op-depth-test.c Fri Nov 5 13:23:00 2010
@@ -200,6 +200,21 @@ wc_commit(wc_baton_t *b, const char *pat
NULL, NULL, NULL, NULL, ctx, b->pool);
}
+static svn_error_t *
+wc_update(wc_baton_t *b, const char *path, svn_revnum_t revnum)
+{
+ svn_client_ctx_t *ctx;
+ apr_array_header_t *result_revs;
+ apr_array_header_t *paths = apr_array_make(b->pool, 1,
+ sizeof(const char *));
+ svn_opt_revision_t revision = { svn_opt_revision_number, { revnum } };
+
+ APR_ARRAY_PUSH(paths, const char *) = wc_path(b, path);
+ SVN_ERR(svn_client_create_context(&ctx, b->pool));
+ return svn_client_update3(&result_revs, paths, &revision, svn_depth_infinity,
+ TRUE, FALSE, FALSE, ctx, b->pool);
+}
+
/* Create the Greek tree on disk in the WC, and commit it. */
static svn_error_t *
add_and_commit_greek_tree(wc_baton_t *b)
@@ -956,6 +971,52 @@ test_repo_wc_copies(const svn_test_opts_
return repo_wc_copies(&b);
}
+static svn_error_t *
+test_delete_with_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+ wc_baton_t b;
+
+ b.pool = pool;
+ SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+ "delete_with_update", opts, pool));
+ SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_commit(&b, ""));
+ 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_delete(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A"));
+ SVN_ERR(wc_mkdir(&b, "A/B"));
+ {
+ nodes_row_t rows[] = {
+ { 0, "A", "normal", 1, "A"},
+ { 1, "A", "normal", NO_COPY_FROM},
+ { 2, "A/B", "normal", NO_COPY_FROM},
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "A", rows));
+ }
+ SVN_ERR(wc_update(&b, "", 2));
+ {
+ nodes_row_t rows[] = {
+ { 0, "A", "normal", 2, "A"},
+ { 0, "A/B", "normal", 2, "A/B"},
+ { 0, "A/B/C", "normal", 2, "A/B/C"},
+ { 1, "A", "normal", NO_COPY_FROM},
+ { 1, "A/B", "base-deleted", NO_COPY_FROM},
+ { 1, "A/B/C", "base-deleted", NO_COPY_FROM},
+ { 2, "A/B", "normal", NO_COPY_FROM},
+ { 0 }
+ };
+ SVN_ERR(check_db_rows(&b, "A", rows));
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* ---------------------------------------------------------------------- */
/* The list of test functions */
@@ -983,5 +1044,8 @@ struct svn_test_descriptor_t test_funcs[
SVN_TEST_OPTS_WIMP(test_repo_wc_copies,
"test_repo_wc_copies",
"needs op_depth"),
+ SVN_TEST_OPTS_WIMP(test_delete_with_update,
+ "test_test_delete_with_update",
+ "needs op_depth"),
SVN_TEST_NULL
};