Modified: subversion/branches/tree-read-api/subversion/svn/schema/info.rnc URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/svn/schema/info.rnc?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/svn/schema/info.rnc (original) +++ subversion/branches/tree-read-api/subversion/svn/schema/info.rnc Fri Nov 30 18:12:52 2012 @@ -27,8 +27,8 @@ info = element info { entry* } entry = element entry { - attlist.entry, url?, repository?, wc-info?, commit?, conflict?, lock?, - tree-conflict? + attlist.entry, url?, relative-url?, repository?, wc-info?, + commit?, conflict?, lock?, tree-conflict? } attlist.entry &= ## Local path. @@ -41,6 +41,9 @@ attlist.entry &= ## URL of this item in the repository. url = element url { xsd:anyURI } +## Repository relative URL (^/...) of this item in the repository. +relative-url = element relative-url { string } + ## Information of this item's repository. repository = element repository { root?, uuid? }
Modified: subversion/branches/tree-read-api/subversion/svnmucc/svnmucc.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/svnmucc/svnmucc.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/svnmucc/svnmucc.c (original) +++ subversion/branches/tree-read-api/subversion/svnmucc/svnmucc.c Fri Nov 30 18:12:52 2012 @@ -926,7 +926,7 @@ usage(apr_pool_t *pool, int exit_val) " -X, --extra-args ARG append arguments from file ARG (one per line;\n" " use \"-\" to read from standard input)\n" " --config-dir ARG use ARG to override the config directory\n" - " --config-option ARG use ARG so override a configuration option\n" + " --config-option ARG use ARG to override a configuration option\n" " --no-auth-cache do not cache authentication tokens\n" " --version print version information\n"; svn_error_clear(svn_cmdline_fputs(msg, stream, pool)); Modified: subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.c (original) +++ subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.c Fri Nov 30 18:12:52 2012 @@ -39,6 +39,7 @@ #include "svnrdump.h" #include "private/svn_cmdline_private.h" +#include "private/svn_ra_private.h" @@ -248,6 +249,81 @@ replay_revend(svn_revnum_t revision, return SVN_NO_ERROR; } +#ifdef USE_EV2_IMPL +/* Print dumpstream-formatted information about REVISION. + * Implements the `svn_ra_replay_revstart_callback_t' interface. + */ +static svn_error_t * +replay_revstart_v2(svn_revnum_t revision, + void *replay_baton, + svn_editor_t **editor, + apr_hash_t *rev_props, + apr_pool_t *pool) +{ + struct replay_baton *rb = replay_baton; + apr_hash_t *normal_props; + svn_stringbuf_t *propstring; + svn_stream_t *stdout_stream; + svn_stream_t *revprop_stream; + + SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool)); + + /* Revision-number: 19 */ + SVN_ERR(svn_stream_printf(stdout_stream, pool, + SVN_REPOS_DUMPFILE_REVISION_NUMBER + ": %ld\n", revision)); + SVN_ERR(svn_rdump__normalize_props(&normal_props, rev_props, pool)); + propstring = svn_stringbuf_create_ensure(0, pool); + revprop_stream = svn_stream_from_stringbuf(propstring, pool); + SVN_ERR(svn_hash_write2(normal_props, revprop_stream, "PROPS-END", pool)); + SVN_ERR(svn_stream_close(revprop_stream)); + + /* Prop-content-length: 13 */ + SVN_ERR(svn_stream_printf(stdout_stream, pool, + SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH + ": %" APR_SIZE_T_FMT "\n", propstring->len)); + + /* Content-length: 29 */ + SVN_ERR(svn_stream_printf(stdout_stream, pool, + SVN_REPOS_DUMPFILE_CONTENT_LENGTH + ": %" APR_SIZE_T_FMT "\n\n", propstring->len)); + + /* Property data. */ + SVN_ERR(svn_stream_write(stdout_stream, propstring->data, + &(propstring->len))); + + SVN_ERR(svn_stream_puts(stdout_stream, "\n")); + SVN_ERR(svn_stream_close(stdout_stream)); + + SVN_ERR(svn_rdump__get_dump_editor_v2(editor, revision, + rb->stdout_stream, + rb->extra_ra_session, + check_cancel, NULL, pool, pool)); + + return SVN_NO_ERROR; +} + +/* Print progress information about the dump of REVISION. + Implements the `svn_ra_replay_revfinish_callback_t' interface. */ +static svn_error_t * +replay_revend_v2(svn_revnum_t revision, + void *replay_baton, + svn_editor_t *editor, + apr_hash_t *rev_props, + apr_pool_t *pool) +{ + /* No resources left to free. */ + struct replay_baton *rb = replay_baton; + + SVN_ERR(svn_editor_complete(editor)); + + if (! rb->quiet) + SVN_ERR(svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu.\n", + revision)); + return SVN_NO_ERROR; +} +#endif + /* Initialize the RA layer, and set *CTX to a new client context baton * allocated from POOL. Use CONFIG_DIR and pass USERNAME, PASSWORD, * CONFIG_DIR and NO_AUTH_CACHE to initialize the authorization baton. @@ -391,9 +467,16 @@ replay_revisions(svn_ra_session_t *sessi if (incremental) { +#ifndef USE_EV2_IMPL SVN_ERR(svn_ra_replay_range(session, start_revision, end_revision, 0, TRUE, replay_revstart, replay_revend, replay_baton, pool)); +#else + SVN_ERR(svn_ra__replay_range_ev2(session, start_revision, end_revision, + 0, TRUE, replay_revstart_v2, + replay_revend_v2, replay_baton, + NULL, NULL, NULL, NULL, pool)); +#endif } else { @@ -432,9 +515,16 @@ replay_revisions(svn_ra_session_t *sessi /* Now go pick up additional revisions in the range, if any. */ if (start_revision <= end_revision) +#ifndef USE_EV2_IMPL SVN_ERR(svn_ra_replay_range(session, start_revision, end_revision, 0, TRUE, replay_revstart, replay_revend, replay_baton, pool)); +#else + SVN_ERR(svn_ra__replay_range_ev2(session, start_revision, end_revision, + 0, TRUE, replay_revstart_v2, + replay_revend_v2, replay_baton, + NULL, NULL, NULL, NULL, pool)); +#endif } SVN_ERR(svn_stream_close(stdout_stream)); Modified: subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.h URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.h?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.h (original) +++ subversion/branches/tree-read-api/subversion/svnrdump/svnrdump.h Fri Nov 30 18:12:52 2012 @@ -53,6 +53,17 @@ svn_rdump__get_dump_editor(const svn_del void *cancel_baton, apr_pool_t *pool); +/* Same as above, only returns an Ev2 editor. */ +svn_error_t * +svn_rdump__get_dump_editor_v2(svn_editor_t **editor, + svn_revnum_t revision, + svn_stream_t *stream, + svn_ra_session_t *ra_session, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *scratch_pool, + apr_pool_t *result_pool); + /** * Load the dumpstream carried in @a stream to the location described Modified: subversion/branches/tree-read-api/subversion/svnserve/cyrus_auth.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/svnserve/cyrus_auth.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/svnserve/cyrus_auth.c (original) +++ subversion/branches/tree-read-api/subversion/svnserve/cyrus_auth.c Fri Nov 30 18:12:52 2012 @@ -98,7 +98,7 @@ static int canonicalize_username(sasl_co static sasl_callback_t callbacks[] = { - { SASL_CB_CANON_USER, (void*)canonicalize_username, NULL }, + { SASL_CB_CANON_USER, (int (*)(void))canonicalize_username, NULL }, { SASL_CB_LIST_END, NULL, NULL } }; Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/diff_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/diff_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/diff_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/diff_tests.py Fri Nov 30 18:12:52 2012 @@ -196,8 +196,14 @@ def make_diff_prop_added(pname, pval): def make_diff_prop_modified(pname, pval1, pval2): """Return a property diff for modification of property PNAME, old value - PVAL1, new value PVAL2. PVAL is a single string with no embedded - newlines. Return the result as a list of newline-terminated strings.""" + PVAL1, new value PVAL2. + + PVAL is a single string with no embedded newlines. A newline at the + end is significant: without it, we add an extra line saying '\ No + newline at end of property'. + + Return the result as a list of newline-terminated strings. + """ return [ "Modified: " + pname + "\n", "## -1 +1 ##\n", @@ -4075,6 +4081,43 @@ def diff_properties_only(sbox): 'diff', '--properties-only', '-r', 'PREV', 'iota') +def diff_properties_no_newline(sbox): + "diff props; check no-newline-at-end messages" + + sbox.build() + old_cwd = os.getcwd() + os.chdir(sbox.wc_dir) + sbox.wc_dir = '' + + no_nl = "\\ No newline at end of property\n" + propchange_header = "Modified: p.*\n" + + subtests = [ + ('p1', 'val1', 'val2' ), + ('p2', 'val1', 'val2\n'), + ('p3', 'val1\n', 'val2' ), + ('p4', 'val1\n', 'val2\n'), + ] + + # The "before" state. + for pname, old_val, new_val in subtests: + sbox.simple_propset(pname, old_val, 'iota') + sbox.simple_commit() # r2 + + # Test one change at a time. (Because, with multiple changes, the order + # may not be predictable.) + for pname, old_val, new_val in subtests: + expected_output = \ + make_diff_header("iota", "revision 1", "working copy") + \ + make_diff_prop_header("iota") + \ + make_diff_prop_modified(pname, old_val, new_val) + + sbox.simple_propset(pname, new_val, 'iota') + svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff') + svntest.actions.run_and_verify_svn(None, None, [], 'revert', 'iota') + + os.chdir(old_cwd) + ######################################################################## #Run the tests @@ -4146,6 +4189,7 @@ test_list = [ None, diff_deleted_url, diff_arbitrary_files_and_dirs, diff_properties_only, + diff_properties_no_newline, ] if __name__ == '__main__': Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/externals_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/externals_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/externals_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/externals_tests.py Fri Nov 30 18:12:52 2012 @@ -2131,7 +2131,7 @@ def copy_file_externals(sbox): actions.run_and_verify_update(wc_dir, expected_output, expected_disk, expected_status, None, None, None, None, None, True, wc_dir) -def include_externals(sbox): +def commit_include_externals(sbox): "commit --include-externals" # svntest.factory.make(sbox, """ # mkdir Z @@ -2939,6 +2939,59 @@ def duplicate_targets(sbox): actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'pg', 'svn:externals', wc_dir) +@Issue(4225) +def list_include_externals(sbox): + "list with --include-externals" + + externals_test_setup(sbox) + + wc_dir = sbox.wc_dir + repo_url = sbox.repo_url + + svntest.actions.run_and_verify_svn(None, None, [], + 'checkout', + repo_url, wc_dir) + + B_path = sbox.ospath("A/B") + C_path = sbox.ospath("A/C") + + B_url = repo_url + "/A/B" + C_url = repo_url + "/A/C" + + def list_external_string(path, url): + string = "Listing external" + " '" + path + "' " + "defined on" + " '" + \ + url + "'" + ":" + return string + + expected_stdout = verify.UnorderedOutput([ + "E/" + "\n", + "F/" + "\n", + "lambda" + "\n", + list_external_string("gamma", B_url ) + "\n", + "gamma" + "\n"]) + + exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2( + "OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', B_path) + + exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2( + "OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', B_url) + + expected_stdout = verify.UnorderedOutput([ + list_external_string("exdir_G", C_url)+ "\n", + "pi" + "\n", + "rho" + "\n", + "tau" + "\n", + list_external_string("exdir_H", C_url) + "\n", + "chi" + "\n", + "omega" + "\n", + "psi" + "\n"]) + + exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2( + "OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', C_path) + + exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2( + "OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', C_url) + ######################################################################## @@ -2982,13 +3035,14 @@ test_list = [ None, file_externals_different_url, file_external_in_unversioned, copy_file_externals, - include_externals, + commit_include_externals, include_immediate_dir_externals, shadowing, remap_file_external_with_prop_del, dir_external_with_dash_r_only, url_to_wc_copy_of_externals, duplicate_targets, + list_include_externals, ] if __name__ == '__main__': Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/getopt_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/getopt_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/getopt_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/getopt_tests.py Fri Nov 30 18:12:52 2012 @@ -167,33 +167,11 @@ def run_one_test(sbox, basename, *vararg actual_stdout = process_lines(actual_stdout) actual_stderr = process_lines(actual_stderr) - if exp_stdout != actual_stdout: - logger.warn("Standard output does not match.") - logger.warn("Expected standard output:") - logger.warn("=====") - for x in exp_stdout: - logger.warn(x) - logger.warn("=====") - logger.warn("Actual standard output:") - logger.warn("=====") - for x in actual_stdout: - logger.warn(x) - logger.warn("=====") - raise svntest.Failure - - if exp_stderr != actual_stderr: - logger.warn("Standard error does not match.") - logger.warn("Expected standard error:") - logger.warn("=====") - for x in exp_stderr: - logger.warn(x) - logger.warn("=====") - logger.warn("Actual standard error:") - logger.warn("=====") - for x in actual_stderr: - logger.warn(x) - logger.warn("=====") - raise svntest.Failure + svntest.verify.compare_and_display_lines("Standard output does not match.", + "STDOUT", exp_stdout, actual_stdout) + + svntest.verify.compare_and_display_lines("Standard error does not match.", + "STDERR", exp_stderr, actual_stderr) def getopt_no_args(sbox): "run svn with no arguments" Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/info_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/info_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/info_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/info_tests.py Fri Nov 30 18:12:52 2012 @@ -221,6 +221,7 @@ def info_on_added_file(sbox): expected = {'Path' : re.escape(new_file), 'Name' : 'new_file', 'URL' : '.*/new_file', + 'Relative URL' : '.*/new_file', 'Repository Root' : '.*', 'Node Kind' : 'file', 'Schedule' : 'add', @@ -240,6 +241,7 @@ def info_on_added_file(sbox): 'path' : new_file, 'revision' : 'Resource is not under version control.'}), ('url', {}, '.*/new_file'), + ('relative-url', {}, '.*/new_file'), ('root', {}, '.*'), ('uuid', {}, uuid_regex), ('depth', {}, 'infinity'), @@ -259,6 +261,7 @@ def info_on_mkdir(sbox): # check that we have a Repository Root and Repository UUID expected = {'Path' : re.escape(new_dir), 'URL' : '.*/new_dir', + 'Relative URL' : '.*/new_dir', 'Repository Root' : '.*', 'Node Kind' : 'directory', 'Schedule' : 'add', @@ -277,6 +280,7 @@ def info_on_mkdir(sbox): 'path' : new_dir, 'revision' : 'Resource is not under version control.'}), ('url', {}, '.*/new_dir'), + ('relative-url', {}, '.*/new_dir'), ('root', {}, '.*'), ('uuid', {}, uuid_regex), ('depth', {}, 'infinity'), @@ -396,6 +400,7 @@ def info_repos_root_url(sbox): 'Path' : re.escape(os.path.basename(sbox.repo_dir)), 'Repository Root' : re.escape(sbox.repo_url), 'URL' : re.escape(sbox.repo_url), + 'Relative URL' : '\^/', # escape ^ -- this isn't a regexp 'Revision' : '1', 'Node Kind' : 'directory', 'Last Changed Rev' : '1', @@ -405,6 +410,7 @@ def info_repos_root_url(sbox): 'Name' : 'iota', 'Repository Root' : re.escape(sbox.repo_url), 'URL' : re.escape(sbox.repo_url + '/iota'), + 'Relative URL' : '\^/iota', # escape ^ -- this isn't a regexp 'Revision' : '1', 'Node Kind' : 'file', 'Last Changed Rev' : '1', Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/iprop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/iprop_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/iprop_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/iprop_tests.py Fri Nov 30 18:12:52 2012 @@ -1635,6 +1635,40 @@ def iprops_with_file_externals(sbox): sbox.ospath('A/B/E/file-external'), expected_iprops, expected_explicit_props) +def iprops_survive_commit(sbox): + "verify that iprops survive a commit" + + sbox.build() + sbox.simple_propset('key', 'D', 'A/B',) + sbox.simple_commit() + + svntest.main.run_svn(None, 'switch', sbox.repo_url + '/A/B/E', + sbox.ospath('A/D'), '--ignore-ancestry') + svntest.main.run_svn(None, 'switch', sbox.repo_url + '/A/B/F', + sbox.ospath('iota'), '--ignore-ancestry') + expected_iprops = { + sbox.repo_url + '/A/B' : {'key' : 'D'}, + } + + expected_explicit_props = {} + svntest.actions.run_and_verify_inherited_prop_xml(sbox.ospath('A/D'), + expected_iprops, + expected_explicit_props) + svntest.actions.run_and_verify_inherited_prop_xml(sbox.ospath('iota'), + expected_iprops, + expected_explicit_props) + + sbox.simple_propset('new', 'V', 'A/D', 'iota') + sbox.simple_commit() + + expected_explicit_props = {'new': 'V'} + svntest.actions.run_and_verify_inherited_prop_xml(sbox.ospath('A/D'), + expected_iprops, + expected_explicit_props) + svntest.actions.run_and_verify_inherited_prop_xml(sbox.ospath('iota'), + expected_iprops, + expected_explicit_props) + ######################################################################## # Run the tests @@ -1648,6 +1682,7 @@ test_list = [ None, iprops_shallow_operative_depths, iprops_with_directory_externals, iprops_with_file_externals, + iprops_survive_commit, ] if __name__ == '__main__': Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/merge_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/merge_tests.py Fri Nov 30 18:12:52 2012 @@ -526,6 +526,13 @@ def add_with_history(sbox): expected_skip = wc.State(C_path, { }) + # Add some unversioned directory obstructions to the incoming + # additions. This should be tolerated and *not* result in any + # difference between the --dry-run and actual merge. + # See http://svn.haxx.se/dev/archive-2012-11/0696.shtml + os.mkdir(sbox.ospath('A/C/Q')) + os.mkdir(sbox.ospath('A/C/Q2')) + svntest.actions.run_and_verify_merge(C_path, '1', '2', F_url, None, expected_output, expected_mergeinfo_output, Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/prop_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/prop_tests.py Fri Nov 30 18:12:52 2012 @@ -900,9 +900,9 @@ def prop_value_conversions(sbox): "svn: warning: W125005.*use 'svn propdel'") # Anything else should be untouched - svntest.actions.set_prop('svn:some-prop', 'bar', lambda_path) - svntest.actions.set_prop('svn:some-prop', ' bar baz', mu_path) - svntest.actions.set_prop('svn:some-prop', 'bar\n', iota_path) + svntest.actions.set_prop('svn:some-prop', 'bar', lambda_path, force=True) + svntest.actions.set_prop('svn:some-prop', ' bar baz', mu_path, force=True) + svntest.actions.set_prop('svn:some-prop', 'bar\n', iota_path, force=True) svntest.actions.set_prop('some-prop', 'bar', lambda_path) svntest.actions.set_prop('some-prop', ' bar baz', mu_path) svntest.actions.set_prop('some-prop', 'bar\n', iota_path) @@ -2670,6 +2670,37 @@ def inheritable_ignores(sbox): [], 'add', '.', '--force','--no-ignore', '--config-dir', config_dir) +def almost_known_prop_names(sbox): + "propset with svn: prefix but unknown name" + + sbox.build() + wc_dir = sbox.wc_dir + iota_path = sbox.ospath('iota') + + # Same prefix, different prop name + svntest.actions.set_prop('svn:exemutable', 'x', iota_path, + "svn: E195011: 'svn:exemutable' " + "is not a valid svn: property name") + svntest.actions.set_prop('svn:exemutable', 'x', iota_path, force=True) + + # Similar prefix, different prop name + svntest.actions.set_prop('svm:exemutable', 'x', iota_path) + + # Similar prefix, same prop name + svntest.actions.set_prop('svm:executable', 'x', iota_path, + "svn: E195011: 'svm:executable' " + "is not a valid svn: property name") + svntest.actions.set_prop('svm:executable', 'x', iota_path, force=True) + + # Different prefix, same prop name + svntest.actions.set_prop('tsvn:executable', 'x', iota_path) + + # Property name is too different to matter + svntest.actions.set_prop('svn:foobar', 'x', iota_path, + "svn: E195011: 'svn:foobar'" + " is not a valid svn: property name;" + " re-run with '--force' to set it") + ######################################################################## # Run the tests @@ -2713,6 +2744,7 @@ test_list = [ None, file_matching_dir_prop_reject, pristine_props_listed, inheritable_ignores, + almost_known_prop_names, ] if __name__ == '__main__': Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/stat_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/stat_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/stat_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/stat_tests.py Fri Nov 30 18:12:52 2012 @@ -1441,8 +1441,8 @@ def status_depth_local(sbox): # make some changes to the greek tree change_files(wc_dir, ['A/mu', 'A/D/gamma']) - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path) - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', A_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', D_path) # for all the possible types of depth, check the status @@ -1501,8 +1501,8 @@ def status_depth_update(sbox): # add some files, change directory properties change_files_and_commit(wc_dir, ['A/mu', 'A/D/gamma']) svntest.main.run_svn(None, 'up', wc_dir) - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path) - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', A_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', D_path) svntest.main.run_svn(None, 'ci', '-m', 'log message', wc_dir) # update to r1 @@ -1572,8 +1572,8 @@ def status_depth_update_local_modificati mu_path = os.path.join(A_path, 'mu') gamma_path = os.path.join(D_path, 'gamma') - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path) - svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', A_path) + svntest.main.run_svn(None, 'propset', '--force', 'svn:test', 'value', D_path) svntest.main.file_append(mu_path, 'modified') svntest.main.file_append(gamma_path, 'modified') Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/actions.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/actions.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/actions.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/actions.py Fri Nov 30 18:12:52 2012 @@ -1918,7 +1918,11 @@ def get_wc_base_rev(wc_dir): def hook_failure_message(hook_name): """Return the error message that the client prints for failure of the specified hook HOOK_NAME. The wording changed with Subversion 1.5.""" - if svntest.main.options.server_minor_version < 5: + + # Output depends on the server version, not the repository version. + # This gets the wrong result for modern servers with old format + # repositories. + if svntest.main.options.server_minor_version < 5 and not svntest.main.is_ra_type_file(): return "'%s' hook failed with error output:\n" % hook_name else: if hook_name in ["start-commit", "pre-commit"]: @@ -1985,8 +1989,12 @@ def create_failing_post_commit_hook(repo # set_prop can be used for properties with NULL characters which are not # handled correctly when passed to subprocess.Popen() and values like "*" # which are not handled correctly on Windows. -def set_prop(name, value, path, expected_re_string=None): +def set_prop(name, value, path, expected_re_string=None, force=None): """Set a property with specified value""" + if not force: + propset = ('propset',) + else: + propset = ('propset', '--force') if value and (value[0] == '-' or '\x00' in value or sys.platform == 'win32'): from tempfile import mkstemp (fd, value_file_path) = mkstemp() @@ -1995,12 +2003,12 @@ def set_prop(name, value, path, expected value_file.write(value) value_file.flush() value_file.close() - exit_code, out, err = main.run_svn(expected_re_string, 'propset', - '-F', value_file_path, name, path) + propset += ('-F', value_file_path, name, path) + exit_code, out, err = main.run_svn(expected_re_string, *propset) os.remove(value_file_path) else: - exit_code, out, err = main.run_svn(expected_re_string, 'propset', - name, value, path) + propset += (name, value, path) + exit_code, out, err = main.run_svn(expected_re_string, *propset) if expected_re_string: if not expected_re_string.startswith(".*"): expected_re_string = ".*(" + expected_re_string + ")" Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/switch_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/switch_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/switch_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/switch_tests.py Fri Nov 30 18:12:52 2012 @@ -586,6 +586,11 @@ def file_dir_file(sbox): if not os.path.isdir(file_path): raise svntest.Failure + # The reason the following switch currently fails is that the node + # is determined to be a 'root', because it is switched against its parent. + # In this specific case the switch editor is designed to be rooted on the node + # itself instead of its ancestor. If you would use sbox.ospath('A') for + # file_path the switch works both ways. svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--ignore-ancestry', file_url, file_path) if not os.path.isfile(file_path): Modified: subversion/branches/tree-read-api/subversion/tests/cmdline/update_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/cmdline/update_tests.py?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/cmdline/update_tests.py (original) +++ subversion/branches/tree-read-api/subversion/tests/cmdline/update_tests.py Fri Nov 30 18:12:52 2012 @@ -5523,6 +5523,16 @@ def update_to_HEAD_plus_1(sbox): None, None, None, None, None, wc_dir, '-r', '2') + other_wc = sbox.add_wc_path('other') + other_url = sbox.repo_url + '/A' + svntest.actions.run_and_verify_svn("subtree checkout", None, [], + 'co', other_url, other_wc) + svntest.actions.run_and_verify_update(other_wc, + None, None, None, + "E160006.*No such.*revision", + None, None, + None, None, None, other_wc, '-r', '2') + @XFail() def update_moved_dir_leaf_del(sbox): "update locally moved dir with leaf del" Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_fs/fs-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_fs/fs-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_fs/fs-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_fs/fs-test.c Fri Nov 30 18:12:52 2012 @@ -3533,8 +3533,8 @@ static int my_rand(apr_uint64_t scalar, { static const apr_uint32_t TEST_RAND_MAX = 0xffffffffUL; /* Assumes TEST_RAND_MAX+1 can be exactly represented in a double */ - apr_uint32_t rand = svn_test_rand(seed); - return (int)(((double)rand + apr_uint32_t r = svn_test_rand(seed); + return (int)(((double)r / ((double)TEST_RAND_MAX+1.0)) * (double)scalar); } @@ -4896,6 +4896,36 @@ node_history(const svn_test_opts_t *opts return SVN_NO_ERROR; } +/* Test svn_fs_delete_fs(). */ +static svn_error_t * +delete_fs(const svn_test_opts_t *opts, + apr_pool_t *pool) +{ + const char *path; + svn_node_kind_t kind; + + /* We have to use a subpool to close the svn_fs_t before calling + svn_fs_delete_fs. See issue 4264. */ + { + svn_fs_t *fs; + apr_pool_t *subpool = svn_pool_create(pool); + SVN_ERR(svn_test__create_fs(&fs, "test-repo-delete-fs", opts, subpool)); + path = svn_fs_path(fs, pool); + svn_pool_destroy(subpool); + } + + SVN_ERR(svn_io_check_path(path, &kind, pool)); + SVN_TEST_ASSERT(kind != svn_node_none); + SVN_ERR(svn_fs_delete_fs(path, pool)); + SVN_ERR(svn_io_check_path(path, &kind, pool)); + SVN_TEST_ASSERT(kind == svn_node_none); + + /* Recreate dir so that test cleanup doesn't fail. */ + SVN_ERR(svn_io_dir_make(path, APR_OS_DEFAULT, pool)); + + return SVN_NO_ERROR; +} + /* ------------------------------------------------------------------------ */ @@ -4979,5 +5009,7 @@ struct svn_test_descriptor_t test_funcs[ "create and modify small file"), SVN_TEST_OPTS_PASS(node_history, "test svn_fs_node_history"), + SVN_TEST_OPTS_PASS(delete_fs, + "test svn_fs_delete_fs"), SVN_TEST_NULL }; Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_repos/repos-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_repos/repos-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_repos/repos-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_repos/repos-test.c Fri Nov 30 18:12:52 2012 @@ -49,6 +49,20 @@ #define MIN(a,b) (((a)<(b))?(a):(b)) #endif +/* Compare strings, like strcmp but either or both may be NULL which + * compares equal to NULL and not equal to any non-NULL string. */ +static int +strcmp_null(const char *s1, const char *s2) +{ + if (s1 && s2) + return strcmp(s1, s2); + else if (s1 || s2) + return 1; + else + return 0; +} + + static svn_error_t * dir_deltas(const svn_test_opts_t *opts, @@ -1739,7 +1753,9 @@ nls_receiver(svn_location_segment_t *seg "Got unexpected location segment: %s", format_segment(segment, pool)); - if (expected_segment->range_start != segment->range_start) + if (expected_segment->range_start != segment->range_start + || expected_segment->range_end != segment->range_end + || strcmp_null(expected_segment->path, segment->path) != 0) return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, "Location segments differ\n" " Expected location segment: %s\n" @@ -1950,7 +1966,7 @@ node_location_segments(const svn_test_op { 6, 6, "A/D2/G" }, { 5, 5, NULL }, { 3, 4, "A/D2/G" }, - { 1, 2, "A/D2/G" }, + { 1, 2, "A/D/G" }, { 0 } }; SVN_ERR(check_location_segments(repos, "A/D/G", @@ -1965,7 +1981,7 @@ node_location_segments(const svn_test_op svn_location_segment_t expected_segments[] = { { 3, 3, "A/D2/G" }, - { 2, 2, "A/D2/G" }, + { 2, 2, "A/D/G" }, { 0 } }; SVN_ERR(check_location_segments(repos, "A/D/G", Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_subr/path-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_subr/path-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_subr/path-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_subr/path-test.c Fri Nov 30 18:12:52 2012 @@ -1202,7 +1202,6 @@ test_path_splitext(apr_pool_t *pool) const char *path; const char *path_root; const char *path_ext; - svn_boolean_t result; } tests[] = { { "no-ext", "no-ext", "" }, { "test-file.py", "test-file.", "py" }, Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_subr/spillbuf-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_subr/spillbuf-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_subr/spillbuf-test.c Fri Nov 30 18:12:52 2012 @@ -28,9 +28,9 @@ #include "../svn_test.h" -static const char basic_data[] = ("abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789"); +static const char basic_data[] = "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789"; /* Validate that BUF is STARTING_SIZE in length. Then read some data from Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_subr/string-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_subr/string-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_subr/string-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_subr/string-test.c Fri Nov 30 18:12:52 2012 @@ -612,6 +612,105 @@ test_stringbuf_replace(apr_pool_t *pool) return expect_stringbuf_equal(a, "test hello, world!!!", pool); } +static svn_error_t * +test_string_similarity(apr_pool_t *pool) +{ + const struct sim_score_test_t + { + const char *stra; + const char *strb; + apr_size_t lcs; + int score; + } tests[] = + { +#define SCORE(lcs, len) ((2000 * (lcs) + (len)/2) / (len)) + + /* Equality */ + {"", "", 0, 1000}, + {"quoth", "quoth", 5, SCORE(5, 5+5)}, + + /* Deletion at start */ + {"quoth", "uoth", 4, SCORE(4, 5+4)}, + {"uoth", "quoth", 4, SCORE(4, 4+5)}, + + /* Deletion at end */ + {"quoth", "quot", 4, SCORE(4, 5+4)}, + {"quot", "quoth", 4, SCORE(4, 4+5)}, + + /* Insertion at start */ + {"quoth", "Xquoth", 5, SCORE(5, 5+6)}, + {"Xquoth", "quoth", 5, SCORE(5, 6+5)}, + + /* Insertion at end */ + {"quoth", "quothX", 5, SCORE(5, 5+6)}, + {"quothX", "quoth", 5, SCORE(5, 6+5)}, + + /* Insertion in middle */ + {"quoth", "quoXth", 5, SCORE(5, 5+6)}, + {"quoXth", "quoth", 5, SCORE(5, 6+5)}, + + /* Transposition at start */ + {"quoth", "uqoth", 4, SCORE(4, 5+5)}, + {"uqoth", "quoth", 4, SCORE(4, 5+5)}, + + /* Transposition at end */ + {"quoth", "quoht", 4, SCORE(4, 5+5)}, + {"quoht", "quoth", 4, SCORE(4, 5+5)}, + + /* Transposition in middle */ + {"quoth", "qutoh", 4, SCORE(4, 5+5)}, + {"qutoh", "quoth", 4, SCORE(4, 5+5)}, + + /* Difference */ + {"quoth", "raven", 0, SCORE(0, 5+5)}, + {"raven", "quoth", 0, SCORE(0, 5+5)}, + {"x", "", 0, SCORE(0, 1+0)}, + {"", "x", 0, SCORE(0, 0+1)}, + {"", "quoth", 0, SCORE(0, 0+5)}, + {"quoth", "", 0, SCORE(0, 5+0)}, + {"quoth", "the raven", 2, SCORE(2, 5+9)}, + {"the raven", "quoth", 2, SCORE(2, 5+9)}, + {NULL, NULL} + }; + + const struct sim_score_test_t *t; + svn_membuf_t buffer; + + svn_membuf__create(&buffer, 0, pool); + for (t = tests; t->stra; ++t) + { + apr_size_t lcs; + const unsigned int score = + svn_cstring__similarity(t->stra, t->strb, &buffer, &lcs); + /* + fprintf(stderr, + "lcs %s ~ %s score %.3f (%"APR_SIZE_T_FMT + ") expected %.3f (%"APR_SIZE_T_FMT"))\n", + t->stra, t->strb, score/1000.0, lcs, t->score/1000.0, t->lcs); + */ + if (score != t->score) + return fail(pool, "%s ~ %s score %.3f <> expected %.3f", + t->stra, t->strb, score/1000.0, t->score/1000.0); + + if (lcs != t->lcs) + return fail(pool, + "%s ~ %s lcs %"APR_SIZE_T_FMT + " <> expected %"APR_SIZE_T_FMT, + t->stra, t->strb, lcs, t->lcs); + } + + /* Test partial similarity */ + { + const svn_string_t foo = {"svn:foo", 4}; + const svn_string_t bar = {"svn:bar", 4}; + if (1000 != svn_string__similarity(&foo, &bar, &buffer, NULL)) + return fail(pool, "'%s'[:4] ~ '%s'[:4] found different", + foo.data, bar.data); + } + + return SVN_NO_ERROR; +} + /* ==================================================================== If you add a new test to this file, update this array. @@ -677,5 +776,7 @@ struct svn_test_descriptor_t test_funcs[ "check deletion from svn_stringbuf_t"), SVN_TEST_PASS2(test_stringbuf_replace, "check replacement in svn_stringbuf_t"), + SVN_TEST_PASS2(test_string_similarity, + "test string similarity scores"), SVN_TEST_NULL }; Propchange: subversion/branches/tree-read-api/subversion/tests/libsvn_wc/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Fri Nov 30 18:12:52 2012 @@ -11,3 +11,4 @@ tree-conflict-data-test wc-incomplete-tester wc-lock-tester wc-queries-test +wc-test Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_wc/db-test.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_wc/db-test.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_wc/db-test.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_wc/db-test.c Fri Nov 30 18:12:52 2012 @@ -664,7 +664,7 @@ test_inserting_nodes(apr_pool_t *pool) props, 1, TIME_1a, AUTHOR_1, checksum, - NULL, FALSE, FALSE, NULL, FALSE, FALSE, + NULL, FALSE, FALSE, NULL, NULL, FALSE, FALSE, NULL, NULL, pool)); @@ -677,7 +677,7 @@ test_inserting_nodes(apr_pool_t *pool) props, 1, TIME_1a, AUTHOR_1, "O-target", - NULL, FALSE, FALSE, NULL, FALSE, FALSE, + NULL, FALSE, FALSE, NULL, NULL, FALSE, FALSE, NULL, NULL, pool)); Modified: subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.c (original) +++ subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.c Fri Nov 30 18:12:52 2012 @@ -293,7 +293,7 @@ sbox_wc_commit(svn_test__sandbox_t *b, c sizeof(const char *)); APR_ARRAY_PUSH(targets, const char *) = sbox_wc_path(b, path); - SVN_ERR(svn_client_create_context(&ctx, b->pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); return svn_client_commit5(targets, svn_depth_infinity, FALSE, FALSE, TRUE, /* keep locks/cl's/use_ops*/ NULL, NULL, NULL, NULL, ctx, b->pool); @@ -312,7 +312,7 @@ sbox_wc_update(svn_test__sandbox_t *b, c revision.value.number = revnum; APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path); - SVN_ERR(svn_client_create_context(&ctx, b->pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); return svn_client_update4(&result_revs, paths, &revision, svn_depth_infinity, TRUE, FALSE, FALSE, FALSE, FALSE, ctx, b->pool); @@ -323,8 +323,9 @@ sbox_wc_resolved(svn_test__sandbox_t *b, { svn_client_ctx_t *ctx; - SVN_ERR(svn_client_create_context(&ctx, b->pool)); - return svn_client_resolved(sbox_wc_path(b, path), TRUE, ctx, b->pool); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); + return svn_client_resolve(sbox_wc_path(b, path), svn_depth_infinity, + svn_wc_conflict_choose_merged, ctx, b->pool); } svn_error_t * @@ -332,7 +333,7 @@ sbox_wc_resolve(svn_test__sandbox_t *b, { svn_client_ctx_t *ctx; - SVN_ERR(svn_client_create_context(&ctx, b->pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); return svn_client_resolve(sbox_wc_path(b, path), svn_depth_infinity, svn_wc_conflict_choose_mine_conflict, ctx, b->pool); @@ -345,7 +346,7 @@ sbox_wc_move(svn_test__sandbox_t *b, con apr_array_header_t *paths = apr_array_make(b->pool, 1, sizeof(const char *)); - SVN_ERR(svn_client_create_context(&ctx, b->pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, src); return svn_client_move6(paths, sbox_wc_path(b, dst), FALSE, FALSE, NULL, NULL, NULL, ctx, b->pool); @@ -361,7 +362,7 @@ sbox_wc_propset(svn_test__sandbox_t *b, apr_array_header_t *paths = apr_array_make(b->pool, 1, sizeof(const char *)); - SVN_ERR(svn_client_create_context(&ctx, b->pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool)); APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path); return svn_client_propset_local(name, svn_string_create(value, b->pool), paths, svn_depth_empty, TRUE, NULL, ctx, Modified: subversion/branches/tree-read-api/subversion/tests/svn_test_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/tests/svn_test_fs.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/subversion/tests/svn_test_fs.c (original) +++ subversion/branches/tree-read-api/subversion/tests/svn_test_fs.c Fri Nov 30 18:12:52 2012 @@ -115,10 +115,14 @@ create_fs(svn_fs_t **fs_p, if (apr_stat(&finfo, name, APR_FINFO_TYPE, pool) == APR_SUCCESS) { if (finfo.filetype == APR_DIR) - SVN_ERR(svn_fs_delete_fs(name, pool)); + SVN_ERR_W(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool), + apr_psprintf(pool, + "cannot create fs '%s' there is already " + "a directory of that name", name)); else return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, - "there is already a file named '%s'", name); + "cannot create fs '%s' there is already " + "a file of that name", name); } SVN_ERR(svn_fs_create(fs_p, name, fs_config, pool)); Modified: subversion/branches/tree-read-api/tools/client-side/svn-bench/null-list-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/tools/client-side/svn-bench/null-list-cmd.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/tools/client-side/svn-bench/null-list-cmd.c (original) +++ subversion/branches/tree-read-api/tools/client-side/svn-bench/null-list-cmd.c Fri Nov 30 18:12:52 2012 @@ -48,7 +48,7 @@ struct print_baton { svn_client_ctx_t *ctx; }; -/* This implements the svn_client_list_func_t API, printing a single +/* This implements the svn_client_list_func2_t API, printing a single directory entry in text format. */ static svn_error_t * print_dirent(void *baton, @@ -56,6 +56,8 @@ print_dirent(void *baton, const svn_dirent_t *dirent, const svn_lock_t *lock, const char *abs_path, + const char *external_parent_url, + const char *external_target, apr_pool_t *pool) { struct print_baton *pb = baton; @@ -123,11 +125,12 @@ svn_cl__null_list(apr_getopt_t *os, SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target, subpool)); - err = svn_client_list2(truepath, &peg_revision, + err = svn_client_list3(truepath, &peg_revision, &(opt_state->start_revision), opt_state->depth, dirent_fields, opt_state->verbose, + FALSE, /* include externals */ print_dirent, &pb, ctx, subpool); Modified: subversion/branches/tree-read-api/tools/client-side/svn-bench/null-log-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/tools/client-side/svn-bench/null-log-cmd.c?rev=1415773&r1=1415772&r2=1415773&view=diff ============================================================================== --- subversion/branches/tree-read-api/tools/client-side/svn-bench/null-log-cmd.c (original) +++ subversion/branches/tree-read-api/tools/client-side/svn-bench/null-log-cmd.c Fri Nov 30 18:12:52 2012 @@ -134,7 +134,7 @@ svn_cl__null_log(apr_getopt_t *os, svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state; svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx; apr_array_header_t *targets; - struct log_receiver_baton lb = { ctx }; + struct log_receiver_baton lb; const char *target; int i; apr_array_header_t *revprops; @@ -194,6 +194,7 @@ svn_cl__null_log(apr_getopt_t *os, } } + lb.ctx = ctx; lb.quiet = opt_state->quiet; revprops = apr_array_make(pool, 3, sizeof(char *)); Propchange: subversion/branches/tree-read-api/tools/server-side/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Fri Nov 30 18:12:52 2012 @@ -3,3 +3,4 @@ svn-populate-node-origins-index svnauthz-validate svn-rep-sharing-stats fsfs-reorg +fsfs-stats
