Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 016BD17F7B for ; Tue, 3 Feb 2015 13:15:21 +0000 (UTC) Received: (qmail 86827 invoked by uid 500); 3 Feb 2015 13:15:21 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 86791 invoked by uid 500); 3 Feb 2015 13:15:21 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 86762 invoked by uid 99); 3 Feb 2015 13:15:21 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 13:15:21 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 853BAAC02E4; Tue, 3 Feb 2015 13:15:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1656719 [3/3] - in /subversion/branches/dump-load-cross-check: ./ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/java... Date: Tue, 03 Feb 2015 13:15:19 -0000 To: commits@subversion.apache.org From: brane@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150203131521.853BAAC02E4@hades.apache.org> Modified: subversion/branches/dump-load-cross-check/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/cmdline/commit_tests.py?rev=1656719&r1=1656718&r2=1656719&view=diff ============================================================================== --- subversion/branches/dump-load-cross-check/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/branches/dump-load-cross-check/subversion/tests/cmdline/commit_tests.py Tue Feb 3 13:15:17 2015 @@ -3123,6 +3123,18 @@ def commit_mergeinfo_ood(sbox): svntest.actions.run_and_verify_svn(None, None, expected_err, 'commit', sbox.ospath(''), '-m', 'M') +@Issue(2295) +def mkdir_conflict_proper_error(sbox): + "mkdir conflict should produce a proper error" + + sbox.build(create_wc=False) + repo_url = sbox.repo_url + + expected_error = "svn: E160020: .* already exists.*'/A'" + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'mkdir', repo_url + '/A', + '-m', '') + ######################################################################## # Run the tests @@ -3198,6 +3210,7 @@ test_list = [ None, commit_cp_with_deep_delete, commit_deep_deleted, commit_mergeinfo_ood, + mkdir_conflict_proper_error, ] if __name__ == '__main__': Modified: subversion/branches/dump-load-cross-check/subversion/tests/cmdline/redirect_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/cmdline/redirect_tests.py?rev=1656719&r1=1656718&r2=1656719&view=diff ============================================================================== --- subversion/branches/dump-load-cross-check/subversion/tests/cmdline/redirect_tests.py (original) +++ subversion/branches/dump-load-cross-check/subversion/tests/cmdline/redirect_tests.py Tue Feb 3 13:15:17 2015 @@ -205,6 +205,42 @@ def redirected_externals(sbox): verify_url(sbox.ospath('A/C/dirX'), sbox.repo_url + '/A/B/F') #---------------------------------------------------------------------- +@SkipUnless(svntest.main.is_ra_type_dav) +def redirected_copy(sbox): + "redirected copy" + + sbox.build(create_wc=False) + + # E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH + expected_error = "svn: E170011: Repository moved permanently" + + # This tests the actual copy handling + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'cp', '-m', 'failed copy', + sbox.redirected_root_url() + '/A', + sbox.redirected_root_url() + '/A_copied') + + # This tests the cmdline handling of '^/copy-of-A' + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'cp', '-m', 'failed copy', + sbox.redirected_root_url() + '/A', + '^/copy-of-A') + + # E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH + expected_error = "svn: E170011: Repository moved temporarily" + + # This tests the actual copy handling + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'cp', '-m', 'failed copy', + sbox.redirected_root_url(temporary=True) + '/A', + sbox.redirected_root_url(temporary=True) + '/A_copied') + + # This tests the cmdline handling of '^/copy-of-A' + svntest.actions.run_and_verify_svn(None, None, expected_error, + 'cp', '-m', 'failed copy', + sbox.redirected_root_url(temporary=True) + '/A', + '^/copy-of-A') +#---------------------------------------------------------------------- ######################################################################## # Run the tests @@ -216,6 +252,7 @@ test_list = [ None, redirected_update, redirected_nonroot_update, redirected_externals, + redirected_copy, ] if __name__ == '__main__': Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs/fs-test.c?rev=1656719&r1=1656718&r2=1656719&view=diff ============================================================================== --- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs/fs-test.c Tue Feb 3 13:15:17 2015 @@ -6696,6 +6696,56 @@ test_modify_txn_being_written(const svn_ return SVN_NO_ERROR; } +static svn_error_t * +test_prop_and_text_rep_sharing_collision(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + /* Regression test for issue 4554: Wrong file length with PLAIN + * representations in FSFS. */ + svn_fs_t *fs; + svn_fs_txn_t *txn; + svn_fs_root_t *txn_root; + svn_fs_root_t *rev_root; + svn_revnum_t new_rev; + svn_filesize_t length; + const char *testdir = "test-prop-and-text-rep-sharing-collision"; + + /* Create a new repo. */ + SVN_ERR(svn_test__create_fs(&fs, testdir, opts, pool)); + + SVN_ERR(svn_fs_begin_txn(&txn, fs, 0, pool)); + SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool)); + /* Set node property for the root. */ + SVN_ERR(svn_fs_change_node_prop(txn_root, "/", "prop", + svn_string_create("value", pool), + pool)); + + /* Commit revision r1. */ + SVN_ERR(test_commit_txn(&new_rev, txn, NULL, pool)); + + SVN_ERR(svn_fs_begin_txn(&txn, fs, 1, pool)); + SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool)); + + /* Create file with same contents as property representation. */ + SVN_ERR(svn_fs_make_file(txn_root, "/foo", pool)); + SVN_ERR(svn_test__set_file_contents(txn_root, "/foo", + "K 4\n" + "prop\n" + "V 5\n" + "value\n" + "END\n", pool)); + + /* Commit revision r2. */ + SVN_ERR(test_commit_txn(&new_rev, txn, NULL, pool)); + + /* Check that FS reports correct length for the file (23). */ + SVN_ERR(svn_fs_revision_root(&rev_root, fs, 2, pool)); + SVN_ERR(svn_fs_file_length(&length, rev_root, "/foo", pool)); + + SVN_TEST_ASSERT(length == 23); + return SVN_NO_ERROR; +} + /* ------------------------------------------------------------------------ */ /* The test table. */ @@ -6825,6 +6875,8 @@ static struct svn_test_descriptor_t test "test pool lifetime dependencies with txn roots"), SVN_TEST_OPTS_PASS(test_modify_txn_being_written, "test modify txn being written in FSFS"), + SVN_TEST_OPTS_PASS(test_prop_and_text_rep_sharing_collision, + "test property and text rep-sharing collision"), SVN_TEST_NULL }; Propchange: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Feb 3 13:15:17 2015 @@ -62,6 +62,7 @@ /subversion/branches/revprop-cache/subversion/tests/libsvn_fs_x:1298521-1326293 /subversion/branches/revprop-packing/subversion/tests/libsvn_fs_x:1143907,1143971,1143997,1144017,1144499,1144568,1146145 /subversion/branches/subtree-mergeinfo/subversion/tests/libsvn_fs_x:876734-878766 +/subversion/branches/svn-auth-x509/subversion/tests/libsvn_fs_x:1603509-1655900 /subversion/branches/svn-mergeinfo-enhancements/subversion/tests/libsvn_fs_x:870119-870195,870197-870288 /subversion/branches/svn-patch-improvements/subversion/tests/libsvn_fs_x:918519-934609 /subversion/branches/svn_mutex/subversion/tests/libsvn_fs_x:1141683-1182099 @@ -80,4 +81,4 @@ /subversion/branches/verify-at-commit/subversion/tests/libsvn_fs_x:1462039-1462408 /subversion/branches/verify-keep-going/subversion/tests/libsvn_fs_x:1439280-1492639,1546002-1546110 /subversion/branches/wc-collate-path/subversion/tests/libsvn_fs_x:1402685-1480384 -/subversion/trunk/subversion/tests/libsvn_fs_x:1414756-1509914 +/subversion/trunk/subversion/tests/libsvn_fs_x:1414756-1509914,1654853-1656714 Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/dirent_uri-test.c URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1656719&r1=1656718&r2=1656719&view=diff ============================================================================== --- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/dirent_uri-test.c (original) +++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/dirent_uri-test.c Tue Feb 3 13:15:17 2015 @@ -809,6 +809,9 @@ static const testcase_canonicalize_t uri { "http://hst/foo/../bar","http://hst/foo/../bar" }, { "http://hst/", "http://hst" }, { "http:///", "http://" }, + { "http:///example.com/", "http:///example.com" }, + { "http:////example.com/", "http:///example.com" }, + { "http://///////example.com/", "http:///example.com" }, { "https://", "https://" }, { "file:///", "file://" }, { "file://", "file://" }, Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/utf-test.c URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/utf-test.c?rev=1656719&r1=1656718&r2=1656719&view=diff ============================================================================== --- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/utf-test.c (original) +++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/utf-test.c Tue Feb 3 13:15:17 2015 @@ -737,6 +737,92 @@ test_utf_is_normalized(apr_pool_t *pool) return SVN_NO_ERROR; } + +static svn_error_t * +test_utf_conversions(apr_pool_t *pool) +{ + static const struct cvt_test_t + { + svn_boolean_t sixteenbit; + svn_boolean_t bigendian; + const char *source; + const char *result; + } tests[] = { + +#define UTF_32_LE FALSE, FALSE +#define UTF_32_BE FALSE, TRUE +#define UTF_16_LE TRUE, FALSE +#define UTF_16_BE TRUE, TRUE + + /* Normal character conversion */ + { UTF_32_LE, "t\0\0\0" "e\0\0\0" "s\0\0\0" "t\0\0\0" "\0\0\0\0", "test" }, + { UTF_32_BE, "\0\0\0t" "\0\0\0e" "\0\0\0s" "\0\0\0t" "\0\0\0\0", "test" }, + { UTF_16_LE, "t\0" "e\0" "s\0" "t\0" "\0\0", "test" }, + { UTF_16_BE, "\0t" "\0e" "\0s" "\0t" "\0\0", "test" }, + + /* Valid surrogate pairs */ + { UTF_16_LE, "\x00\xD8" "\x00\xDC" "\0\0", "\xf0\x90\x80\x80" }, /* U+010000 */ + { UTF_16_LE, "\x34\xD8" "\x1E\xDD" "\0\0", "\xf0\x9d\x84\x9e" }, /* U+01D11E */ + { UTF_16_LE, "\xFF\xDB" "\xFD\xDF" "\0\0", "\xf4\x8f\xbf\xbd" }, /* U+10FFFD */ + + { UTF_16_BE, "\xD8\x00" "\xDC\x00" "\0\0", "\xf0\x90\x80\x80" }, /* U+010000 */ + { UTF_16_BE, "\xD8\x34" "\xDD\x1E" "\0\0", "\xf0\x9d\x84\x9e" }, /* U+01D11E */ + { UTF_16_BE, "\xDB\xFF" "\xDF\xFD" "\0\0", "\xf4\x8f\xbf\xbd" }, /* U+10FFFD */ + + /* Swapped, single and trailing surrogate pairs */ + { UTF_16_LE, "*\0" "\x00\xDC" "\x00\xD8" "*\0\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*" }, + { UTF_16_LE, "*\0" "\x1E\xDD" "*\0\0\0", "*\xed\xb4\x9e*" }, + { UTF_16_LE, "*\0" "\xFF\xDB" "*\0\0\0", "*\xed\xaf\xbf*" }, + { UTF_16_LE, "\x1E\xDD" "\0\0", "\xed\xb4\x9e" }, + { UTF_16_LE, "\xFF\xDB" "\0\0", "\xed\xaf\xbf" }, + + { UTF_16_BE, "\0*" "\xDC\x00" "\xD8\x00" "\0*\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*" }, + { UTF_16_BE, "\0*" "\xDD\x1E" "\0*\0\0", "*\xed\xb4\x9e*" }, + { UTF_16_BE, "\0*" "\xDB\xFF" "\0*\0\0", "*\xed\xaf\xbf*" }, + { UTF_16_BE, "\xDD\x1E" "\0\0", "\xed\xb4\x9e" }, + { UTF_16_BE, "\xDB\xFF" "\0\0", "\xed\xaf\xbf" }, + +#undef UTF_32_LE +#undef UTF_32_BE +#undef UTF_16_LE +#undef UTF_16_BE + + { 0 } + }; + + const struct cvt_test_t *tc; + const svn_string_t *result; + int i; + + for (i = 1, tc = tests; tc->source; ++tc, ++i) + { + if (tc->sixteenbit) + SVN_ERR(svn_utf__utf16_to_utf8(&result, (const void*)tc->source, + SVN_UTF__UNKNOWN_LENGTH, + tc->bigendian, pool, pool)); + else + SVN_ERR(svn_utf__utf32_to_utf8(&result, (const void*)tc->source, + SVN_UTF__UNKNOWN_LENGTH, + tc->bigendian, pool, pool)); + SVN_ERR_ASSERT(0 == strcmp(result->data, tc->result)); + } + + /* Test counted strings with NUL characters */ + SVN_ERR(svn_utf__utf16_to_utf8( + &result, (void*)("x\0" "\0\0" "y\0" "*\0"), 3, + FALSE, pool, pool)); + SVN_ERR_ASSERT(0 == memcmp(result->data, "x\0y", 3)); + + SVN_ERR(svn_utf__utf32_to_utf8( + &result, + (void*)("\0\0\0x" "\0\0\0\0" "\0\0\0y" "\0\0\0*"), 3, + TRUE, pool, pool)); + SVN_ERR_ASSERT(0 == memcmp(result->data, "x\0y", 3)); + + return SVN_NO_ERROR; +} + + /* The test table. */ @@ -761,6 +847,8 @@ static struct svn_test_descriptor_t test "test svn_utf__fuzzy_escape"), SVN_TEST_PASS2(test_utf_is_normalized, "test svn_utf__is_normalized"), + SVN_TEST_PASS2(test_utf_conversions, + "test svn_utf__utf{16,32}_to_utf8"), SVN_TEST_NULL };