Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1054704 is being indexed.

Remove deprecation warnings in various tests. We explicitly allow tests

to use deprecated APIs as a way of spot-testing the backward compat wrappers.

* subversion/tests/libsvn_subr/target-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

subversion/tests/libsvn_ra_local/ra-local-test.c,

subversion/tests/libsvn_repos/dir-delta-editor.c,

subversion/tests/cmdline/entries-dump.c:

Define SVN_DEPRECATED before including any Subversion headers.

  1. … 4 more files in changeset.
Once and for all, name all our anonymous struct/enum typedefs.

Follows up on r1040058, and with thanks to Danny Trebbien.

* everywhere:

Change 'typedef struct {} foo_t;' to 'typedef struct foo_t {} foo_t;'.

* subversion/libsvn_ra_serf/fake_sspi.h

(PSecurityFunctionTable, SecurityFunctionTable):

Manually effect the same change in the single pointer-to-struct typedef.

  1. … 95 more files in changeset.
Follow up to r1053174, replace all SVN_ERR_ASSERT() with SVN_TEST_ASSERT()

so assertions do not cause core dumps.

Suggested by: danielsh

* subversion/tests/libsvn_fs/fs-test.c,

* subversion/tests/libsvn_fs/locks-test.c,

* subversion/tests/libsvn_fs_base/changes-test.c,

* subversion/tests/libsvn_fs_base/fs-base-test.c,

* subversion/tests/libsvn_fs_fs/fs-pack-test.c,

* subversion/tests/libsvn_repos/repos-test.c:

s/SVN_ERR_ASSERT/SVN_TEST_ASSERT/g.

  1. … 5 more files in changeset.
Add assertions in all tests that all the commits done with

svn_fs_commit_txn() and svn_repos_fs_commit_txn() return a valid

revision number, per their contract that this is the true indicator of

a commits success.

The only code not touched is test_commit_txn() in fs-test.c, which is

handled in the next commit.

* subversion/tests/libsvn_client/client-test.c,

* subversion/tests/libsvn_fs/fs-test.c,

* subversion/tests/libsvn_fs/locks-test.c,

* subversion/tests/libsvn_fs_base/changes-test.c,

* subversion/tests/libsvn_fs_base/fs-base-test.c,

* subversion/tests/libsvn_fs_fs/fs-pack-test.c,

* subversion/tests/libsvn_repos/repos-test.c,

* subversion/tests/svn_test_fs.c:

Follow any call to svn_fs_commit_txn() and svn_repos_fs_commit_txn()

that is expected to succeed with an assertion that the returned

revision number is valid, likewise, assert the reverse, that a

failed commit returns an invalid revision number.

  1. … 7 more files in changeset.
Ensure the correct type of NULL pointer is passed as a sentinel to the

variadic function apr_pstrcat().

Starting with version 4, gcc has been printing irritating warnings about

"missing sentinels in function call" for virtually every call to apr_pstrcat().

There is an issue about this in the APR bug tracker:

https://issues.apache.org/bugzilla/show_bug.cgi?id=47191

The fix proposed there is to include stddef.h in apr.h, in order to make

sure that NULL is defined as a pointer type, such as (void *)0.

Unfortunately, this doesn't work for all systems, since some (e.g. OpenBSD)

define NULL as 0L, rather than (void *)0.

So in spite of regrets about churn, I whipped up a sed script that changed

all places triggering the warning to use (char *)NULL instead of NULL as

sentinel, and adjusted the result to fix overlong lines and other minor

formatting issues. This fixes all current instances of the warning for me,

making it much easier to spot important warnings. No functional change.

* subversion/mod_authz_svn/mod_authz_svn.c

(get_access_conf, req_check_access, req_check_access): Use (char *)NULL

as sentinel for apr_pstrcat(), instead of NULL.

* subversion/libsvn_fs_base/lock.c

(svn_fs_base__generate_lock_token): Same.

* subversion/libsvn_fs_base/bdb/locks-table.c

(svn_fs_bdb__locks_get): Same.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__reparent): Same.

* subversion/libsvn_ra_svn/cyrus_auth.c

(try_auth, svn_ra_svn__get_addresses, svn_ra_svn__do_cyrus_auth): Same.

* subversion/libsvn_ra_svn/client.c

(ra_svn_get_locks): Same.

* subversion/mod_dav_svn/mirror.c

(static void proxy_request_fixup, dav_svn__proxy_request_fixup,

dav_svn__location_header_filter): Same.

* subversion/mod_dav_svn/reports/update.c

(malformed_element_error): Same.

* subversion/mod_dav_svn/reports/replay.c

(malformed_element_error): Same.

* subversion/mod_dav_svn/mod_dav_svn.c

(dav_svn__get_special_uri): Same.

* subversion/mod_dav_svn/lock.c

(svn_lock_to_dav_lock, unescape_xml): Same.

* subversion/mod_dav_svn/repos.c

(create_private_resource, get_parentpath_resource, get_resource,

deliver, do_walk, dav_svn__create_working_resource): Same.

* subversion/mod_dav_svn/version.c

(get_option): Same.

* subversion/libsvn_ra_neon/get_locks.c

(svn_ra_neon__get_locks): Same.

* subversion/libsvn_ra_neon/session.c

(svn_ra_neon__open): Same.

* subversion/libsvn_ra_neon/lock.c

(do_lock): Same.

* subversion/libsvn_ra_neon/props.c

(end_element, svn_ra_neon__get_props, svn_ra_neon__get_one_prop,

append_setprop): Same.

* subversion/libsvn_ra_neon/fetch.c

(add_props, filter_props, end_element): Same.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Same.

* subversion/libsvn_ra_serf/locks.c

(svn_ra_serf__unlock): Same.

* subversion/libsvn_ra_serf/update.c

(link_path): Same.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Same.

* subversion/libsvn_ra_serf/property.c

(set_bare_props, svn_ra_serf__set_baton_props,

svn_ra_serf__set_baton_props): Same.

* subversion/libsvn_ra_serf/commit.c

(proppatch_walker, setup_proppatch_headers,

setup_put_headers, setup_delete_headers): Same.

* subversion/libsvn_fs_fs/caching.c

(svn_fs_fs__initialize_caches): Same.

* subversion/libsvn_fs_fs/lock.c

(svn_fs_fs__generate_lock_token): Same.

* subversion/libsvn_fs_fs/fs_fs.c

(path_txn_dir, path_txn_proto_rev, path_txn_proto_rev_lock,

path_txn_node_props, create_txn_dir, get_new_txn_node_id,

svn_fs_fs__reserve_copy_id, svn_fs_fs__set_uuid): Same.

* subversion/svn/notify.c

(notify): Same.

* subversion/svn/conflict-callbacks.c

(svn_cl__conflict_handler): Same.

* subversion/libsvn_subr/auth.c

(svn_auth_first_credentials): Same.

* subversion/libsvn_subr/checksum.c

(svn_checksum_serialize): Same.

* subversion/libsvn_subr/cache-memcache.c

(build_key): Same.

* subversion/libsvn_subr/log.c

(log_depth): Same.

* subversion/libsvn_subr/utf.c

(get_xlate_key, invalid_utf8): Same.

* subversion/libsvn_subr/opt.c

(svn_opt_format_option, svn_opt__args_to_target_array): Same.

* subversion/libsvn_subr/dirent_uri.c

(svn_uri_get_file_url_from_dirent): Same.

* subversion/libsvn_subr/sqlite.c

(internal_open): Same.

* subversion/tests/libsvn_ra_local/ra-local-test.c

(check_split_url): Same.

* subversion/tests/libsvn_repos/repos-test.c

(print_chrevs): Same.

* subversion/tests/libsvn_subr/translate-test.c

(substitute_and_verify): Same.

* subversion/tests/libsvn_subr/config-test.c

(test_text_retrieval, test_boolean_retrieval, test_has_section): Same.

* subversion/tests/libsvn_subr/dirent_uri-test.c

(test_dirent_get_absolute): Same.

* subversion/tests/libsvn_subr/target-test.c

(condense_targets_tests_helper): Same.

* subversion/libsvn_wc/adm_files.c

(simple_extend): Same.

* subversion/libsvn_wc/update_editor.c

(create_tree_conflict): Same.

* subversion/libsvn_wc/old-and-busted.c

(svn_wc__serialize_file_external): Same.

* subversion/libsvn_wc/upgrade.c

(migrate_node_props): Same.

* subversion/libsvn_wc/wc_db.c

(construct_like_arg, wclock_obtain_cb): Same.

* subversion/libsvn_client/util.c

(svn_client__path_relative_to_root): Same.

* subversion/libsvn_client/info.c

(push_dir_info): Same.

* subversion/libsvn_client/mergeinfo.c

(svn_client__mergeinfo_from_segments): Same.

* subversion/libsvn_client/cmdline.c

(resolve_repos_relative_url, svn_client_args_to_target_array,

(svn_client_args_to_target_array): Same.

* subversion/libsvn_client/externals.c

(resolve_relative_external_url): Same.

* subversion/libsvn_client/patch.c

(copy_lines_to_target): Same.

* subversion/libsvn_repos/hooks.c

(check_hook_cmd): Same.

* subversion/libsvn_repos/rev_hunt.c

(svn_repos_trace_node_locations, svn_repos_node_location_segments): Same.

* subversion/libsvn_repos/authz.c

(authz_get_path_access, authz_get_tree_access,

authz_get_global_access): Same.

* subversion/libsvn_repos/reporter.c

(add_file_smartly): Same.

  1. … 57 more files in changeset.
Revert the addition of "const" to some input pointer parameters in public

function typedefs, that was part of r922239. API compatibility was broken

by changing the typedefs in this way.

* subversion/include/svn_client.h

(svn_client_get_commit_log_t): Remove 'const' from 'apr_array_header_t *'.

* subversion/include/svn_delta.h

(svn_file_rev_handler_t,

svn_file_rev_handler_old_t): Remove 'const' from 'apr_array_header_t *'.

* subversion/include/svn_ra.h

(svn_ra_file_rev_handler_t,

svn_ra_plugin_t.get_locations): Remove 'const' from 'apr_array_header_t *'.

* subversion/include/svn_ra_svn.h

(svn_ra_svn_command_handler): Remove 'const' from 'apr_array_header_t *'.

* subversion/include/svn_repos.h

(svn_repos_file_rev_handler_t): Remove 'const' from 'apr_array_header_t *'.

* subversion/libsvn_client/blame.c

(file_rev_handler): Adjust accordingly.

* subversion/libsvn_delta/compat.c

(file_rev_handler_wrapper): Adjust accordingly.

* subversion/libsvn_ra/wrapper_template.h

(compat_get_locations): Adjust accordingly.

* subversion/mod_dav_svn/reports/file-revs.c

(file_rev_handler): Adjust accordingly.

* subversion/svnserve/serve.c

(set_path, delete_path, link_path, finish_report, abort_report, reparent,

get_latest_rev, get_dated_rev, change_rev_prop, rev_proplist, rev_prop,

commit, get_file, get_dir, update, switch_cmd, status, diff,

get_mergeinfo, log_cmd, check_path, stat_cmd, get_locations,

file_rev_handler, get_file_revs, lock, lock_many, unlock, unlock_many,

get_lock, get_locks, replay, replay_range, get_deleted_rev):

Adjust accordingly.

* subversion/tests/libsvn_repos/repos-test.c

(file_rev_handler): Adjust accordingly.

  1. … 10 more files in changeset.
Cosmetic: indents and line wraps, else-ifs.

* subversion/libsvn_client/export.c (copy_one_versioned_file): Line width wrap.

* subversion/libsvn_client/merge.c (merge_file_changed): Else-if wrap/indent.

* subversion/libsvn_wc/adm_crawler.c

(svn_wc__internal_transmit_text_deltas): Indent.

* subversion/libsvn_wc/adm_ops.c (svn_wc__get_pristine_contents): Else-if wrap.

* subversion/libsvn_wc/old-and-busted.c (read_url): Else-if wrap/indent.

* subversion/libsvn_wc/questions.c (svn_wc__internal_text_modified_p): Indent.

* subversion/libsvn_wc/update_editor.c (check_tree_conflict): Else-if wrap.

* subversion/svnlook/main.c (do_plist): Else-if wrap/indent.

* subversion/svn/propset-cmd.c (svn_cl__propset): Else-if wrap/indent.

* subversion/tests/libsvn_repos/repos-test.c

(prop_validation_commit_with_revprop, prop_validation): Else-if wrap/indent.

  1. … 9 more files in changeset.
Add "const" to all "apr_array_header_t *" input parameters in public and

private APIs.

(Note that we are allowed to add "const" to a pointer parameter of a public

API, and have done so before, because that is a backward-compatible API

change and doesn't change the ABI at all.)

The public functions whose prototypes are changed are listed individually

below; the private functions are not.

* subversion/include/svn_auth.h

(svn_auth_open)

* subversion/include/svn_client.h

(svn_client_get_commit_log_t,

svn_client_copy5,

svn_client_copy4,

svn_client_move5,

svn_client_patch)

* subversion/include/svn_delta.h

(svn_delta_path_driver,

svn_file_rev_handler_t,

svn_file_rev_handler_old_t)

* subversion/include/svn_fs.h

(svn_fs_change_txn_props)

* subversion/include/svn_mergeinfo.h

(svn_rangelist_diff,

svn_rangelist_merge,

svn_rangelist_remove,

svn_rangelist_intersect,

svn_rangelist_inheritable2,

svn_rangelist_inheritable,

svn_rangelist_dup)

* subversion/include/svn_opt.h

(svn_opt_args_to_target_array3,

svn_opt_args_to_target_array2,

svn_opt_args_to_target_array,

svn_opt_eat_peg_revisions)

* subversion/include/svn_ra.h

(svn_ra_file_rev_handler_t,

svn_ra_get_locations,

svn_ra_plugin_t.get_locations)

* subversion/include/svn_ra_svn.h

(svn_ra_svn_command_handler,

svn_ra_svn_set_capabilities,

svn_ra_svn_parse_tuple,

svn_ra_svn_parse_proplist)

* subversion/include/svn_repos.h

(svn_repos_file_rev_handler_t,

svn_repos_trace_node_locations,

svn_repos_fs_get_mergeinfo,

svn_repos_fs_change_txn_props,

svn_repos_remember_client_capabilities)

* subversion/include/svn_sorts.h

(svn_sort__bsearch_lower_bound)

* subversion/include/svn_string.h

(svn_cstring_match_glob_list)

* subversion/include/svn_wc.h

(svn_wc_get_status_editor3,

svn_wc_get_update_editor4,

svn_wc_get_update_editor3,

svn_wc_get_switch_editor4,

svn_wc_get_switch_editor3,

svn_wc_match_ignore_list)

* subversion/include/private/svn_cmdline_private.h

* subversion/include/private/svn_opt_private.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/client.h

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/mergeinfo.h

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/path_driver.c

* subversion/libsvn_fs_base/reps-strings.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/revs-txns.h

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/fs_fs.h

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs/fs-loader.h

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra/ra_loader.h

* subversion/libsvn_ra/wrapper_template.h

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_neon/get_locations.c

* subversion/libsvn_ra_neon/props.c

* subversion/libsvn_ra_neon/ra_neon.h

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/cyrus_auth.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/internal_auth.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_ra_svn/ra_svn.h

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/repos.h

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/svn_string.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/util.c

* subversion/mod_dav_svn/dav_svn.h

* subversion/mod_dav_svn/reports/file-revs.c

* subversion/mod_dav_svn/util.c

* subversion/svn/cl.h

* subversion/svn/props.c

* subversion/svn/switch-cmd.c

* subversion/svn/util.c

* subversion/svndumpfilter/main.c

* subversion/svnserve/serve.c

* subversion/tests/libsvn_repos/repos-test.c

* subversion/tests/libsvn_subr/mergeinfo-test.c

  1. … 78 more files in changeset.
Add a (partial) test for issue #3243, and move some common code to the

test framework for later reuse.

* subversion/tests/libsvn_repos/repos-test.c

(test_get_file_revs): New test svn_repos_get_file_revs2.

(file_rev_handler): Helper function.

(test_funcs): Run the new test.

* subversion/tests/libsvn_ra_local/ra-local-test.c

(global): Remove now unneeded includes.

(make_and_open_local_repos): Update function call.

(current_directory_url): Move function from here ...

* subversion/tests/svn_test_fs.c

(svn_test__current_directory_url): ... to here.

(svn_test__create_greek_tree_at): New test function, create greek

tree at a path (doesn't have to be '/') in the repository.

(svn_test__create_greek_tree): Wrap svn_test__create_greek_tree_at.

(svn_test__create_blame_repository): Set up a new repo, similar to

the one used to reproduce issue #3243.

* subversion/tests/svn_test_fs.h

(svn_test__create_greek_tree_at,

svn_test__create_blame_repository,

svn_test__current_directory_url): New function declarations.

  1. … 3 more files in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 889 more files in changeset.
Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.

* LICENSE: New.

* COPYING,

subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 880 more files in changeset.
Replace deprecated test func macros in the C tests. This eliminates the need

to do the following dance in every test function:

*msg = "foo";

if (msg_only)

return SVN_NO_ERROR;

This does not remove the deprecated symbols from svn_test.h; I plan to do it

in a follow up commit.

[ in subversion/tests ]

* libsvn_client/client-test.c,

libsvn_delta/random-test.c,

libsvn_delta/range-index-test.h,

libsvn_delta/window-test.c,

libsvn_diff/diff-diff3-test.c,

libsvn_diff/parse-diff-test.c,

libsvn_fs/fs-test.c,

libsvn_fs/locks-test.c,

libsvn_fs_base/changes-test.c,

libsvn_fs_base/fs-base-test.c,

libsvn_fs_base/key-test.c,

libsvn_fs_base/strings-reps-test.c,

libsvn_fs_fs/fs-pack-test.c,

libsvn_ra_local/ra-local-test.c,

libsvn_repos/repos-test.c,

libsvn_subr/auth-test.c,

libsvn_subr/cache-test.c,

libsvn_subr/checksum-test.c,

libsvn_subr/compat-test.c,

libsvn_subr/config-test.c,

libsvn_subr/dirent_uri-test.c,

libsvn_subr/error-test.c,

libsvn_subr/hashdump-test.c,

libsvn_subr/mergeinfo-test.c,

libsvn_subr/opt-test.c,

libsvn_subr/path-test.c,

libsvn_subr/revision-test.c,

libsvn_subr/skel-test.c,

libsvn_subr/stream-test.c,

libsvn_subr/string-test.c,

libsvn_subr/target-test.c,

libsvn_subr/time-test.c,

libsvn_subr/translate-test.c,

libsvn_subr/utf-test.c,

libsvn_wc/tree-conflict-data-test.c:

Do the above described transformation.

  1. … 34 more files in changeset.
Added libtool object files (*.lo) to svn:ignore.

* subversion/tests/libsvn_diff/

* subversion/tests/libsvn_fs/

* subversion/tests/libsvn_wc/

* subversion/tests/libsvn_subr/

* subversion/tests/libsvn_ra_local/

* subversion/tests/libsvn_client/

* subversion/tests/libsvn_repos/

* subversion/tests/libsvn_delta/

* subversion/tests/libsvn_fs_fs/

* subversion/svn/

* subversion/svnversion/

(svn:ignore): Add *.lo to ignore list.

(obvious fix)

  1. … 10 more files in changeset.
Cleanup trailing whitespace:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

This should have been done before the 1.6.x branch, so I'm going to merge

it over there, to avoid merge conflicts in the future.

  1. … 83 more files in changeset.
Adjust a bunch of our public header files:

- make sure everything the header needs is included

- make sure nothing is included which is NOT needed

Added an exception to svn_types.h: it now explicitly includes svn_error.h

since Everybody needs that thing. We go ahead and make it easy for them,

even though that is counter-philosophy.

After altering the header files, some .c files in our codebase would not

compile -- they used stuff that they did not explicitly include. Thus, a

goodly number of .c files were updated, too.

* subversion/libsvn_ra/wrapper_template.h:

* subversion/libsvn_ra/deprecated.c:

* subversion/libsvn_ra/compat.c:

* subversion/libsvn_subr/iter.c:

* subversion/libsvn_subr/cmdline.c:

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c:

* subversion/libsvn_subr/error.c:

* subversion/libsvn_subr/auth.c:

* subversion/libsvn_subr/opt.c:

* subversion/libsvn_subr/checksum.c:

* subversion/libsvn_subr/compat.c:

* subversion/libsvn_subr/sha1.c:

* subversion/libsvn_subr/deprecated.c:

* subversion/libsvn_subr/ssl_server_trust_providers.c:

* subversion/mod_dav_svn/activity.c:

* subversion/mod_dav_svn/reports/log.c:

* subversion/tests/libsvn_fs/fs-test.c:

* subversion/tests/libsvn_repos/repos-test.c:

* subversion/svn/list-cmd.c:

* subversion/svn/changelist-cmd.c:

* subversion/svn/log-cmd.c:

* subversion/svn/conflict-callbacks.c:

* subversion/libsvn_fs_base/dag.c:

* subversion/libsvn_fs_base/util/fs_skels.c:

* subversion/include/svn_dirent_uri.h:

* subversion/include/svn_error_codes.h:

* subversion/include/svn_fs.h:

* subversion/include/svn_diff.h:

* subversion/include/svn_sorts.h:

* subversion/include/svn_mergeinfo.h:

* subversion/include/svn_base64.h:

* subversion/include/svn_dso.h:

* subversion/include/svn_ra_svn.h:

* subversion/include/svn_repos.h:

* subversion/include/svn_delta.h:

* subversion/include/svn_path.h:

* subversion/include/svn_subst.h:

* subversion/include/svn_xml.h:

* subversion/include/svn_props.h:

* subversion/include/svn_iter.h:

* subversion/include/svn_types.h:

* subversion/include/svn_config.h:

* subversion/include/svn_string.h:

* subversion/include/svn_io.h:

* subversion/include/svn_wc.h:

* subversion/include/svn_cmdline.h:

* subversion/include/svn_client.h:

* subversion/include/svn_user.h:

* subversion/include/svn_hash.h:

* subversion/include/svn_md5.h:

* subversion/include/svn_error.h:

* subversion/include/svn_pools.h:

* subversion/include/private/svn_log.h:

* subversion/include/svn_time.h:

* subversion/include/svn_utf.h:

* subversion/include/svn_auth.h:

* subversion/include/svn_ra.h:

* subversion/include/svn_opt.h:

* subversion/include/svn_checksum.h:

* subversion/libsvn_wc/deprecated.c:

* subversion/libsvn_wc/util.c:

* subversion/libsvn_wc/merge.c:

* subversion/libsvn_wc/tree_conflicts.c:

* subversion/libsvn_client/list.c:

* subversion/libsvn_client/log.c:

* subversion/libsvn_ra_neon/util.c:

* subversion/libsvn_ra_neon/log.c:

* subversion/libsvn_repos/deprecated.c:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_fs_fs/fs_fs.c:

(): adjust #include statements appropriately

  1. … 69 more files in changeset.
Fix a memory use after release detected by valgrind.

* subversion/tests/libsvn_repos/repos-test.c

(reporter_depth_exclude): Abort txn before clearing pool.

Bang support for --server-minor-version testing into the C test

framework, and use it in the FS and Repos tests.

NOTE: Only one failure that I didn't expect turned up:

$ ./fs-test --server-minor-version=4 --fs-type=fsfs

...

subversion/tests/libsvn_fs/fs-test.c:369: (apr_err=160000)

svn_tests: the transaction name '0-3' was reused

FAIL: lt-fs-test 5: check that transaction names are not reused

...

* subversion/tests/svn_test.h

(svn_test_opts_t): Add server_minor_version.

* subversion/tests/svn_test_main.c

(server_minor_version_opt): New enum.

(cl_options): Add bits for new --server-minor-version option.

(main): Add handling of new --server-minor-version option.

* subversion/tests/svn_test_fs.h

(svn_test__create_bdb_fs): Add 'opts' parameter.

* subversion/tests/svn_test_fs.c

(make_fs_config, create_fs): Add 'server_minor_version' parameter

and handling.

(svn_test__create_bdb_fs): Add 'opts' parameter, and update call to

create_fs().

(svn_test__create_fs, svn_test__create_repos): Update call to create_fs().

* subversion/tests/libsvn_fs/fs-test.c

(node_origin_rev): Bail (with success) when testing BDB with

server-minor-version 4.

* subversion/tests/libsvn_repos/repos-test.c

(node_location_segments): Bail (with success) when testing BDB with

server-minor-version 4.

* subversion/tests/libsvn_fs_base/changes-test.c,

* subversion/tests/libsvn_fs_base/fs-base-test.c,

* subversion/tests/libsvn_fs_base/strings-reps-test.c

Update calls to svn_test__create_bdb_fs().

  1. … 8 more files in changeset.
Convert remaining uses of svn_io_open_unique_file2 to other function

calls, as appropriate.

* subversion/libsvn_subr/subst.c:

(svn_subst_copy_and_translate3, svn_subst_create_translated): switch to

svn_stream_open_unique

* subversion/libsvn_subr/io.c:

(svn_io_copy_file, svn_io_file_move): switch to svn_io_open_unique_file3.

(reown_file): switch param from PATH_APR to just PATH. all the calls

were to SVN functions, so we should not be using an APR path. switch

to svn_io_open_unique_file3.

(io_set_file_perms): pass svn-internal path to reown_file.

* subversion/mod_dav_svn/activity.c:

(dav_svn__store_activity): lose a bunch of code in favor of

svn_io_write_unique().

* subversion/tests/libsvn_repos/repos-test.c:

(authz_get_handle): revamp to use svn_io_write_unique and other

svn-style IO functions.

* subversion/svn/util.c:

(svn_cl__edit_string_externally): change parameter to FILENAME rather

than PREFIX. switch to svn_io_open_uniquely_named.

* subversion/libsvn_wc/props.c:

(open_reject_tmp_file, svn_wc__merge_props): switch to

svn_io_open_uniquely_named.

* subversion/libsvn_client/externals.c:

(relegate_dir_external): switch to svn_io_uniquely_named.

* subversion/libsvn_fs_fs/fs_fs.c:

(svn_fs_fs__set_revision_proplist): switch to svn_stream_open_unique

(svn_fs_fs__set_uuid): revamp to use svn_io_write_unique

  1. … 7 more files in changeset.
Delete trailing whitespace.

Follow-up to r26317 and r27598.

* build/generator/extractor.py:

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

* contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py:

* subversion/bindings/ctypes-python/csvn/repos.py:

* subversion/bindings/ctypes-python/csvn/wc.py:

* subversion/bindings/ctypes-python/examples/mucc.py:

* subversion/bindings/ctypes-python/setup.py:

* subversion/bindings/ctypes-python/test/localrepos.py:

* subversion/bindings/ctypes-python/test/remoterepos.py:

* subversion/bindings/ctypes-python/test/run_all.py:

* subversion/bindings/ctypes-python/test/svntypes.py:

* subversion/bindings/ctypes-python/test/wc.py:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/Operation.java:

* subversion/include/private/svn_auth_private.h:

* subversion/include/private/svn_sqlite.h:

* subversion/include/private/svn_wc_private.h:

* subversion/include/svn_auth.h:

* subversion/include/svn_checksum.h:

* subversion/include/svn_client.h:

* subversion/include/svn_cmdline.h:

* subversion/include/svn_dirent_uri.h:

* subversion/include/svn_path.h:

* subversion/include/svn_props.h:

* subversion/libsvn_client/commit_util.c:

* subversion/libsvn_client/copy.c:

* subversion/libsvn_client/deprecated.c:

* subversion/libsvn_client/export.c:

* subversion/libsvn_client/externals.c:

* subversion/libsvn_client/info.c:

* subversion/libsvn_client/merge.c:

* subversion/libsvn_client/mergeinfo.h:

* subversion/libsvn_client/ra.c:

* subversion/libsvn_client/repos_diff.c:

* subversion/libsvn_fs_base/bdb/checksum-reps-table.c:

* subversion/libsvn_fs_base/bdb/checksum-reps-table.h:

* subversion/libsvn_fs_base/bdb/miscellaneous-table.c:

* subversion/libsvn_fs_base/bdb/reps-table.c:

* subversion/libsvn_fs_base/dag.c:

* subversion/libsvn_fs_base/dag.h:

* subversion/libsvn_fs_base/err.h:

* subversion/libsvn_fs_base/fs.c:

* subversion/libsvn_fs_base/reps-strings.c:

* subversion/libsvn_fs_base/tree.c:

* subversion/libsvn_fs_base/tree.h:

* subversion/libsvn_fs_base/util/fs_skels.c:

* subversion/libsvn_fs_fs/dag.h:

* subversion/libsvn_fs_fs/fs_fs.h:

* subversion/libsvn_fs/fs-loader.c:

* subversion/libsvn_fs/fs-loader.h:

* subversion/libsvn_fs_fs/rep-cache.c:

* subversion/libsvn_fs_fs/rep-cache.h:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_ra/compat.c:

* subversion/libsvn_ra_neon/log.c:

* subversion/libsvn_ra_neon/session.c:

* subversion/libsvn_ra_serf/log.c:

* subversion/libsvn_ra_serf/update.c:

* subversion/libsvn_ra_serf/util.c:

* subversion/libsvn_ra_serf/win32_auth_sspi.c:

* subversion/libsvn_repos/hooks.c:

* subversion/libsvn_repos/log.c:

* subversion/libsvn_repos/repos.h:

* subversion/libsvn_subr/checksum.c:

* subversion/libsvn_subr/cmdline.c:

* subversion/libsvn_subr/config_file.c:

* subversion/libsvn_subr/config_win.c:

* subversion/libsvn_subr/dirent_uri.c:

* subversion/libsvn_subr/dso.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/nls.c:

* subversion/libsvn_subr/simple_providers.c:

* subversion/libsvn_subr/sqlite.c:

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c:

* subversion/libsvn_subr/stream.c:

* subversion/libsvn_subr/win32_crypto.c:

* subversion/libsvn_wc/adm_ops.c:

* subversion/libsvn_wc/diff.c:

* subversion/libsvn_wc/props.c:

* subversion/libsvn_wc/status.c:

* subversion/libsvn_wc/tree_conflicts.c:

* subversion/libsvn_wc/tree_conflicts.h:

* subversion/libsvn_wc/update_editor.c:

* subversion/libsvn_wc/wc_db.h:

* subversion/svn/cl.h:

* subversion/svndumpfilter/main.c:

* subversion/svnlook/main.c:

* subversion/svn/propedit-cmd.c:

* subversion/svn/propget-cmd.c:

* subversion/svnserve/main.c:

* subversion/svn/status-cmd.c:

* subversion/svn/tree-conflicts.c:

* subversion/svn/util.c:

* subversion/tests/cmdline/commit_tests.py:

* subversion/tests/cmdline/copy_tests.py:

* subversion/tests/cmdline/info_tests.py:

* subversion/tests/cmdline/log_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/prop_tests.py:

* subversion/tests/cmdline/revert_tests.py:

* subversion/tests/cmdline/stat_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* subversion/tests/cmdline/svntest/tree.py:

* subversion/tests/cmdline/switch_tests.py:

* subversion/tests/cmdline/tree_conflict_tests.py:

* subversion/tests/cmdline/update_tests.py:

* subversion/tests/libsvn_repos/repos-test.c:

* subversion/tests/libsvn_subr/checksum-test.c:

* subversion/tests/libsvn_subr/dirent_uri-test.c:

* subversion/tests/libsvn_subr/path-test.c:

* subversion/tests/libsvn_subr/target-test.c:

* subversion/tests/libsvn_wc/tree-conflict-data-test.c:

* tools/examples/svnlook.py: Delete trailing whitespace.

  1. … 112 more files in changeset.
Fix a bug in svn_repos_get_logs4(), whereby passing SVN_INVALID_REVNUM

for one of the range revisions causes incorrect results.

* subversion/libsvn_repos/log.c

(svn_repos_get_logs4): Lose redundate 'hist_start' and 'hist_end'

variables, and simply tweak 'start' and 'end' as necessary..

* subversion/tests/libsvn_repos/repos-test.c

(test_funcs): No longer expect 'get_logs' test to fail.

Found by: glasser

  1. … 1 more file in changeset.
Add a regression test for a broken API.

* subversion/tests/libsvn_repos/repos-test.c

(log_receiver): New function.

(get_logs): New test just for quickly verifying the sanity of

various revision ranges and limit values thrown at

svn_repos_get_logs4. Current expected to fail.

(test_funcs): Add reference to new test.

Don't include svn_md5.h and apr_md5.h in files which don't use these headers.

* subversion/include/svn_base64.h:

* subversion/libsvn_client/commit.c:

* subversion/libsvn_client/commit_util.c:

* subversion/libsvn_client/export.c:

* subversion/libsvn_fs_base/dag.c:

* subversion/libsvn_fs_base/fs.h:

* subversion/libsvn_fs_base/reps-strings.c:

* subversion/libsvn_fs_base/util/fs_skels.c:

* subversion/libsvn_fs_fs/dag.c:

* subversion/libsvn_fs_fs/fs_fs.c:

* subversion/libsvn_fs_fs/fs.h:

* subversion/libsvn_fs/fs-loader.c:

* subversion/libsvn_fs_fs/lock.c:

* subversion/libsvn_ra_neon/fetch.c:

* subversion/libsvn_ra_neon/get_dated_rev.c:

* subversion/libsvn_ra_neon/get_locations.c:

* subversion/libsvn_ra_neon/get_location_segments.c:

* subversion/libsvn_ra_svn/client.c:

* subversion/libsvn_ra_svn/editorp.c:

* subversion/libsvn_repos/reporter.c:

* subversion/libsvn_subr/cache-memcache.c:

* subversion/libsvn_subr/checksum.c:

* subversion/libsvn_subr/config_auth.c:

* subversion/libsvn_subr/config_file.c:

* subversion/libsvn_subr/md5.c:

* subversion/libsvn_subr/md5.h:

* subversion/libsvn_subr/svn_string.c:

* subversion/libsvn_wc/adm_crawler.c:

* subversion/libsvn_wc/adm_ops.c:

* subversion/libsvn_wc/questions.c:

* subversion/libsvn_wc/update_editor.c:

* subversion/mod_dav_svn/liveprops.c:

* subversion/mod_dav_svn/reports/mergeinfo.c:

* subversion/mod_dav_svn/reports/replay.c:

* subversion/mod_dav_svn/reports/update.c:

* subversion/svnserve/serve.c:

* subversion/tests/libsvn_fs_base/fs-base-test.c:

* subversion/tests/libsvn_repos/repos-test.c: Don't include svn_md5.h and

apr_md5.h in files which don't use these headers.

  1. … 37 more files in changeset.
Disable deprecation warnings during compilation of tests.

* subversion/tests/svn_test.h

  (SVN_DEPRECATED): Define as empty definition when

SVN_ENABLE_DEPRECATION_WARNINGS_IN_TESTS isn't defined.

* subversion/tests/libsvn_delta/random-test.c:

* subversion/tests/libsvn_delta/svndiff-test.c:

* subversion/tests/libsvn_delta/vdelta-test.c:

* subversion/tests/libsvn_diff/diff-diff3-test.c:

* subversion/tests/libsvn_fs_base/changes-test.c:

* subversion/tests/libsvn_fs_base/fs-base-test.c:

* subversion/tests/libsvn_fs/fs-test.c:

* subversion/tests/libsvn_fs/locks-test.c:

* subversion/tests/libsvn_repos/repos-test.c:

* subversion/tests/libsvn_subr/hashdump-test.c:

* subversion/tests/libsvn_subr/opt-test.c:

* subversion/tests/libsvn_subr/string-test.c:

* subversion/tests/libsvn_subr/translate-test.c:

* subversion/tests/svn_test_fs.c: Include svn_test.h before other Subversion

   headers.

Suggested by: hwright

  1. … 14 more files in changeset.
Housekeeping: In the spirit of r27598, remove trailing whitespace in

our repository.

for extsn in c h cpp java py pl rb; do

find . -name "*.$extsn" | xargs perl -pi.bak -e 'next if /^\f$/; s/\s+$/\n/'

done

(This touches files in various and sundry parts of the tree, which I shan't

enumerate here.)

  1. … 174 more files in changeset.
Fix issue #1796: prevent invalid log messages from entering the repository.

Although our client does not send invalid messages, a defective or

malicious client could, thus corrupting the repository metadata.

Patch by: Neels Janosch Hofmeyr <neels@elego.de>

(Tweaked by me; previous iterations reviewed by danielsh.)

* subversion/include/private/svn_utf_private.h: New file.

(svn_utf__is_valid): Moved here from libsvn_subr/utf_impl.h,

because needed in libsvn_repos.

* subversion/libsvn_subr/utf_impl.h: Include private/svn_utf_private.h.

(svn_utf__is_valid): Moved to svn_utf_private.h.

(svn_utf__last_valid): Add comment mentioning svn_utf__is_valid.

* subversion/libsvn_repos/fs-wrap.c

(validate_prop): Validate log messages.

* subversion/include/svn_repos.h

(svn_repos_fs_change_node_prop): Document validation behavior.

* subversion/tests/libsvn_repos/repos-test.c

(prop_validation_commit_with_revprop): New helper function.

(prop_validation): New test.

(test_funcs): Run it.

  1. … 4 more files in changeset.
Merge the in-memory-cache branch to trunk.

See that branch's log for full details, but in short:

The branch rewrote various in-memory caches in FSFS to use a unified

API. By default this API is implemented by some in-process hashes,

but via a configuration file (db/fsfs.conf), it can use memcached

instead. Additionally, expanded fulltexts are cached if memcached is

available.

memcached is accessed with the apr_memcached API, which will be in a

future version (1.3.x branch, now) of apr-util, and is also available as an

separately-distributed library. The build system knows how to deal

with both.

Other things that changed:

* The test suite now has a config file; currently, the config file is

just used as the FSFS config file for any created repositories.

* New random APIs: svn_base64_encode_string2, svn_stream_from_string.

* ra_local ignores "FS warnings" instead of aborting.

  1. … 48 more files in changeset.
* subversion/tests/libsvn_repos/repos-test.c

(reporter_depth_exclude): Improve r28095 comment, explaining motivations.

Suggested by: glasser

Follow up to r28022: test that poking a path under an excluded path fails.

* subversion/tests/libsvn_repos/repos-test.c

(reporter_depth_exclude): Try some illegal reporting, expect failure.

Reinstate svn_depth_exclude (removed in r27958), but only in the

"server" side. Specifically, completely disable it at the

command-line (which should have been done before r27958), and document

it as not being supported in the wc or client libs in 1.5, but make

the (relatively straightforward) changes to the repos reporter to

enable 1.5 servers to support svn_depth_exclude arguments to

"set_path".

Because this can't be tested by the "svn" client, add a libsvn_repos

unit test to test it.

* subversion/include/svn_types.h

(svn_depth_t): Add svn_depth_exclude as -1 again; document (in a

private comment) that it is only supported on the server in 1.5.

* subversion/libsvn_subr/kitchensink.c

(svn_depth_to_word, svn_depth_from_word): Support "exclude" again

(as before r27958).

* subversion/libsvn_repos/reporter.c

(Theory of operation, read_path_info, write_path_info): Let

svn_depth_exclude be serialized in the reporter file (shifting each

depth value up one value).

(delta_dirs): Don't do the "delete" logic for excluded paths. Don't

call update_entry for excluded paths.

* subversion/include/svn_repos.h

(svn_repos_set_path3): Document that the revision argument may be

SVN_INVALID_REVNUM when depth=exclude.

* subversion/svn/main.c

(main): Don't allow --depth=exclude on the command line.

* subversion/tests/libsvn_repos/repos-test.c

(reporter_depth_exclude): New test.

(test_funcs): It passes.

  1. … 6 more files in changeset.
Fix a test editor in tests/libsvn_repos to properly handle change_dir_prop.

This requires introducing directory batons instead of just reusing the

edit baton.

* subversion/tests/libsvn_repos/dir-delta-editor.c

(edit_baton): Remove comment saying it's used for directory batons.

(dir_baton): New.

(test_delete_entry, test_open_root, test_open_directory,

test_add_directory, test_open_file, test_add_file): Adjust to use

dir_baton struct.

(test_change_dir_prop): Adjust to use dir_baton struct; don't use

the property name (!) as the pathname.

  1. … 1 more file in changeset.