libsvn_ra_local

Checkout Tools
  • last updated 15 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Make the C tests work with the --enable-optimize configure option.

Because the main() function used to be defined in libsvn_test,

the -flto option (which performs rather aggressive link-time

optimizations) would cause the linker to remove all "unreferenced"

static functions ... which includes all the actual tests.

Which this change, main() is now defined in each test driver.

* subversion/tests/svn_test.h

(test_funcs, svn_test_max_threads): Remove external declarations.

(svn_test_main): New prototype for the (existing-but-renamed) test driver.

(SVN_TEST_MAIN): Bolierplate macro that generates a main() implementation.

* subversion/tests/svn_test_main.c

(svn_test_main): Renamed from 'main', and takes two extra parameters,

'max_threads' and 'test_funcs'. Propagates test_funcs to get_array_size,

do_test_num and do_tests_concurrently.

(get_array_size, do_test_num,

test_params_t, test_thread, do_tests_concurrently): Require a test_funcs

parameter. All uses updated.

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

subversion/tests/libsvn_client/mtcc-test.c,

subversion/tests/libsvn_delta/random-test.c,

subversion/tests/libsvn_delta/window-test.c,

subversion/tests/libsvn_diff/diff-diff3-test.c,

subversion/tests/libsvn_diff/parse-diff-test.c,

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

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

subversion/tests/libsvn_fs_base/

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,

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

subversion/tests/libsvn_fs_x/fs-x-pack-test.c,

subversion/tests/libsvn_fs_x/string-table-test.c,

subversion/tests/libsvn_ra/ra-test.c,

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

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

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

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

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

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

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

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

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

subversion/tests/libsvn_subr/error-code-test.c,

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

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

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

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

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

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

subversion/tests/libsvn_subr/packed-data-test.c,

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

subversion/tests/libsvn_subr/prefix-string-test.c,

subversion/tests/libsvn_subr/priority-queue-test.c,

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

subversion/tests/libsvn_subr/root-pools-test.c,

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

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

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

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

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

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

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

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

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

subversion/tests/libsvn_wc/conflict-data-test.c,

subversion/tests/libsvn_wc/db-test.c,

subversion/tests/libsvn_wc/entries-compat.c,

subversion/tests/libsvn_wc/op-depth-test.c,

subversion/tests/libsvn_wc/pristine-store-test.c,

subversion/tests/libsvn_wc/wc-queries-test.c,

subversion/tests/libsvn_wc/wc-test.c:

(max_threads): Renamed from svn_test_max_threads and made static.

(test_funcs): Made static.

(SVN_TEST_MAIN): Expanded boilerplate main() function.

  1. … 54 more files in changeset.
Add "--parallel" option to our C tests.

Besides shaving off a few seconds off our total test execution time,

parallel execution also stresses our code and the tests themselves

harder. It uncovers things like improperly separated working sets

that make post-failure analysis harder.

Parallel mode is only available with APR 1.3+ and threads enabled.

The option will simply be ignored in other configurations. Further

limitations are cleanups being delayed to after all tests completed

and segfaults not being intercepted.

Some tests can't be executed in parallel. Therefore, we introduce

svn_test_max_threads a simple upper limit to the number of threads

supported that each test must define alongside the test_funcs array.

This patch sets it to "1" in many cases because the tests are so

small that multi-threaded execution is simply not worth it.

* build/run_tests.py

(TestHarness._run_c_test): Pass --parallel option to the individual

test applications.

* subversion/tests/svn_test.h

(svn_test_max_threads): Declare new external setting to be set by

every test application.

* subversion/tests/svn_test_main.c

(parallel): New command line option presence flag.

(parallel_opt,

cl_options): Declare the new "--parallel" option.

(svn_test_add_dir_cleanup): Synchronize shared pool access since

this might be called from multiple

threads at the same time.

(log_results): Result logger function factored out from do_test_num

to be shared between serialized and parallel test

execution code.

(do_test_num): Use that new function.

(test_params_t,

test_thread,

do_tests_concurrently): Threads, their parameter and the thread

starter for thread-pooled test execution.

(main): Handle the new option.

Call concurrent execution when in PARALLEL mode.

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

subversion/tests/libsvn_subr/named_atomic-test.c

(svn_test_max_threads): These tests don't support concurrent execution.

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

subversion/tests/libsvn_delta/window-test.c

subversion/tests/libsvn_diff/parse-diff-test.c

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

subversion/tests/libsvn_ra/ra-test.c

subversion/tests/libsvn_subr/auth-test.c

subversion/tests/libsvn_subr/cache-test.c

subversion/tests/libsvn_subr/checksum-test.c

subversion/tests/libsvn_subr/compat-test.c

subversion/tests/libsvn_subr/config-test.c

subversion/tests/libsvn_subr/crypto-test.c

subversion/tests/libsvn_subr/dirent_uri-test.c

subversion/tests/libsvn_subr/error-code-test.c

subversion/tests/libsvn_subr/error-test.c

subversion/tests/libsvn_subr/hashdump-test.c

subversion/tests/libsvn_subr/mergeinfo-test.c

subversion/tests/libsvn_subr/named_atomic-test.c

subversion/tests/libsvn_subr/opt-test.c

subversion/tests/libsvn_subr/packed-data-test.c

subversion/tests/libsvn_subr/path-test.c

subversion/tests/libsvn_subr/prefix-string-test.c

subversion/tests/libsvn_subr/priority-queue-test.c

subversion/tests/libsvn_subr/revision-test.c

subversion/tests/libsvn_subr/root-pools-test.c

subversion/tests/libsvn_subr/skel-test.c

subversion/tests/libsvn_subr/spillbuf-test.c

subversion/tests/libsvn_subr/sqlite-test.c

subversion/tests/libsvn_subr/stream-test.c

subversion/tests/libsvn_subr/string-test.c

subversion/tests/libsvn_subr/subst_translate-test.c

subversion/tests/libsvn_subr/time-test.c

subversion/tests/libsvn_subr/utf-test.c

subversion/tests/libsvn_wc/conflict-data-test.c

subversion/tests/libsvn_wc/wc-queries-test.c:

(svn_test_max_threads): These are too small to benefit from multi-threading.

* subversion/tests/libsvn_client/client-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_base/strings-reps-test.c

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

subversion/tests/libsvn_fs/fs-test.c

subversion/tests/libsvn_fs/locks-test.c

subversion/tests/libsvn_fs_x/fs-x-pack-test.c

subversion/tests/libsvn_fs_x/string-table-test.c

subversion/tests/libsvn_repos/repos-test.c

subversion/tests/libsvn_subr/io-test.c

subversion/tests/libsvn_subr/translate-test.c

subversion/tests/libsvn_wc/db-test.c

subversion/tests/libsvn_wc/op-depth-test.c

subversion/tests/libsvn_wc/wc-test.c

(svn_test_max_threads): Set concurrency limit to whatever various test

runs suggested as the most efficient value.

* subversion/tests/libsvn_wc/entries-compat.c

subversion/tests/libsvn_wc/pristine-store-test.c

(svn_test_max_threads): Set concurrency limit to "unbounded".

  1. … 54 more files in changeset.
Introduce a null-pointer constant that we can use as a termination sentinel

in variable argument lists. This avoids the ugliness of writing

"(char *) NULL" all over the place.

* subversion/include/svn_types.h (SVN_VA_NULL): New symbol.

* subversion/include/svn_dirent_uri.h (svn_dirent_join_many),

subversion/include/svn_path.h (svn_path_join_many),

subversion/include/svn_xml.h (svn_xml_make_open_tag):

Update docstrings, mentioning SVN_VA_NULL as the argument list terminator.

[Lots of implementation files]: Replace typecast-NULL with SVN_VA_NULL in

function calls with variable argument lists.

  1. … 89 more files in changeset.
Don't use SVN_NO_ERROR inappropriately: use APR_SUCCESS for an apr_status_t

or NULL for a pointer to a dav_error.

* subversion/libsvn_fs_base/bdb/env.c

(bdb_error_gatherer): As above.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__conn_setup): Same.

* subversion/mod_dav_svn/lock.c

(unescape_xml): Same.

* subversion/mod_dav_svn/merge.c

(dav_svn__merge_response): Same.

* subversion/mod_dav_svn/version.c

(dav_svn__build_lock_hash): Same.

* subversion/svn/util.c

(svn_cl__try): Same.

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

(try_split_url): Same.

  1. … 6 more files in changeset.
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.
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.
* subversion/tests/libsvn_ra_local/ra-local-test.c

(split_url_syntax): Remove a check for invalid syntax as that's

undefined behaviour and not a testable condition.

Following up on the introduction of svn_uri_get_dirent_from_file_url(),

introduce svn_uri_get_file_url_from_dirent() to make it easier to convert

a dirent in a canonical url in a compatible way.

* subversion/include/svn_dirent_uri.h

(svn_uri_get_dirent_from_file_url): Add '*' for doxygen.

(svn_uri_get_file_url_from_dirent): New function.

* subversion/libsvn_subr/dirent_uri.c

(svn_uri_get_file_url_from_dirent): New function.

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

(test_patch): Use svn_uri_get_file_url_from_dirent instead

of using local variant.

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

(make_and_open_local_repos, check_split_url):

Use svn_uri_get_file_url_from_dirent().

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

(test_dirent_from_file_url,

test_dirent_from_file_url_errors): Fix test output.

(test_file_url_from_dirent): New function.

(test_funcs): Add test_file_url_from_dirent.

* subversion/tests/libsvn_wc/pristine-store-test.c

(create_repos_and_wc): Use svn_uri_get_file_url_from_dirent().

* subversion/tests/svn_test_fs.c

(svn_test__current_directory_url): Remove function.

* subversion/tests/svn_test_fs.h

(svn_test__current_directory_url): Remove function.

  1. … 7 more files in changeset.
Remove some code that was just to help the test suite, now that the test

suite can catch SVN_ERR_ASSERT failures (since r958583).

* subversion/libsvn_ra_local/split_url.c

(svn_ra_local__split_URL): Don't bother checking the URL before calling

svn_uri_get_dirent_from_file_url().

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

(split_url_syntax): Accept an assertion failure as an alternative to an

"illegal URL" error when testing a malformed URL.

  1. … 1 more file 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. … 891 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. … 882 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.
Purge AS400 port specific code.

The AS400 port is no longer maintained nor does anyone have plans to

maintain it. That's not so bad, but keeping the port code consistent with

changes made to trunk is becoming rather difficult, see

http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=141147.

* subversion/include/svn_utf.h

* subversion/libsvn_client/add.c

* subversion/libsvn_ra_svn/streams.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/prompt.c

* subversion/libsvn_subr/utf.c

* subversion/svn/main.c

* subversion/svn/util.c

* subversion/svnlook/main.c

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

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

Remove AS400 blocked code and related comments.

  1. … 12 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. … 175 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.
Check repository UUID when creating an RA session. This fixes an

issue where "svn update" would silently overwrite the UUID of a

working copy if the repository UUID had changed. Several tests in

svnadmin_tests which silently took advantage of this are fixed too.

This patch was filed as issue #3177.

Patch by: Daniel Shahaf <d.s@daniel.shahaf.co.il>

(Tweaked by me to use the new API everywhere, fix up comments, etc.)

* subversion/include/svn_ra.h, subversion/libsvn_ra/ra_loader.c

(svn_ra_open3): New API, deprecates svn_ra_open2. Adjust comments.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): When having a working copy,

pass its uuid to svn_ra_open3().

* subversion/include/svn_error_codes.h

(SVN_ERR_RA_UUID_MISMATCH): New error.

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

(make_and_open_local_repos): Call svn_ra_open3, but pass NULL for uuid.

* subversion/svnsync/main.c

(do_initialize, initialize_cmd, synchronize_cmd, copy_revprops_cmd):

Call svn_ra_open3.

(open_source_session): Call svn_ra_open3, pass the expected uuid to it,

and eliminate the code that compared uuids by hand.

* subversion/include/svn_client.h

(svn_client_open_ra_session): Adjust comment.

* subversion/libsvn_client/client.h

(svn_client__default_walker_error_handler): Adjust comment.

* subversion/libsvn_client/copy.c

(repos_to_repos_copy): Adjust comment.

* subversion/tests/cmdline/update_tests.py

(update_uuid_changed): New test.

(test_list): Run it.

* subversion/tests/cmdline/switch_tests.py

(switch_change_repos_root): Change expected error message.

* subversion/tests/cmdline/svnadmin_tests.py

(extra_headers, extra_blockcontent, empty_date):

Load dumpfile with '--ignore-uuid' in order to not change the repository

uuid, since a working copy already has been checked out from it.

  1. … 11 more files in changeset.
Cleanup some path inconsistencies inside ra-local. Rather than having

the "in repository path" carry a leading slash only when not pointing

to the root of the repository, consistently carry a leading slash all

the time.

* subversion/libsvn_ra_local/ra_local.h

(svn_ra_local__session_baton_t): Note that the 'fs_path' member

always has a leading slash.

* subversion/libsvn_ra_local/split_url.c

(svn_ra_local__split_URL): Ensure that the returned 'fs_path' has a

leading slash.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_session_url): Lose an unnecessary apr_pstrmemdup().

(svn_ra_local___reparent): Verify that the new URL is in the same

repository that the session currently points to, and ensure that

the stored in-repos-path has a leading slash.

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

(check_split_url): Allow 'in_repos_path' to be NULL (meaning, "root

of the repository"), and handle this case in verifications.

(split_url_test): Add a test case for splitting a repository root URL.

  1. … 3 more files in changeset.
Channeling Erik Hülsmann, remove all trailing whitespace within our source

tree:

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

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

done

Inspired by: ehu

  1. … 449 more files in changeset.
Rename libsvn_ra_dav to libsvn_ra_neon. Update as many places as

possible.

Some things that I did not change:

I left the deprecated svn_ra_dav_init alone.

The SVN_ERR_RA_DAV_* error codes and svn:wc:ra_dav:* wcprops, which

were already being shared between the two RA libraries, stayed.

* everywhere: change "dav" to "neon"

  1. … 49 more files in changeset.
A few minor tweaks allowing C tests to run on AS400.

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

(current_directory_url): Convert ebcdic string from _getcwd() to utf-8.

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

(main): Convert argv from ebcdic.

* subversion/tests/svn_test_main.c

(main): Call svn_cmdline__getopt_init() earlier so argv is converted to

ebcdic before we use it.

  1. … 2 more files in changeset.
Update ra_local C test to modern RA API.

Patch by: David Glasser <glasser@mit.edu>

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

(make_and_open_local_repos): Use svn_ra_session_t instead of

svn_ra_plugin_t and a baton.

(open_ra_session, get_youngest_rev): Adjust calls to above.

Reformat the code to use a consistent no-space-before-param-list-paren style.

See here for the vote that decided this:

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=111877

From: "Peter N. Lundblad" <peter@famlundblad.se>

To: "Peter N. Lundblad" <peter@famlundblad.se>

cc: dev@subversion.tigris.org

Subject: Results of: [VOTE] New space-before-parens style

Date: Wed, 8 Feb 2006 12:00:35 +0100 (CET)

Message-ID: <Pine.LNX.4.55.0602080918350.10805@localhost.localdomain>

I took the opportunity to make spacing among all parens in SVN_ERR

macro calls consistent. But I did not address consistency of casts,

nor whether a function name should always appear below its return type

in declarations and definitions, nor whether there should be a space

before/after the "*" when declaring pointer return types.

* www/hacking.html

(coding-style): Document that we are no-space-before-paren now.

* everywhere: Reformat.

  1. … 365 more files in changeset.
Followup to r16428. Change ra_local "invalid host" test to SKIP under Cygwin,

as Cygwin has UNC paths too.

Patch by: jlvarner

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

(HAS_UNC_HOST): Enable under cygwin.

Reorganization of the C test libraries and includes.

Move the misplaced svn_test.h file out of subversion/include/.

Merge libsvn_test_fs into libsvn_test.

* build.conf (libsvn_test): Tweak sources and libs, merging in values from

libsvn_test_fs.

(libsvn_test_fs): Remove.

* subversion/include/svn_test.h: Move...

* subversion/tests/svn_test.h: ...to here.

* subversion/tests/fs-helpers.c: Rename...

* subversion/tests/svn_test_fs.c: ...to this.

* subversion/tests/fs-helpers.h: Rename...

* subversion/tests/svn_test_fs.h: ...to this.

* subversion/tests/svn_tests_main.c: Rename...

* subversion/tests/svn_test_main.c: ...to this.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change #includes appropriately.

  1. … 29 more files in changeset.
Merge locking branch to trunk, by comparing trunkURL with branchURL.

This is not a test. This is an actual addition of a very large feature.

This merge passes 'make check' over all three RA implementations.

To see commit logs for this feature, examine /branches/locking, r11749:13570.

  1. … 183 more files in changeset.
In r11584, svn_ra_local__split_URL learned how to convert local paths

into UNC paths using the host name from the URL. This broke

ra-local-test on Windows, which didn't take this into account and was

surprised at seeing the split succeed. Fixed thusly:

* include/svn_test.h (svn_test_mode_t): New enumeration.

(svn_test_descriptor_t): Replace 'xfail' with 'mode'.

(SVN_TEST_PASS, SVN_TEST_XFAIL): Replace number with enum constant.

(SVN_TEST_SKIP): New initializer.

* tests/svn_tests_main.c (do_test_num): Handle skipped tests.

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

(split_url_syntax, split_url_bad_host, split_url_host): Break out three

separate tests from split_url_test_1.

(split_url_tet): Rename from split_url_test_2.

(HAS_UNC_HOST): Define skip predicate.

(test_funcs): Update. Conditionally skip split_url_bad_host.

Yes, the C test framework now supports compile-time predicates for

skipping tests.

  1. … 2 more files in changeset.
Hopefully fix ra-local-test on Windows.

* subversion/tests/libsvn_ra_local/ra-local-test.c (current_directory_url):

Use svn_path_internal_style.

* subversion/tests/libsvn_ra_local/ra-local-test.c: Try to make MSVC compatible.