Checkout Tools
  • last updated 6 hours 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.
* subversion/tests/libsvn_fs/fs-test.c

(check_entry_present, check_entry_absent),

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

(check_entry_present, check_entry_absent, check_id_present,

check_id_absent): Initialize variable 'present' to silence

warning -Wmaybe-uninitialized.

Approved by: julianfoad

  1. … 1 more file in changeset.
* subversion/tests/libsvn_fs_base/fs-base-test.c

(node_created_rev_args): Remove unused struct.

Collapse the scope on several variables in our codebase.

Found by: Philipp Kloke <philipp.kloke@web.de>

* subversion/libsvn_fs_fs/tree.c

(history_prev),

* subversion/libsvn_subr/mergeinfo.c

(combine_with_lastrange),

* subversion/libsvn_subr/simple_providers.c

(svn_auth__simple_first_creds_helper),

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

(create_within_copy),

* subversion/libsvn_wc/adm_ops.c

(check_can_add_node),

* subversion/libsvn_client/merge.c

(remove_noop_merge_ranges, do_directory_merge),

* subversion/libsvn_client/delete.c

(svn_client_delete4):

Tighten various variable scopes.

  1. … 6 more files in changeset.
Integrate a small test in the c file of the library where it applies to. After

more than 5 years it is unlikely that we wil make some more generic svn_key_

api in the forseeable future.

* build.conf

Remove key-test project

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

Delete file

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

(includes): Add key-gen.h

(key_test): Move here, from key-test.c

(test_funcs): Add key_test.

  1. … 2 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.
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.
Attempt to button down the BDB backend's memory usage by allowing trail

producers to tell that subsystem to discard all memory associated with

the trail.

Most of the time, this pool usage waste isn't a problem (because of

better pool practices in higher layers). But mod_dav and mod_dav_svn

have notoriously wicked pool usage behavior, and I'm tired of having

the theoretically niceties of our pool usage guidelines getting in the

way of Subversion working. Why should a simple 'svn ls -v' of a

directory with 10,000 files exhaust all the memory on my 2Gb laptop?

It shouldn't, ahd if this kind of change is what I have to do to get

that leakage back down to "only" 339Mb, I feel compelled to do it.

An arguably cleaner approach would have been to add a 'result_pool'

argument to the txn_body_* function type which is the same pool passed

to svn_fs_base__retry_txn(). That would allow the txn_body_*

functions (which already operate with 'trail' and 'trail->pool' today)

to use the 'result_pool' argument as a final destination for

returnable stuff and 'trail->pool' for scratch work. (And then

do_retry() function would, of course, always whack trail->pool when it

was finished with a trail.) I've filed issue #3395 to track this

possible future enhancement.

Reviewed by: gstein

* subversion/libsvn_fs_base/trail.h

(svn_fs_base__retry_debug, svn_fs_base__retry_txn, svn_fs_base__retry):

Add 'destroy_trail_pool' parameter.

* subversion/libsvn_fs_base/trail.c

(do_retry): Add 'destroy_trail_pool', and, if set, destroy the trail

subpool even upon successful completion of the transaction.

(svn_fs_base__retry_debug, svn_fs_base__retry_txn, svn_fs_base__retry):

Add 'destroy_trail_pool' parameter, passed to do_retry().

* subversion/libsvn_fs_base/reps-strings.c,

* subversion/libsvn_fs_base/revs-txns.c,

* subversion/libsvn_fs_base/lock.c,

* subversion/libsvn_fs_base/dag.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

Update all calls to svn_fs_base__retry() and svn_fs_base__retry_txn(),

passing TRUE for the new 'destroy_trail_pool' parameter iff the

caller didn't need any allocations made by the trail subsystem to

outlive the trail itself.

* subversion/libsvn_fs_base/tree.c

Same as above, but also...

(base_node_created_path, base_node_prop, svn_fs_base__miscellaneous_get,

base_copied_from, base_file_checksum): Use a scratch pool for the

trail work.

* subversion/libsvn_fs_base/uuid.c

Same as above, but also...

(svn_fs_base__get_uuid): Use a scratch pool for the trail work.

  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.
* tests/libsvn_fs_base/fs-base-test.c

(orphaned_textmod_change): Add a comment explaining why we have this

test at all, given that it violates the API rules.

Suggested by: glasser

Fix issue #3349 (BDB backend could allow `changes' table out-of-sync

with actual changes).

* subversion/libsvn_fs_base/tree.c

(txn_body_txdelta_finalize_edits): Add the `changes' table item here...

(txn_body_apply_textdelta): ...instead of here.

(txn_body_fulltext_finalize_edits): And do the same here...

(txn_body_apply_text): ...instead of here.

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

(test_funcs): Expect 'orphaned_textmod_change' test to pass now.

  1. … 1 more file in changeset.
Add regression text for issue #3349 (BDB backend could allow `changes'

table out-of-sync with actual changes).

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

(orphaned_textmod_change): New regression test.

(test_funcs): Add reference to new test.

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.
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.
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.
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.
Initial framework to share the utility functions used by FSFS and BDB

file systems, with the goal of avoiding duplicate code in FS backend

implementations.

It includes a new libsvn_fs_util library to define the functions used by

both FSFS and BDB file systems. For now, svn_fs__canonicalize_abspath()

function, a replacement for svn_fs_fs__canonicalize_abspath() and

svn_fs_base__canonicalize_abspath() functions is defined here. It

should be extended for other shared functions as well.

* subversion/libsvn_fs_base/tree.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(open_path, get_dag, add_change, change_txn_merge_info,

base_node_history): Rename svn_fs_base__canonicalize_abspath() function

as svn_fs__canonicalize_abspath() function.

* subversion/libsvn_fs_base/fs.c

svn_fs_base__canonicalize_abspath(): Remove.

* subversion/libsvn_fs_base/fs.h

Bump copyright year to 2007.

svn_fs_base__canonicalize_abspath(): Remove.

* subversion/libsvn_fs_base/lock.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(svn_fs_base__lock, svn_fs_base__unlock, svn_fs_base__get_lock,

svn_fs_base__get_locks): Rename svn_fs_base__canonicalize_abspath()

function as svn_fs__canonicalize_abspath() function.

* subversion/libsvn_fs_base/dag.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(svn_fs_base__dag_copy): Rename svn_fs_base__canonicalize_abspath()

function as svn_fs__canonicalize_abspath() function.

* subversion/libsvn_fs_util/fs-util.c

New library for defining the functions which could be used by FSFS and

BDB libraries. For now, we have defined svn_fs__canonicalize_abspath()

function.

* subversion/include/private/svn_fs_util.h

New header file for declaring the functions which could be used by

FSFS and BDB file systems. For now, we have declared

svn_fs__canonicalize_abspath() function used to canonicalize the

absolute path.

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

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(canonicalize_abspath): Rename svn_fs_base__canonicalize_abspath()

function as svn_fs__canonicalize_abspath() function and correct the

msg appropriately.

* subversion/libsvn_fs_fs/tree.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(open_path, get_dag, add_change, fs_change_node_prop, copy_helper,

fs_node_history): Rename svn_fs_fs__canonicalize_abspath() function as

svn_fs__canonicalize_abspath() function.

* subversion/libsvn_fs_fs/fs.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

svn_fs_fs__canonicalize_abspath(): Remove.

* subversion/libsvn_fs_fs/fs.h

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

svn_fs_fs__canonicalize_abspath(): Remove.

* subversion/libsvn_fs_fs/lock.c

Include the private/svn_fs_util.h header file, and bump copyright year

to 2007.

(svn_fs_fs__allow_locked_operation, svn_fs_fs__lock,

svn_fs_fs__unlock, svn_fs_fs__get_lock, svn_fs_fs__get_locks): Rename

svn_fs_fs__canonicalize_abspath() function as

svn_fs__canonicalize_abspath() function.

Patch by: bhuvan

Suggested by: kameshj

  1. … 11 more files in changeset.
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.
Don't gratuitously hide errors. Tidy error handling code. Fix error leaks

in test programs, not that leaks really matter there but in one case it

simplifies the code and in the other cases it provides extra information.

* subversion/libsvn_wc/copy.c

(svn_wc__remove_wcprops): Eliminate a temporary variable.

* subversion/libsvn_wc/lock.c

(do_open, svn_wc_adm_retrieve): Don't hide the underlying error, attach it

to the chain so it will be seen.

* subversion/libsvn_wc/update_editor.c

(leftmod_error_chain): Remove a redundant initialisation and eliminate

a temporary variable.

(apply_textdelta): Eliminate a temporary variable.

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

(abort_txn, delete_mutables): Don't leak an error, attach it to the chain.

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

(test_strings, abort_string): Don't leak an error, attach it to the chain.

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

(substitute_and_verify): Rather than formatting an error as text (and

leaking it), attach it to the chain; this is simpler and more accurate.

  1. … 5 more files in changeset.
A follow-up to r18228, allowing that change to actually compile.

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

Include "libsvn_fs_base/id.h" for svn_fs_base__id_copy_id().

(create_within_copy): Declare "j" outside of the "for" loop. Add

missing closing parenthesis to subsequent strcmp().

Improve an fs-base-test.

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

(create_within_copy): instead of testing for specific id triplets,

just test that children properly inherit copy-id's from parents.

Move all the FS-backend-agnostic C tests into libsvn_fs so they can be

exercised against both backends.

* build.conf

(fs-test): New section for new tests/libsvn_fs/fs-test target.

(fs-base-test): Was fs-test.

* tests/libsvn_fs_base/fs-test.c

Renamed from this...

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

...to this. And then gutted of all tests that are common to both FS

backends.

* tests/libsvn_fs/fs-test.c

Added as a copy of libsvn_fs_base/fs-test.c, and gutted of all code

that is specific to the BDB backend. All remaining tests can

now be run against either backend using the '--fs-type=' option.

* tests/libsvn_fs_base

Now ignore fs-base-test instead of fs-test.

* tests/libsvn_fs

Ignore fs-test.

  1. … 5 more files in changeset.