Modified: subversion/branches/1.8.x-r1536854/subversion/po/es.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/es.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/es.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/es.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -53,7 +53,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-02-19 14:22-0200\n"
Modified: subversion/branches/1.8.x-r1536854/subversion/po/fr.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/fr.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/fr.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/fr.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -22,7 +22,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2012-07-07 14:51+0200\n" "PO-Revision-Date: 2012-07-07 17:04+0200\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/it.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/it.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/it.po (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/it.po Wed Nov 19 14:37:04 2014 @@ -101,7 +101,7 @@ # working copy: copia di lavoro (CL) msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2007-10-12 10:09+0200\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/ja.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/ja.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/ja.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/ja.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -195,7 +195,7 @@ # zero byte ゼロバイト文字 msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2007-10-28 01:23+0900\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/ko.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/ko.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/ko.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/ko.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -19,7 +19,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2011-03-07 00:53+0900\n" "PO-Revision-Date: 2011-03-03 18:16+0900\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/nb.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/nb.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/nb.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/nb.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -87,7 +87,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-10-14 16:21+0200\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/pl.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/pl.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/pl.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/pl.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -55,7 +55,7 @@ # work queue - kolejka pracy msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2009-11-14 22:00+0100\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/pt_BR.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/pt_BR.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/pt_BR.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/pt_BR.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -19,7 +19,7 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2004-07-26 19:19-300\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/zh_CN.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/zh_CN.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/zh_CN.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/zh_CN.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -62,7 +62,7 @@ msgstr "" "PO-Revision-Date: 2013-07-03 16:57+0800\n" "Last-Translator: Subversion Developers <[email protected]>\n" "Language-Team: Simplified Chinese <[email protected]>\n" -"Language: \n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" Modified: subversion/branches/1.8.x-r1536854/subversion/po/zh_TW.po URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/po/zh_TW.po?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/po/zh_TW.po [UTF-8] (original) +++ subversion/branches/1.8.x-r1536854/subversion/po/zh_TW.po [UTF-8] Wed Nov 19 14:37:04 2014 @@ -22,13 +22,13 @@ # msgid "" msgstr "" -"Project-Id-Version: subversion 1.7\n" +"Project-Id-Version: subversion 1.8\n" "Report-Msgid-Bugs-To: [email protected]\n" "POT-Creation-Date: 2010-11-12 08:49-0600\n" "PO-Revision-Date: 2004-09-12 22:05+0800\n" "Last-Translator: Subversion Developers <[email protected]>\n" "Language-Team: Traditional Chinese <[email protected]>\n" -"Language: \n" +"Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" Modified: subversion/branches/1.8.x-r1536854/subversion/svn/conflict-callbacks.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/svn/conflict-callbacks.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/svn/conflict-callbacks.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/svn/conflict-callbacks.c Wed Nov 19 14:37:04 2014 @@ -935,7 +935,7 @@ handle_text_conflict(svn_wc_conflict_res /* We only allow the user accept the merged version of the file if they've edited it, or at least looked at the diff. */ - if (result->choice == svn_wc_conflict_choose_merged + if (opt->choice == svn_wc_conflict_choose_merged && ! knows_something) { SVN_ERR(svn_cmdline_fprintf( Propchange: subversion/branches/1.8.x-r1536854/subversion/svn/svn.c ------------------------------------------------------------------------------ Merged /subversion/branches/1.8.x/subversion/svn/svn.c:r1579874-1640560 Merged /subversion/branches/1.8.x-r1536931/subversion/svn/svn.c:r1536934-1591145 Modified: subversion/branches/1.8.x-r1536854/subversion/svndumpfilter/svndumpfilter.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/svndumpfilter/svndumpfilter.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/svndumpfilter/svndumpfilter.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/svndumpfilter/svndumpfilter.c Wed Nov 19 14:37:04 2014 @@ -570,6 +570,9 @@ new_node_record(void **node_baton, } else { + const char *kind; + const char *action; + tcl = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH); /* Test if this node was copied from dropped source. */ @@ -584,7 +587,6 @@ new_node_record(void **node_baton, dumpfile should contain the new contents of the file. In this scenario, we'll just do an add without history using the new contents. */ - const char *kind; kind = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_KIND); /* If there is a Text-content-length header, and the kind is @@ -623,6 +625,30 @@ new_node_record(void **node_baton, if (! nb->rb->writing_begun) SVN_ERR(output_revision(nb->rb)); + /* A node record is required to begin with 'Node-path', skip the + leading '/' to match the form used by 'svnadmin dump'. */ + SVN_ERR(svn_stream_printf(nb->rb->pb->out_stream, + pool, "%s: %s\n", + SVN_REPOS_DUMPFILE_NODE_PATH, node_path + 1)); + + /* Node-kind is next and is optional. */ + kind = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_KIND); + if (kind) + SVN_ERR(svn_stream_printf(nb->rb->pb->out_stream, + pool, "%s: %s\n", + SVN_REPOS_DUMPFILE_NODE_KIND, kind)); + + /* Node-action is next and required. */ + action = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_ACTION); + if (action) + SVN_ERR(svn_stream_printf(nb->rb->pb->out_stream, + pool, "%s: %s\n", + SVN_REPOS_DUMPFILE_NODE_ACTION, action)); + else + return svn_error_createf(SVN_ERR_INCOMPLETE_DATA, 0, + _("Missing Node-action for path '%s'"), + node_path); + for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi)) { const char *key = svn__apr_hash_index_key(hi); @@ -638,7 +664,10 @@ new_node_record(void **node_baton, if ((!strcmp(key, SVN_REPOS_DUMPFILE_CONTENT_LENGTH)) || (!strcmp(key, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH)) - || (!strcmp(key, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH))) + || (!strcmp(key, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH)) + || (!strcmp(key, SVN_REPOS_DUMPFILE_NODE_PATH)) + || (!strcmp(key, SVN_REPOS_DUMPFILE_NODE_KIND)) + || (!strcmp(key, SVN_REPOS_DUMPFILE_NODE_ACTION))) continue; /* Rewrite Node-Copyfrom-Rev if we are renumbering revisions. Modified: subversion/branches/1.8.x-r1536854/subversion/svnrdump/util.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/svnrdump/util.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/svnrdump/util.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/svnrdump/util.c Wed Nov 19 14:37:04 2014 @@ -35,7 +35,7 @@ svn_rdump__normalize_prop(const char *na const svn_string_t **value, apr_pool_t *result_pool) { - if (svn_prop_needs_translation(name)) + if (svn_prop_needs_translation(name) && *value) { const char *cstring; Modified: subversion/branches/1.8.x-r1536854/subversion/svnserve/serve.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/svnserve/serve.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/svnserve/serve.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/svnserve/serve.c Wed Nov 19 14:37:04 2014 @@ -1526,6 +1526,9 @@ static svn_error_t *get_file(svn_ra_svn_ &want_props, &want_contents, &wants_inherited_props)); + if (wants_inherited_props == SVN_RA_SVN_UNSPECIFIED_NUMBER) + wants_inherited_props = FALSE; + full_path = svn_fspath__join(b->fs_path->data, svn_relpath_canonicalize(path, pool), pool); @@ -1545,8 +1548,14 @@ static svn_error_t *get_file(svn_ra_svn_ SVN_CMD_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root, full_path, TRUE, pool)); hex_digest = svn_checksum_to_cstring_display(checksum, pool); + + /* Fetch the file's explicit and/or inherited properties if + requested. Although the wants-iprops boolean was added to the + protocol in 1.8 a standard 1.8 client never requests iprops. */ if (want_props || wants_inherited_props) - SVN_CMD_ERR(get_props(&props, &inherited_props, &ab, root, full_path, + SVN_CMD_ERR(get_props(want_props ? &props : NULL, + wants_inherited_props ? &inherited_props : NULL, + &ab, root, full_path, pool)); if (want_contents) SVN_CMD_ERR(svn_fs_file_contents(&contents, root, full_path, pool)); @@ -1640,6 +1649,9 @@ static svn_error_t *get_dir(svn_ra_svn_c &dirent_fields_list, &wants_inherited_props)); + if (wants_inherited_props == SVN_RA_SVN_UNSPECIFIED_NUMBER) + wants_inherited_props = FALSE; + if (! dirent_fields_list) { dirent_fields = SVN_DIRENT_ALL; @@ -1689,10 +1701,13 @@ static svn_error_t *get_dir(svn_ra_svn_c /* Fetch the root of the appropriate revision. */ SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, pool)); - /* Fetch the directory's explicit and/or inherited properties - if requested. */ + /* Fetch the directory's explicit and/or inherited properties if + requested. Although the wants-iprops boolean was added to the + protocol in 1.8 a standard 1.8 client never requests iprops. */ if (want_props || wants_inherited_props) - SVN_CMD_ERR(get_props(&props, &inherited_props, &ab, root, full_path, + SVN_CMD_ERR(get_props(want_props ? &props : NULL, + wants_inherited_props ? &inherited_props : NULL, + &ab, root, full_path, pool)); /* Begin response ... */ Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/commit_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/commit_tests.py Wed Nov 19 14:37:04 2014 @@ -2545,6 +2545,16 @@ def start_commit_hook_test(sbox): 'STDERR', expected_stderr, actual_stderr) + # Now list the txns in the repo. The list should be empty. + exit_code, output, errput = svntest.main.run_svnadmin('lstxns', + sbox.repo_dir) + svntest.verify.compare_and_display_lines( + "Error running 'svnadmin lstxns'.", + 'STDERR', [], errput) + svntest.verify.compare_and_display_lines( + "Output of 'svnadmin lstxns' is unexpected.", + 'STDOUT', [], output) + #---------------------------------------------------------------------- @Issue(3553) def pre_commit_hook_test(sbox): @@ -2998,7 +3008,115 @@ def commit_cp_with_deep_delete(sbox): None, wc_dir) - +def commit_deep_deleted(sbox): + "try to commit a deep descendant of a deleted node" + + sbox.build() + + sbox.simple_move('A', 'AA') + + sbox.simple_propset('k', 'v', 'AA/D/G') + + # Committing some added descendant returns a proper error + expected_err = ('svn: E200009: \'%s\' is not known to exist in the ' + + 'repository and is not part of the commit, yet its ' + + 'child \'%s\' is part of the commit') % ( + re.escape(os.path.abspath(sbox.ospath('AA'))), + re.escape(os.path.abspath(sbox.ospath('AA/D/G')))) + + svntest.actions.run_and_verify_commit(sbox.wc_dir, + None, + None, + expected_err, + sbox.ospath('AA/D/G')) + + sbox.simple_propdel('k', 'AA/D/G') + sbox.simple_rm('AA/D/G') + + # But a delete fails.. + # This used to trigger an assertion in Subversion 1.8.0-1.8.8, because + # the status walker couldn't find the repository path for AA/D/G + svntest.actions.run_and_verify_commit(sbox.wc_dir, + None, + None, + expected_err, + sbox.ospath('AA/D/G')) + + # And now commit like how a GUI client would do it, but forgetting the move + expected_err = ('svn: E200009: Cannot commit \'%s\' because it was moved ' + + 'from \'%s\' which is not part of the commit; both sides ' + + 'of the move must be committed together') % ( + re.escape(os.path.abspath(sbox.ospath('AA'))), + re.escape(os.path.abspath(sbox.ospath('A')))) + svntest.actions.run_and_verify_commit(sbox.wc_dir, + None, + None, + expected_err, + '--depth', 'empty', + sbox.ospath('AA/D/G'), + sbox.ospath('AA')) + + + # And now how it works + svntest.actions.run_and_verify_commit(sbox.wc_dir, + None, + None, + [], + '--depth', 'empty', + sbox.ospath('AA/D/G'), + sbox.ospath('AA'), + sbox.ospath('A')) + +@Issue(4480) +def commit_mergeinfo_ood(sbox): + "commit of mergeinfo that should cause out of date" + + sbox.build() + sbox.simple_rm('A', 'iota') + sbox.simple_commit() # r2 + + sbox.simple_mkdir('trunk', 'branch') + sbox.simple_commit() # r3 + + sbox.simple_append('trunk/a', 'This is a\n') + sbox.simple_add('trunk/a') + sbox.simple_commit() # r4 + + sbox.simple_append('trunk/b', 'This is b\n') + sbox.simple_add('trunk/b') + sbox.simple_commit() # r5 + + sbox.simple_update() # To r5 + + expected_output = [ + '--- Merging r4 into \'%s\':\n' % sbox.ospath('branch'), + 'A %s\n' % sbox.ospath('branch/a'), + '--- Recording mergeinfo for merge of r4' \ + ' into \'%s\':\n' % sbox.ospath('branch'), + ' U %s\n' % sbox.ospath('branch'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', '-c4', '^/trunk', + sbox.ospath('branch')) + + sbox.simple_commit() + + sbox.simple_update(revision='5') + + expected_output = [ + '--- Merging r5 into \'%s\':\n' % sbox.ospath('branch'), + 'A %s\n' % sbox.ospath('branch/b'), + '--- Recording mergeinfo for merge of r5 into \'%s\':\n' % sbox.ospath('branch'), + ' U %s\n' % sbox.ospath('branch'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', '-c5', '^/trunk', + sbox.ospath('branch')) + + # Currently this commit succeeds with dav over HTTPv2, while it should really fail + expected_err = '.*out of date.*' + svntest.actions.run_and_verify_svn(None, None, expected_err, + 'commit', sbox.ospath(''), '-m', 'M') ######################################################################## # Run the tests @@ -3072,6 +3190,8 @@ test_list = [ None, commit_danglers, last_changed_of_copied_subdir, commit_cp_with_deep_delete, + commit_deep_deleted, + commit_mergeinfo_ood, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/copy_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/copy_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/copy_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/copy_tests.py Wed Nov 19 14:37:04 2014 @@ -5814,6 +5814,69 @@ def copy_relocate(sbox): svntest.actions.run_and_verify_svn(None, None, [], 'info', copiedpath) +def ext_wc_copy_deleted(sbox): + "copy deleted tree from separate wc" + + sbox.build() + + wc_dir = sbox.wc_dir + wc2_dir = sbox.add_wc_path('2') + + sbox.simple_rm('A/B') + sbox.simple_commit() + + svntest.actions.run_and_verify_svn(None, None, [], + 'up', '--set-depth', 'exclude', + sbox.ospath('A/D')) + + svntest.actions.run_and_verify_svn(None, None, [], + 'co', sbox.repo_url, wc2_dir, '-r', 1) + + svntest.actions.run_and_verify_svn(None, None, [], + 'cp', sbox.path('A'), os.path.join(wc2_dir,'AA')) + + expected_output = expected_output = svntest.wc.State(wc2_dir, { + 'AA' : Item(verb='Adding'), + 'AA/B' : Item(verb='Deleting'), + }) + + svntest.actions.run_and_verify_commit(wc2_dir, + expected_output, None, None, + wc2_dir) + +def copy_subtree_deleted(sbox): + "copy to-be-deleted subtree" + + sbox.build() + wc_dir = sbox.wc_dir + wc2_dir = sbox.add_wc_path('2') + svntest.actions.duplicate_dir(wc_dir, wc2_dir) + + sbox.simple_rm('A/B') + + # Commit copy within a working copy + sbox.simple_copy('A', 'AA') + expected_output = expected_output = svntest.wc.State(wc_dir, { + 'AA' : Item(verb='Adding'), + 'AA/B' : Item(verb='Deleting'), + }) + svntest.actions.run_and_verify_commit(wc_dir, + expected_output, None, None, + sbox.ospath('AA')) + + # Commit copy between working copies + svntest.actions.run_and_verify_svn(None, None, [], + 'cp', sbox.path('A'), + os.path.join(wc2_dir,'AA2')) + expected_output = expected_output = svntest.wc.State(wc2_dir, { + 'AA2' : Item(verb='Adding'), + 'AA2/B' : Item(verb='Deleting'), + }) + svntest.actions.run_and_verify_commit(wc2_dir, + expected_output, None, None, + wc2_dir) + + ######################################################################## # Run the tests @@ -5932,6 +5995,8 @@ test_list = [ None, copy_text_conflict, copy_over_excluded, copy_relocate, + ext_wc_copy_deleted, + copy_subtree_deleted, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/export_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/export_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/export_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/export_tests.py Wed Nov 19 14:37:04 2014 @@ -964,6 +964,114 @@ def export_custom_keywords(sbox): if open(export_file).read() != ''.join(alpha_content): raise svntest.Failure("wrong keyword expansion") +@Issue(4427) +def export_file_external(sbox): + "export file external from WC and URL" + sbox.build() + + wc_dir = sbox.wc_dir + + # Set 'svn:externals' property in 'A/C' to 'A/B/E/alpha'(file external), + C_path = os.path.join(wc_dir, 'A', 'C') + externals_prop = "^/A/B/E/alpha exfile_alpha" + + tmp_f = sbox.get_tempname('prop') + svntest.main.file_append(tmp_f, externals_prop) + svntest.main.run_svn(None, 'ps', '-F', tmp_f, 'svn:externals', C_path) + svntest.main.run_svn(None,'ci', '-m', 'log msg', '--quiet', C_path) + + # Update the working copy to receive file external + svntest.main.run_svn(None, 'up', wc_dir) + + # Update the expected disk tree to include the external. + expected_disk = svntest.main.greek_state.copy() + expected_disk.add({ + 'A/C/exfile_alpha' : Item("This is the file 'alpha'.\n"), + }) + + # Export from URL + export_target = sbox.add_wc_path('export_url') + expected_output = svntest.main.greek_state.copy() + expected_output.add({ + 'A/C/exfile_alpha' : Item("This is the file 'alpha'.\r"), + }) + expected_output.wc_dir = export_target + expected_output.desc[''] = Item() + expected_output.tweak(contents=None, status='A ') + svntest.actions.run_and_verify_export(sbox.repo_url, + export_target, + expected_output, + expected_disk) + + # Export from WC + export_target = sbox.add_wc_path('export_wc') + expected_output = svntest.main.greek_state.copy() + expected_output.add({ + 'A/C/exfile_alpha' : Item("This is the file 'alpha'.\r"), + }) + expected_output.wc_dir = export_target + expected_output.desc['A'] = Item() + expected_output.tweak(contents=None, status='A ') + svntest.actions.run_and_verify_export(wc_dir, + export_target, + expected_output, + expected_disk) + +@Issue(4427) +def export_file_externals2(sbox): + "exporting file externals" + + sbox.build() + sbox.simple_mkdir('DIR', 'DIR2') + + sbox.simple_propset('svn:externals', '^/iota file', 'DIR') + sbox.simple_propset('svn:externals', '^/DIR TheDir', 'DIR2') + sbox.simple_commit() + sbox.simple_update() + + tmp = sbox.add_wc_path('tmp') + os.mkdir(tmp) + + expected_output = svntest.wc.State(tmp, { + 'file' : Item(status='A '), + }) + expected_disk = svntest.wc.State('', { + 'file': Item(contents="This is the file 'iota'.\n") + }) + # Fails in 1.8.8 and r1575909. + # Direct export of file external was just skipped + svntest.actions.run_and_verify_export(sbox.ospath('DIR/file'), + tmp, + expected_output, + expected_disk) + + expected_output = svntest.wc.State(tmp, { + 'DIR/file' : Item(status='A '), + }) + expected_disk = svntest.wc.State('', { + 'file': Item(contents="This is the file 'iota'.\n") + }) + # Fails in 1.8.8 (doesn't export file), passes in r1575909 + svntest.actions.run_and_verify_export(sbox.ospath('DIR'), + os.path.join(tmp, 'DIR'), + expected_output, + expected_disk) + + expected_output = svntest.wc.State(tmp, { + 'DIR2/TheDir/file' : Item(status='A '), + }) + expected_disk = svntest.wc.State('', { + 'TheDir' : Item(), + 'TheDir/file' : Item(contents="This is the file 'iota'.\n") + }) + # Fails in 1.8.8 (doesn't export anything), + # Fails in r1575909 (exports file twice; once as file; once as external) + svntest.actions.run_and_verify_export(sbox.ospath('DIR2'), + os.path.join(tmp, 'DIR2'), + expected_output, + expected_disk) + + ######################################################################## # Run the tests @@ -998,6 +1106,8 @@ test_list = [ None, export_to_current_dir, export_file_overwrite_with_force, export_custom_keywords, + export_file_external, + export_file_externals2 ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/externals_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/externals_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/externals_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/externals_tests.py Wed Nov 19 14:37:04 2014 @@ -3227,6 +3227,38 @@ def update_dir_external_shallow(sbox): sbox.ospath('A/B/E')) +def update_deletes_file_external(sbox): + "update deletes a file external" + + sbox.build() + wc_dir = sbox.wc_dir + + sbox.simple_propset('svn:externals', '../D/gamma gamma', 'A/C') + sbox.simple_commit() + sbox.simple_update() + + # Create a branch + svntest.actions.run_and_verify_svn(None, None, [], + 'copy', + '-m', 'create branch', + sbox.repo_url + '/A', + sbox.repo_url + '/A_copy') + + # Update the working copy + sbox.simple_commit() + sbox.simple_update() + + # Remove the branch + svntest.actions.run_and_verify_svn(None, None, [], + 'rm', + '-m', 'remove branch', + sbox.repo_url + '/A_copy') + + # As of r1448345, this update fails: + # E000002: Can't remove directory '.../A_copy/C': No such file or directory + sbox.simple_update() + + ######################################################################## # Run the tests @@ -3279,6 +3311,7 @@ test_list = [ None, move_with_file_externals, pinned_externals, update_dir_external_shallow, + update_deletes_file_external ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/lock_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/lock_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/lock_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/lock_tests.py Wed Nov 19 14:37:04 2014 @@ -1521,7 +1521,6 @@ def verify_path_escaping(sbox): #---------------------------------------------------------------------- # Issue #3674: Replace + propset of locked file fails over DAV -@XFail(svntest.main.is_ra_type_dav) @Issue(3674) def replace_and_propset_locked_path(sbox): "test replace + propset of locked file" @@ -1554,11 +1553,9 @@ def replace_and_propset_locked_path(sbox # Replace A/D/G and A/D/G/rho, propset on A/D/G/rho. svntest.actions.run_and_verify_svn(None, None, [], 'rm', G_path) - # Recreate path for single-db - if not os.path.exists(G_path): - os.mkdir(G_path) + svntest.actions.run_and_verify_svn(None, None, [], - 'add', G_path) + 'mkdir', G_path) svntest.main.file_append(rho_path, "This is the new file 'rho'.\n") svntest.actions.run_and_verify_svn(None, None, [], 'add', rho_path) @@ -1890,6 +1887,168 @@ def drop_locks_on_parent_deletion(sbox): wc_dir) +@SkipUnless(svntest.main.is_ra_type_dav) +def dav_lock_timeout(sbox): + "unlock a lock with timeout" + + import httplib + from urlparse import urlparse + import base64 + + sbox.build() + loc = urlparse(sbox.repo_url) + + if loc.scheme == 'http': + h = httplib.HTTPConnection(loc.hostname, loc.port) + else: + h = httplib.HTTPSConnection(loc.hostname, loc.port) + + lock_body = '<?xml version="1.0" encoding="utf-8" ?>' \ + '<D:lockinfo xmlns:D="DAV:">' \ + ' <D:lockscope><D:exclusive/></D:lockscope>' \ + ' <D:locktype><D:write/></D:locktype>' \ + ' <D:owner>' \ + ' <D:href>http://a/test</D:href>' \ + ' </D:owner>' \ + '</D:lockinfo>' + + lock_headers = { + 'Authorization': 'Basic ' + base64.b64encode('jconstant:rayjandom'), + 'Timeout': 'Second-86400' + } + + # Enabling the following line makes this test easier to debug + h.set_debuglevel(9) + + h.request('LOCK', sbox.repo_url + '/iota', lock_body, lock_headers) + + r = h.getresponse() + + # Verify that there is a lock, by trying to obtain one + svntest.actions.run_and_verify_svn2(None, None, ".*locked by user", 0, + 'lock', '-m', '', sbox.ospath('iota')) + + # Before this patch this used to fail with a parse error of the timeout + svntest.actions.run_and_verify_svn2(None, None, ".*W160039.*Unlock.*403", 0, + 'unlock', sbox.repo_url + '/iota') + + svntest.actions.run_and_verify_svn(None, None, [], + 'unlock', sbox.ospath('iota'), '--force') + + + +def non_root_locks(sbox): + "locks for working copies not at repos root" + + sbox.build() + wc_dir = sbox.wc_dir + + svntest.actions.run_and_verify_svn(None, None, [], + 'cp', sbox.repo_url, sbox.repo_url + '/X', + '-m', 'copy greek tree') + + sbox.simple_switch(sbox.repo_url + '/X') + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + # Lock a file + svntest.actions.run_and_verify_svn(None, ".*locked by user", [], + 'lock', sbox.ospath('A/D/G/pi'), + '-m', '') + expected_status.tweak('A/D/G/pi', writelocked='K') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + # Updates don't break the lock + sbox.simple_update('A/D') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + sbox.simple_update('') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + # Break the lock + svntest.actions.run_and_verify_svn(None, None, [], + 'unlock', sbox.repo_url + '/X/A/D/G/pi') + + # Subdir update reports the break + sbox.simple_update('A/D') + expected_status.tweak('A/D/G/pi', writelocked=None) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + + # Relock and break + svntest.actions.run_and_verify_svn(None, ".*locked by user", [], + 'lock', sbox.ospath('A/D/G/pi'), + '-m', '') + expected_status.tweak('A/D/G/pi', writelocked='K') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + svntest.actions.run_and_verify_svn(None, None, [], + 'unlock', sbox.repo_url + '/X/A/D/G/pi') + + # Root update reports the break + sbox.simple_update('') + expected_status.tweak('A/D/G/pi', writelocked=None) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + +@Issue(3515) +@SkipUnless(svntest.main.is_ra_type_dav) +def dav_lock_refresh(sbox): + "refresh timeout of DAV lock" + + import httplib + from urlparse import urlparse + import base64 + + sbox.build(create_wc = False) + + # Acquire lock on 'iota' + svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock', + sbox.repo_url + '/iota') + + # Try to refresh lock using 'If' header + loc = urlparse(sbox.repo_url) + + if loc.scheme == 'http': + h = httplib.HTTPConnection(loc.hostname, loc.port) + else: + h = httplib.HTTPSConnection(loc.hostname, loc.port) + + lock_token = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Token'] + + lock_headers = { + 'Authorization': 'Basic ' + base64.b64encode('jrandom:rayjandom'), + 'If': '(<' + lock_token + '>)', + 'Timeout': 'Second-7200' + } + + # Enabling the following line makes this test easier to debug + h.set_debuglevel(9) + + h.request('LOCK', sbox.repo_url + '/iota', '', lock_headers) + + # XFAIL Refreshing of DAV lock fails with error '412 Precondition Failed' + r = h.getresponse() + if r.status != httplib.OK: + raise svntest.Failure('Lock refresh failed: %d %s' % (r.status, r.reason)) + +@SkipUnless(svntest.main.is_ra_type_dav) +def delete_locked_file_with_percent(sbox): + "lock and delete a file called 'a %( ) .txt'" + + sbox.build() + + locked_filename = 'a %( ) .txt' + locked_path = sbox.ospath(locked_filename) + svntest.main.file_write(locked_path, "content\n") + sbox.simple_add(locked_filename) + sbox.simple_commit() + + sbox.simple_lock(locked_filename) + sbox.simple_rm(locked_filename) + + # XFAIL: With a 1.8.x client, this commit fails with: + # svn: E175002: Unexpected HTTP status 400 'Bad Request' on '/svn-test-work/repositories/lock_tests-52/!svn/txr/2-2/a%20%25(%20)%20.txt' + # and the following error in the httpd error log: + # Invalid percent encoded URI in tagged If-header [400, #104] + sbox.simple_commit() + ######################################################################## # Run the tests @@ -1943,6 +2102,10 @@ test_list = [ None, lock_unlock_deleted, commit_stolen_lock, drop_locks_on_parent_deletion, + dav_lock_timeout, + non_root_locks, + dav_lock_refresh, + delete_locked_file_with_percent, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_automatic_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_automatic_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_automatic_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_automatic_tests.py Wed Nov 19 14:37:04 2014 @@ -1202,6 +1202,132 @@ def effective_sync_results_in_reintegrat svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge', sbox.repo_url + '/branch', A_path) +@Issue(4481) +def reintegrate_subtree_not_updated(sbox): + "reintegrate subtree not updated" + + sbox.build() + + # Create change on branch 'D_1' + sbox.simple_copy('A/D', 'D_1') + sbox.simple_commit() + sbox.simple_append('D_1/G/pi', "D_1/G pi edit\n") + sbox.simple_append('D_1/H/chi', "D_1/H chi edit\n") + sbox.simple_commit() + + # Merge back to 'D' with two subtree merges + expected_output = [ + "--- Merging r2 through r3 into '" + + sbox.ospath('A/D/G') + "':\n", + "U " + + sbox.ospath('A/D/G/pi') + "\n", + "--- Recording mergeinfo for merge of r2 through r3 into '" + + sbox.ospath('A/D/G') + "':\n", + " U " + + sbox.ospath('A/D/G') + "\n"] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', + sbox.repo_url + '/D_1/G', + sbox.ospath('A/D/G')) + expected_output = [ + "--- Merging r2 through r3 into '" + + sbox.ospath('A/D/H') + "':\n", + "U " + + sbox.ospath('A/D/H/chi') + "\n", + "--- Recording mergeinfo for merge of r2 through r3 into '" + + sbox.ospath('A/D/H') + "':\n", + " U " + + sbox.ospath('A/D/H') + "\n"] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', + sbox.repo_url + '/D_1/H', + sbox.ospath('A/D/H')) + sbox.simple_commit() + sbox.simple_update() + + # Create branch 'D_2' + sbox.simple_copy('A/D', 'D_2') + sbox.simple_commit() + sbox.simple_update() + + # Create change on 'D_2' + sbox.simple_append('D_2/G/pi', "D_2/G pi edit\n") + sbox.simple_commit() + sbox.simple_update() + + # Create change on 'D' + sbox.simple_append('A/D/G/rho', "D/G rho edit\n") + sbox.simple_commit() + sbox.simple_update() + + # Sync merge to 'D_2' (doesn't record mergeinfo on 'D_2/H' subtree) + expected_output = [ + "--- Merging r5 through r7 into '" + + sbox.ospath('D_2') + "':\n", + "U " + + sbox.ospath('D_2/G/rho') + "\n", + "--- Recording mergeinfo for merge of r5 through r7 into '" + + sbox.ospath('D_2') + "':\n", + " U " + + sbox.ospath('D_2') + "\n", + "--- Recording mergeinfo for merge of r5 through r7 into '" + + sbox.ospath('D_2/G') + "':\n", + " U " + + sbox.ospath('D_2/G') + "\n"] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', + sbox.repo_url + '/A/D', + sbox.ospath('D_2')) + sbox.simple_commit() + sbox.simple_update() + + # Reintegrate 'D_2' to 'D' + expected_output = [ + "--- Merging differences between repository URLs into '" + + sbox.ospath('A/D') + "':\n", + "U " + + sbox.ospath('A/D/G/pi') + "\n", + " U " + + sbox.ospath('A/D/G') + "\n", + "--- Recording mergeinfo for merge between repository URLs into '" + + sbox.ospath('A/D') + "':\n", + " U " + + sbox.ospath('A/D') + "\n", + " U " + + sbox.ospath('A/D/G') + "\n"] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', + sbox.repo_url + '/D_2', + sbox.ospath('A/D')) + sbox.simple_commit() + sbox.simple_update() + + # merge to 'D_2'. This merge previously failed with this error: + # + # svn: E195016: Reintegrate can only be used if revisions 5 through 9 were + # previously merged from [URL]/D_2 to the reintegrate source, but this is + # not the case: + # A/D/G + # Missing ranges: /A/D/G:7 + # + expected_output = [ + "--- Merging differences between repository URLs into '" + + sbox.ospath('D_2') + "':\n", + " U " + + sbox.ospath('D_2/G') + "\n", + "--- Recording mergeinfo for merge between repository URLs into '" + + sbox.ospath('D_2') + "':\n", + " U " + + sbox.ospath('D_2') + "\n", + " G " + + sbox.ospath('D_2/G') + "\n"] + svntest.actions.run_and_verify_svn(None, expected_output, [], + 'merge', + sbox.repo_url + '/A/D', + sbox.ospath('D_2')) + sbox.simple_commit() + sbox.simple_update() + ######################################################################## # Run the tests @@ -1230,6 +1356,7 @@ test_list = [ None, merge_replacement, auto_merge_handles_replacements_in_merge_source, effective_sync_results_in_reintegrate, + reintegrate_subtree_not_updated, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/merge_tests.py Wed Nov 19 14:37:04 2014 @@ -2047,7 +2047,7 @@ def merge_binary_with_common_ancestry(sb # Commit the second branch expected_output = wc.State(wc_dir, { 'L' : Item(verb='Adding'), - 'L/theta' : Item(verb='Adding (bin)'), + 'L/theta' : Item(verb='Replacing'), }) expected_status.add({ @@ -19143,6 +19143,159 @@ def merge_to_empty_target_merge_to_infin # Commit the merge. #sbox.simple_commit() +def merge_dir_delete_force(sbox): + "merge a directory delete with --force" + + sbox.build() + + sbox.simple_rm('A/D/G') + sbox.simple_commit() # r2 + + sbox.simple_update(revision=1) + + # Just merging r2 on r1 succeeds + svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], + 'merge', '-c2', '^/', sbox.wc_dir, + '--ignore-ancestry') + + # Bring working copy to r1 again + svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], + 'revert', '-R', sbox.wc_dir) + + # But when using --force this same merge caused a segfault in 1.8.0-1.8.8 + svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [], + 'merge', '-c2', '^/', sbox.wc_dir, + '--ignore-ancestry', '--force') + +def conflict_naming(sbox): + "verify conflict file naming" + + sbox.build() + wc_dir = sbox.wc_dir + sbox.simple_append('file.txt', 'This is the initial content\n') + sbox.simple_add('file.txt') + sbox.simple_commit() + + sbox.simple_append('file.txt', 'This is the new content\n', truncate=True) + sbox.simple_commit() + + sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True) + + # Update - no preserve ext + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + expected_disk = svntest.main.greek_state.copy() + expected_output = svntest.wc.State(wc_dir, { + 'file.txt' : Item(status='C ') + }) + expected_status.add({ + 'file.txt' : Item(status='C ', wc_rev='2') + }) + + expected_disk.add({ + 'file.txt.r3' : Item(contents="This is the new content\n"), + 'file.txt.r2' : Item(contents="This is the initial content\n"), + 'file.txt' : Item(contents="<<<<<<< .mine\n" \ + "This is conflicting content\n" \ + "=======\n" \ + "This is the initial content\n" \ + ">>>>>>> .r2\n"), + 'file.txt.mine' : Item(contents="This is conflicting content\n"), + }) + svntest.actions.run_and_verify_update(wc_dir, + expected_output, expected_disk, + expected_status, + None, None, None, + None, None, None, + wc_dir, '-r', '2') + + sbox.simple_revert('file.txt') + sbox.simple_update('', revision=3) + sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True) + + # Update - preserve ext + expected_status = svntest.actions.get_virginal_state(wc_dir, 2) + expected_disk = svntest.main.greek_state.copy() + expected_output = svntest.wc.State(wc_dir, { + 'file.txt' : Item(status='C ') + }) + expected_status.add({ + 'file.txt' : Item(status='C ', wc_rev='2') + }) + + expected_disk.add({ + 'file.txt.r3.txt' : Item(contents="This is the new content\n"), + 'file.txt.r2.txt' : Item(contents="This is the initial content\n"), + 'file.txt' : Item(contents="<<<<<<< .mine.txt\n" \ + "This is conflicting content\n" \ + "=======\n" \ + "This is the initial content\n" \ + ">>>>>>> .r2.txt\n"), + 'file.txt.mine.txt' : Item(contents="This is conflicting content\n"), + }) + svntest.actions.run_and_verify_update( + wc_dir, + expected_output, expected_disk, expected_status, + None, None, None, None, None, None, + wc_dir, '-r', '2', + '--config-option', + 'config:miscellany:preserved-conflict-file-exts=' + + 'c txt h') + + sbox.simple_revert('file.txt') + sbox.simple_update('', revision=3) + sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True) + + # Merge - no preserve ext + expected_status = svntest.actions.get_virginal_state(wc_dir, 3) + expected_disk = svntest.main.greek_state.copy() + expected_status.add({ + 'file.txt' : Item(status='C ', wc_rev='3') + }) + expected_disk.add({ + 'file.txt.merge-left.r3' : Item(contents="This is the new content\n"), + 'file.txt.merge-right.r2': Item(contents="This is the initial content\n"), + 'file.txt' : Item(contents="<<<<<<< .working\n" \ + "This is conflicting content\n" \ + "=======\n" \ + "This is the initial content\n" \ + ">>>>>>> .merge-right.r2\n"), + 'file.txt.working' : Item(contents="This is conflicting content\n"), + }) + + svntest.actions.run_and_verify_svn(wc_dir, None, [], + 'merge', '-c-3', '^/', sbox.ospath('')) + svntest.actions.run_and_verify_status(wc_dir, expected_status) + svntest.actions.verify_disk(wc_dir, expected_disk) + + sbox.simple_revert('file.txt') + sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True) + + # Merge - preserve ext + expected_status = svntest.actions.get_virginal_state(wc_dir, 3) + expected_disk = svntest.main.greek_state.copy() + expected_status.add({ + 'file.txt' : Item(status='C ', wc_rev='3') + }) + expected_disk.add({ + 'file.txt.merge-left.r3.txt' : Item(contents="This is the new content\n"), + 'file.txt.merge-right.r2.txt': Item(contents="This is the initial content\n"), + 'file.txt' : Item(contents="<<<<<<< .working.txt\n" \ + "This is conflicting content\n" \ + "=======\n" \ + "This is the initial content\n" \ + ">>>>>>> .merge-right.r2.txt\n"), + 'file.txt.working.txt' : Item(contents="This is conflicting content\n"), + }) + + svntest.actions.run_and_verify_svn( + wc_dir, None, [], + 'merge', '-c-3', '^/', sbox.ospath(''), + '--config-option', + 'config:miscellany:preserved-conflict-file-exts=' + + 'c txt h') + svntest.actions.run_and_verify_status(wc_dir, expected_status) + svntest.actions.verify_disk(wc_dir, expected_disk) + ######################################################################## # Run the tests @@ -19288,6 +19441,8 @@ test_list = [ None, single_editor_drive_merge_notifications, conflicted_split_merge_with_resolve, merge_to_empty_target_merge_to_infinite_target, + merge_dir_delete_force, + conflict_naming, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/move_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/move_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/move_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/move_tests.py Wed Nov 19 14:37:04 2014 @@ -1396,6 +1396,51 @@ def move_many_update_add(sbox): None, None, None, wc_dir, '--accept', 'mine-conflict') +@Issue(4437) +def move_del_moved(sbox): + "delete moved node, still a move" + sbox.build() + wc_dir = sbox.wc_dir + + sbox.simple_mkdir('A/NEW') + sbox.simple_move('A/mu', 'A/NEW/mu') + sbox.simple_rm('A/NEW/mu') + + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('A/mu', status='D ') + expected_status.add({ + 'A/NEW' : Item(status='A ', wc_rev='-') + }) + + # A/mu still reports that it is moved to A/NEW/mu, while it is already + # deleted there. + svntest.actions.run_and_verify_status(wc_dir, expected_status) + +def copy_move_commit(sbox): + "copy, move and commit" + + sbox.build() + wc_dir = sbox.wc_dir + #repro + # Prepare + # - Create folder aaa + # - Add file bbb.sql + # create table bbb (Id int not null) + # - Commit + # Repro Issue 2 + # - Copy folder aaa under same parent folder (i.e. as a sibling). (using Ctrl drag/drop). + # Creates Copy of aaa + # - Rename Copy of aaa to eee + # - Commit + # Get error need to update + # - Update + # - Commit + # Get error need to update + + sbox.simple_copy('A/D/G', 'A/D/GG') + sbox.simple_move('A/D/GG', 'A/D/GG-moved') + sbox.simple_commit('A/D/GG-moved') + def move_to_from_external(sbox): "move to and from an external" @@ -1433,6 +1478,8 @@ test_list = [ None, move_missing, move_many_update_delete, move_many_update_add, + move_del_moved, + copy_move_commit, move_to_from_external, ] Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/prop_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/prop_tests.py Wed Nov 19 14:37:04 2014 @@ -2654,6 +2654,20 @@ def iprops_list_abspath(sbox): '--show-inherited-props', '-v', os.path.abspath(sbox.ospath(''))) +def wc_propop_on_url(sbox): + "perform wc specific operations on url" + + sbox.build(create_wc = False) + + svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path', + 'pl', '-r', 'PREV', + sbox.repo_url) + + svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path', + 'pg', 'my:Q', '-r', 'PREV', + sbox.repo_url) + + ######################################################################## # Run the tests @@ -2700,6 +2714,7 @@ test_list = [ None, almost_known_prop_names, peg_rev_base_working, iprops_list_abspath, + wc_propop_on_url, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/stat_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/stat_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/stat_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/stat_tests.py Wed Nov 19 14:37:04 2014 @@ -2119,6 +2119,95 @@ def status_path_handling(sbox): expected_status = svntest.actions.get_virginal_state(rel_wc_dir, 1) svntest.actions.run_and_verify_status(rel_wc_dir, expected_status) +def status_move_missing_direct(sbox): + "move information when status is called directly" + + sbox.build() + sbox.simple_copy('A', 'Z') + sbox.simple_commit('') + sbox.simple_update('') + + sbox.simple_move('Z', 'ZZ') + sbox.simple_move('A', 'Z') + sbox.simple_move('Z/B', 'ZB') + sbox.simple_mkdir('Z/B') + sbox.simple_move('ZB/E', 'Z/B/E') + + # Somehow 'svn status' now shows different output for 'ZB/E' + # when called directly and via an ancestor, as this handles + # multi-layer in a different way + + # Note that the status output may change over different Subversion revisions, + # but the status on a node should be identical anyway 'svn status' is called + # on it. + + expected_output = [ + 'A + %s\n' % sbox.ospath('ZB'), + ' > moved from %s\n' % os.path.join('..', 'Z', 'B'), + 'D + %s\n' % sbox.ospath('ZB/E'), + ' > moved to %s\n' % os.path.join('..', 'Z', 'B', 'E'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], 'status', + sbox.ospath('ZB'), '--depth', 'immediates') + + # And calling svn status on just 'ZB/E' should have the same result for this node + # except that we calculate the relative path from a different base + expected_output = [ + 'D + %s\n' % sbox.ospath('ZB/E'), + ' > moved to %s\n' % os.path.join('..', '..', 'Z', 'B', 'E'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], 'status', + sbox.ospath('ZB/E'), '--depth', 'empty') + +def status_move_missing_direct_base(sbox): + "move when status is called directly with base" + + sbox.build() + sbox.simple_copy('A', 'Z') + sbox.simple_mkdir('Q') + sbox.simple_mkdir('Q/ZB') + sbox.simple_mkdir('Q/ZB/E') + sbox.simple_commit('') + sbox.simple_update('') + + sbox.simple_rm('Q') + sbox.simple_mkdir('Q') + + sbox.simple_move('Z', 'ZZ') + sbox.simple_move('A', 'Z') + sbox.simple_move('Z/B', 'Q/ZB') + sbox.simple_mkdir('Z/B') + sbox.simple_move('Q/ZB/E', 'Z/B/E') + + # Somehow 'svn status' now shows different output for 'Q/ZB/E' + # when called directly and via an ancestor, as this handles + # multi-layer in a different way + + # Note that the status output may change over different Subversion revisions, + # but the status on a node should be identical anyway 'svn status' is called + # on it. + + # This test had a different result as status_move_missing_direct at the time of + # writing this test. + + expected_output = [ + 'A + %s\n' % sbox.ospath('Q/ZB'), + ' > moved from %s\n' % os.path.join('..', '..', 'Z', 'B'), + 'D + %s\n' % sbox.ospath('Q/ZB/E'), + ' > moved to %s\n' % os.path.join('..', '..', 'Z', 'B', 'E'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], 'status', + sbox.ospath('Q/ZB'), '--depth', 'immediates') + + # And calling svn status on just 'ZB/E' should have the same result for this node, + # except that the moved_to information is calculated from the node itself + expected_output = [ + 'D + %s\n' % sbox.ospath('Q/ZB/E'), + ' > moved to %s\n' % os.path.join('..', '..', '..', 'Z', 'B', 'E'), + ] + svntest.actions.run_and_verify_svn(None, expected_output, [], 'status', + sbox.ospath('Q/ZB/E'), '--depth', 'empty') + ######################################################################## # Run the tests @@ -2167,6 +2256,8 @@ test_list = [ None, status_case_changed, move_update_timestamps, status_path_handling, + status_move_missing_direct, + status_move_missing_direct_base, ] if __name__ == '__main__': Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svndumpfilter_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svndumpfilter_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svndumpfilter_tests.py Wed Nov 19 14:37:04 2014 @@ -559,7 +559,7 @@ def dropped_but_not_renumbered_empty_rev full_dump_contents = open(full_dump).read() filtered_dumpfile, filtered_out = filter_and_return_output( full_dump_contents, - 8192, # Set a sufficiently large bufsize to avoid a deadlock + 16384, # Set a sufficiently large bufsize to avoid a deadlock "exclude", "branches/B2", "--skip-missing-merge-sources", "--drop-empty-revs") Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svntest/main.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svntest/main.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svntest/main.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/svntest/main.py Wed Nov 19 14:37:04 2014 @@ -922,7 +922,8 @@ def create_repos(path, minor_version = N if options.fs_type is None or options.fs_type == 'fsfs': # fsfs.conf file - if options.config_file is not None: + if options.config_file is not None and \ + (not minor_version or minor_version >= 6): shutil.copy(options.config_file, get_fsfs_conf_file_path(path)) # format file Modified: subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/wc_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/wc_tests.py?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/wc_tests.py (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/cmdline/wc_tests.py Wed Nov 19 14:37:04 2014 @@ -118,8 +118,13 @@ def add_with_symlink_in_path(sbox): sbox.simple_append('A/B/kappa', 'xyz', True) sbox.simple_add('Z/B/kappa') +def is_posix_os_and_not_root(): + if not svntest.main.is_posix_os(): + return False + return os.getuid() != 0 + @Issue(4118) -@SkipUnless(svntest.main.is_posix_os) +@SkipUnless(is_posix_os_and_not_root) def status_with_inaccessible_wc_db(sbox): """inaccessible .svn/wc.db""" Modified: subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_diff/parse-diff-test.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_diff/parse-diff-test.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_diff/parse-diff-test.c Wed Nov 19 14:37:04 2014 @@ -132,8 +132,6 @@ static const char *bad_git_diff_header = "diff --git foo4 b/foo4" NL "diff --git a/foo5 b/foo5" NL "random noise" NL - "copy from foo5" NL - "copy to foo5" NL "diff --git a/foo6 b/foo6" NL "copy from foo6" NL "random noise" NL Modified: subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_fs_fs/fs-pack-test.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_fs_fs/fs-pack-test.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_fs_fs/fs-pack-test.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_fs_fs/fs-pack-test.c Wed Nov 19 14:37:04 2014 @@ -38,6 +38,16 @@ /*** Helper Functions ***/ +static void +ignore_fs_warnings(void *baton, svn_error_t *err) +{ +#ifdef SVN_DEBUG + SVN_DBG(("Ignoring FS warning %s\n", + svn_error_symbolic_name(err ? err->apr_err : 0))); +#endif + return; +} + /* Write the format number and maximum number of files per directory to a new format file in PATH, overwriting a previously existing file. Use POOL for temporary allocation. @@ -857,6 +867,57 @@ get_set_multiple_huge_revprops_packed_fs #undef SHARD_SIZE /* ------------------------------------------------------------------------ */ + +#define REPO_NAME "revprop_caching_on_off" +static svn_error_t * +revprop_caching_on_off(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + svn_fs_t *fs1; + svn_fs_t *fs2; + apr_hash_t *fs_config; + svn_string_t *value; + const svn_string_t *another_value_for_avoiding_warnings_from_a_broken_api; + const svn_string_t *new_value = svn_string_create("new", pool); + + if (strcmp(opts->fs_type, "fsfs") != 0) + return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL); + + /* Open two filesystem objects, enable revision property caching + * in one of them. */ + SVN_ERR(svn_test__create_fs(&fs1, REPO_NAME, opts, pool)); + + fs_config = apr_hash_make(pool); + apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, + APR_HASH_KEY_STRING, "1"); + + SVN_ERR(svn_fs_open(&fs2, svn_fs_path(fs1, pool), fs_config, pool)); + + /* With inefficient named atomics, the filesystem will output a warning + and disable the revprop caching, but we still would like to test + these cases. Ignore the warning(s). */ + svn_fs_set_warning_func(fs2, ignore_fs_warnings, NULL); + + SVN_ERR(svn_fs_revision_prop(&value, fs2, 0, "svn:date", pool)); + another_value_for_avoiding_warnings_from_a_broken_api = value; + SVN_ERR(svn_fs_change_rev_prop2( + fs1, 0, "svn:date", + &another_value_for_avoiding_warnings_from_a_broken_api, + new_value, pool)); + + /* Expect the change to be visible through both objects.*/ + SVN_ERR(svn_fs_revision_prop(&value, fs1, 0, "svn:date", pool)); + SVN_TEST_STRING_ASSERT(value->data, "new"); + + SVN_ERR(svn_fs_revision_prop(&value, fs2, 0, "svn:date", pool)); + SVN_TEST_STRING_ASSERT(value->data, "new"); + + return SVN_NO_ERROR; +} + +#undef REPO_NAME + +/* ------------------------------------------------------------------------ */ /* The test table. */ @@ -883,5 +944,7 @@ struct svn_test_descriptor_t test_funcs[ "test file hint at shard boundary"), SVN_TEST_OPTS_PASS(get_set_multiple_huge_revprops_packed_fs, "set multiple huge revprops in packed FSFS"), + SVN_TEST_OPTS_PASS(revprop_caching_on_off, + "change revprops with enabled and disabled caching"), SVN_TEST_NULL }; Modified: subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_subr/dirent_uri-test.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_subr/dirent_uri-test.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Nov 19 14:37:04 2014 @@ -37,6 +37,7 @@ #include "svn_pools.h" #include "svn_dirent_uri.h" #include "private/svn_fspath.h" +#include "private/svn_cert.h" #include "../svn_test.h" @@ -2714,6 +2715,145 @@ test_fspath_get_longest_ancestor(apr_poo return SVN_NO_ERROR; } +struct cert_match_dns_test { + const char *pattern; + const char *hostname; + svn_boolean_t expected; +}; + +static svn_error_t * +run_cert_match_dns_tests(struct cert_match_dns_test *tests, apr_pool_t *pool) +{ + struct cert_match_dns_test *ct; + apr_pool_t *iterpool = svn_pool_create(pool); + + for (ct = tests; ct->pattern; ct++) + { + svn_boolean_t result; + svn_string_t *pattern, *hostname; + + svn_pool_clear(iterpool); + + pattern = svn_string_create(ct->pattern, iterpool); + hostname = svn_string_create(ct->hostname, iterpool); + + result = svn_cert__match_dns_identity(pattern, hostname); + if (result != ct->expected) + return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, + "Expected %s but got %s for pattern '%s' on " + "hostname '%s'", + ct->expected ? "match" : "no match", + result ? "match" : "no match", + pattern->data, hostname->data); + + } + + svn_pool_destroy(iterpool); + + return SVN_NO_ERROR; +} + +static struct cert_match_dns_test cert_match_dns_tests[] = { + { "foo.example.com", "foo.example.com", TRUE }, /* exact match */ + { "foo.example.com", "FOO.EXAMPLE.COM", TRUE }, /* case differences */ + { "FOO.EXAMPLE.COM", "foo.example.com", TRUE }, + { "*.example.com", "FoO.ExAmPlE.CoM", TRUE }, + { "*.ExAmPlE.CoM", "foo.example.com", TRUE }, + { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", TRUE }, + { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TRUE }, + { "foo.example.com", "bar.example.com", FALSE }, /* difference at start */ + { "foo.example.com", "foo.example.net", FALSE }, /* difference at end */ + { "foo.example.com", "foo.example.commercial", FALSE }, /* hostname longer */ + { "foo.example.commercial", "foo.example.com", FALSE }, /* pattern longer */ + { "foo.example.comcom", "foo.example.com", FALSE }, /* repeated suffix */ + { "foo.example.com", "foo.example.comcom", FALSE }, + { "foo.example.com.com", "foo.example.com", FALSE }, + { "foo.example.com", "foo.example.com.com", FALSE }, + { "foofoo.example.com", "foo.example.com", FALSE }, /* repeated prefix */ + { "foo.example.com", "foofoo.example.com", FALSE }, + { "foo.foo.example.com", "foo.example.com", FALSE }, + { "foo.example.com", "foo.foo.example.com", FALSE }, + { "foo.*.example.com", "foo.bar.example.com", FALSE }, /* RFC 6125 s. 6.4.3 + Rule 1 */ + { "*.example.com", "foo.example.com", TRUE }, /* RFC 6125 s. 6.4.3 Rule 2 */ + { "*.example.com", "bar.foo.example.com", FALSE }, /* Rule 2 */ + { "*.example.com", "example.com", FALSE }, /* Rule 2 */ + { "*.example.com", ".example.com", FALSE }, /* RFC doesn't say what to do + here and a leading period on + a hostname doesn't make sense + so we'll just reject this. */ + { "*", "foo.example.com", FALSE }, /* wildcard must be left-most label, + implies that there must be more than + one label. */ + { "*", "example.com", FALSE }, + { "*", "com", FALSE }, + { "*.example.com", "foo.example.net", FALSE }, /* difference in literal text + with a wildcard. */ + { "*.com", "example.com", TRUE }, /* See Errata ID 3090 for RFC 6125, + probably shouldn't allow this but + we do for now. */ + { "*.", "example.com", FALSE }, /* test some dubious 2 character wildcard + patterns */ + { "*.", "example.", TRUE }, /* This one feels questionable */ + { "*.", "example", FALSE }, + { "*.", ".", FALSE }, + { "a", "a", TRUE }, /* check that single letter exact matches work */ + { "a", "b", FALSE }, /* and single letter not matches shouldn't */ + { "*.*.com", "foo.example.com", FALSE }, /* unsupported wildcards */ + { "*.*.com", "example.com", FALSE }, + { "**.example.com", "foo.example.com", FALSE }, + { "**.example.com", "example.com", FALSE }, + { "f*.example.com", "foo.example.com", FALSE }, + { "f*.example.com", "bar.example.com", FALSE }, + { "*o.example.com", "foo.example.com", FALSE }, + { "*o.example.com", "bar.example.com", FALSE }, + { "f*o.example.com", "foo.example.com", FALSE }, + { "f*o.example.com", "bar.example.com", FALSE }, + { "foo.e*.com", "foo.example.com", FALSE }, + { "foo.*e.com", "foo.example.com", FALSE }, + { "foo.e*e.com", "foo.example.com", FALSE }, + { "foo.example.com", "foo.example.com.", TRUE }, /* trailing dot */ + { "*.example.com", "foo.example.com.", TRUE }, + { "foo", "foo.", TRUE }, + { "foo.example.com.", "foo.example.com", FALSE }, + { "*.example.com.", "foo.example.com", FALSE }, + { "foo.", "foo", FALSE }, + { "foo.example.com", "foo.example.com..", FALSE }, + { "*.example.com", "foo.example.com..", FALSE }, + { "foo", "foo..", FALSE }, + { "foo.example.com..", "foo.example.com", FALSE }, + { "*.example.com..", "foo.example.com", FALSE }, + { "foo..", "foo", FALSE }, + { NULL } +}; + +static svn_error_t * +test_cert_match_dns_identity(apr_pool_t *pool) +{ + return run_cert_match_dns_tests(cert_match_dns_tests, pool); +} + +/* This test table implements results that should happen if we supported + * RFC 6125 s. 6.4.3 Rule 3. We don't so it's expected to fail for now. */ +static struct cert_match_dns_test rule3_tests[] = { + { "baz*.example.net", "baz1.example.net", TRUE }, + { "*baz.example.net", "foobaz.example.net", TRUE }, + { "b*z.example.net", "buuz.example.net", TRUE }, + { "b*z.example.net", "bz.example.net", FALSE }, /* presume wildcard can't + match nothing */ + { "baz*.example.net", "baz.example.net", FALSE }, + { "*baz.example.net", "baz.example.net", FALSE }, + { "b*z.example.net", "buuzuuz.example.net", TRUE }, /* presume wildcard + should be greedy */ + { NULL } +}; + +static svn_error_t * +test_rule3(apr_pool_t *pool) +{ + return run_cert_match_dns_tests(rule3_tests, pool); +} + /* The test table. */ @@ -2812,5 +2952,9 @@ struct svn_test_descriptor_t test_funcs[ "test svn_fspath__dirname/basename/split"), SVN_TEST_PASS2(test_fspath_get_longest_ancestor, "test svn_fspath__get_longest_ancestor"), + SVN_TEST_PASS2(test_cert_match_dns_identity, + "test svn_cert__match_dns_identity"), + SVN_TEST_XFAIL2(test_rule3, + "test match with RFC 6125 s. 6.4.3 Rule 3"), SVN_TEST_NULL }; Modified: subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_wc/conflict-data-test.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_wc/conflict-data-test.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/tests/libsvn_wc/conflict-data-test.c Wed Nov 19 14:37:04 2014 @@ -740,7 +740,7 @@ test_prop_conflicts(const svn_test_opts_ svn_error_t *err; const char *lock_abspath; test_prop_conflict_baton_t *b = apr_pcalloc(pool, sizeof(*b)); - svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*b)); + svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*desc)); SVN_ERR(svn_test__sandbox_create(&sbox, "test_prop_conflicts", opts, pool));
