Checkout Tools
  • last updated 1 hour 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.
All our tests should use separate working sets. This patch fixes

a bunch of C tests that used the same files / folders as other tests.

Most of them were probably the result of copy'n'paste.

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

(test_foreign_repos_copy): use test-specific working set

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

(changes_fetch_raw): ditto

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

(write_null_string): ditto

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

(mixed_to_lf,

unexpand_author,

unexpand_date,

unexpand_author_date,

unexpand_author_rev,

unexpand_rev,

unexpand_rev_url,

unexpand_author_date_rev_url,

lf_to_crlf_unexpand_author,

mixed_to_lf_unexpand_author_date,

crlf_to_cr_unexpand_author_rev,

cr_to_crlf_unexpand_rev,

cr_to_crlf_unexpand_rev_url): ditto

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

(test_adds_change_kind,

movedto_opdepth,

del4_update_edit_AAA,

del4_update_delete_AAA,

del4_update_add_AAA,

del4_update_delself_AAA): ditto

  1. … 4 more files in changeset.
Reintegrate integrate-string-improvements branch into /trunk.
  1. … 83 more files in changeset.
* subversion/tests/libsvn_fs_base/strings-reps-test.c

(read_rep): Fix a integer size mis-match.

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.
Followup to the move of the skels logic to libsvn_subr: Rename skel_t to

svn_skel_t. While this symbol is defined in a private header file, and I

don't know that we have a hard-and-fast policy for those, consistency

dictates we make this change.

* subversion/libsvn_subr/skel.c,

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

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

subversion/libsvn_fs_base/bdb/reps-table.c,

subversion/libsvn_fs_base/bdb/copies-table.c,

subversion/libsvn_fs_base/bdb/dbt.c,

subversion/libsvn_fs_base/bdb/dbt.h,

subversion/libsvn_fs_base/bdb/nodes-table.c,

subversion/libsvn_fs_base/bdb/txn-table.c,

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

subversion/libsvn_fs_base/bdb/rev-table.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/util/fs_skels.h,

subversion/libsvn_fs_base/util/fs_skels.c,

subversion/include/private/svn_skel.h:

Update references from skel_t to svn_skel_t.

  1. … 15 more files in changeset.
Rename skels functions in the tests

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

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

- rename skel function calls

  1. … 1 more file in changeset.
Move the skel code to libsvn_subr for private use by other libs.

- Renamed functions into svn_skel__* namespace

- Created #defines for old names, mapping to new. This keeps this change

to a small, manageable size.

- Adjusted #include lines for location of new header

- Applied const to some skel function params

- Switched some 0 values to NULL in the skel code (old -> new style)

* subversion/libsvn_fs_base/util/skel.h: renamed to ...

* subversion/include/private/svn_skel.h: here.

- renamed functions, add const to params

(svn_skel__getsize, svn_skel__putsize): moved from key-gen.h

* subversion/libsvn_fs_base/util/skel.c: renamed to ...

* subversion/libsvn_subr/skel.c: here.

- renamed functions, add const to params

(svn_skel__getsize, svn_skel__putsize): moved from key-gen.c

* subversion/libsvn_fs_base/key-gen.h:

(svn_fs_base__getsize, svn_fs_base__putsize): moved to svn_skel.h

* subversion/libsvn_fs_base/key-gen.c:

(svn_fs_base__getsize, svn_fs_base__putsize): moved to skel.c

* subversion/libsvn_fs_base/bdb/dbt.h:

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

* subversion/libsvn_fs_base/bdb/lock-tokens-table.c:

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

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

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

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

* subversion/libsvn_fs_base/util/fs_skels.h:

* subversion/libsvn_fs_base/util/fs_skels.c:

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

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

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

- adjust includes

  1. … 17 more files in changeset.
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.
Teach the Berkeley DB backend to store both MD5 and SHA1 checksums -- as

available and allowed for the FS format -- in the `representations' table.

* subversion/libsvn_fs_base/notes/structure

(Representations): Tweak BNF to show that we'll always store MD5,

and possibly also store SHA1, for representations.

* subversion/libsvn_fs/fs-loader.h,

* subversion/libsvn_fs/fs-loader.c

(root_vtable_t): Add 'kind' parameter to file_checksum() method,

passed into providers' file_checksum implementations.

* subversion/libsvn_fs_fs/tree.c

(fs_file_checksum): Add 'kind' parameter, and use it to filter the

returned data.

* subversion/libsvn_fs_base/fs.h

(representation_t): Rename 'checksum' member to 'md5_checksum', and

add 'sha1_checksum' member.

* subversion/libsvn_fs_base/reps-strings.h

(svn_fs_base__rep_contents_checksums): Was

svn_fs_base__rep_contents_checksum(). Rename 'checksum' parameter

to 'md5_checksum', and add 'sha1_checksum' parameter.

* subversion/libsvn_fs_base/reps-strings.c

(svn_fs_base__rep_contents_checksums): Was

svn_fs_base__rep_contents_checksum(). Rename 'checksum' parameter

to 'md5_checksum', and add 'sha1_checksum' parameter.

(make_fulltext_rep): Rename 'checksum' parameter to 'md5_checksum',

and add 'sha1_checksum' parameter, duping both.

(svn_fs_base__get_mutable_rep): Update call to make_fulltext_rep.

(txn_body_read_rep): Compare both MD5 and SHA1 checksums against

their stored values where possible.

(svn_fs_base__rep_contents): Allow checksum tests of either type of

checksum, but prefer a SHA1 comparison.

(struct rep_write_baton): Rename 'checksum_ctx' and 'checksum' to

'md5_checksum_ctx' and 'md5_checksum', respective; add

'sha1_checksum_ctx' and 'sha1_checksum'.

(rep_write_get_baton): Track renamed baton members, and also

initialize an MD5 checksum context.

(txn_body_write_rep): Update both checksum contexts.

(txn_body_write_close_rep): Copy both checksum contexts into the

representation.

(rep_write_close_contents): Finalize both checksum contexts.

(rep_contents_clear): Clear both representation checksums.

(svn_fs_base__rep_deltify): Use both representation checksums.

* subversion/libsvn_fs_base/dag.h

(svn_fs_base__dag_file_checksum): Add 'checksum_kind' parameter.

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__dag_file_checksum): Add 'checksum_kind' parameter, and

update call to svn_fs_base__rep_contents_checksums().

(maybe_store_checksum_rep): Update call to

svn_fs_base__rep_contents_checksums().

(svn_fs_base__dag_finalize_edits): Update calls to

svn_fs_base__rep_contents_checksums(), performing checksum

comparisons against either MD5 or SHA1 as requested (if possible).

* subversion/libsvn_fs_base/tree.c

(struct file_checksum_args): Add 'kind' variable.

(txn_body_file_checksum): Pass baton's 'kind' into updated call to

svn_fs_base__dag_file_checksum().

(base_file_checksum): Add 'kind' parameter, and use it to populate

baton's 'kind' variable.

(txn_body_apply_textdelta): Update call to svn_fs_base__dag_file_checksum(),

asking for the same kind of checksum as the one we'll compare against.

* subversion/libsvn_fs_base/util/fs_skels.h

(svn_fs_base__unparse_representation_skel): Add 'format' parameter.

* subversion/libsvn_fs_base/util/fs_skels.c

(is_valid_representation_skel, svn_fs_base__parse_representation_skel):

Handle new representation format.

(prepend_checksum): New helper function.

(svn_fs_base__unparse_representation_skel): Add 'format' parameter,

and use prepend_checksum() as needed to handle the new

representation skel format.

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

(svn_fs_bdb__write_rep): Pass filesystem format version to updated

call to svn_fs_base__unparse_representation_skel().

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

(txn_body_read_rep): Update call to svn_fs_base__unparse_representation_skel.

  1. … 13 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.
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.
I seem to have lost my largs. Has anyone seen my largs?

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

Error string fix.

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.
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.
Make all the libsvn_fs_base/bdb functions which currently accept only

trail_t's also accept (and use, instead of trail->pool) explicit 'pool'

parameters.

Callers of these functions which themselves live in the

libsvn_fs_base/bdb area now provide *their* new pool as the value for

this new parameter; callers outside that area pass trail->pool as that

parameter. The net affect, of course, is that no changes in memory

usage have happened at all. But this is the first step of several

incremental commits which should give us the flexibility over pool

usage that we need in the BDB backend.

* subversion/libsvn_fs_base/bdb/changes-table.h,

subversion/libsvn_fs_base/bdb/changes-table.c

(svn_fs_bdb__changes_add, svn_fs_bdb__changes_delete,

svn_fs_bdb__changes_fetch, svn_fs_bdb__changes_fetch_raw): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/copies-table.h

(svn_fs_bdb__reserve_copy_id, svn_fs_bdb__create_copy,

svn_fs_bdb__delete_copy, svn_fs_bdb__get_copy): Add 'pool'

parameter, and use it instead of trail's pool for allocations.

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

(put_copy, svn_fs_bdb__reserve_copy_id, svn_fs_bdb__create_copy,

svn_fs_bdb__delete_copy, svn_fs_bdb__get_copy): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/nodes-table.h,

subversion/libsvn_fs_base/bdb/nodes-table.c

(svn_fs_bdb__new_node_id, svn_fs_bdb__new_successor_id,

svn_fs_bdb__delete_nodes_entry, svn_fs_bdb__get_node_revision,

svn_fs_bdb__put_node_revision): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/reps-table.h,

subversion/libsvn_fs_base/bdb/reps-table.c

(svn_fs_bdb__read_rep, svn_fs_bdb__write_rep,

svn_fs_bdb__write_new_rep, svn_fs_bdb__delete_rep): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/rev-table.h,

subversion/libsvn_fs_base/bdb/rev-table.c

(svn_fs_bdb__get_rev, svn_fs_bdb__put_rev, svn_fs_bdb__youngest_rev): Add

'pool' parameter, and use it instead of trail's pool for allocations.

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

(locate_key, svn_fs_bdb__string_read, get_key_and_bump,

svn_fs_bdb__string_append, svn_fs_bdb__string_clear,

svn_fs_bdb__string_size, svn_fs_bdb__string_delete,

svn_fs_bdb__string_copy): Add 'pool' parameter, and use it instead

of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/strings-table.h

(svn_fs_bdb__string_read, svn_fs_bdb__string_size,

svn_fs_bdb__string_append, svn_fs_bdb__string_clear,

svn_fs_bdb__string_delete, svn_fs_bdb__string_copy): Add 'pool'

parameter, and use it instead of trail's pool for allocations.

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

(svn_fs_bdb__put_txn, allocate_txn_id, svn_fs_bdb__create_txn,

svn_fs_bdb__delete_txn, svn_fs_bdb__get_txn): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

(svn_fs_bdb__get_txn_list): Re-order parameters (this one already

had a 'pool' parameter).

* subversion/libsvn_fs_base/bdb/txn-table.h

(svn_fs_bdb__create_txn, svn_fs_bdb__delete_txn,

svn_fs_bdb__get_txn, svn_fs_bdb__put_txn): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

(svn_fs_bdb__get_txn_list): Re-order parameters (this one already

had a 'pool' parameter).

* subversion/libsvn_fs_base/bdb/uuids-table.h,

subversion/libsvn_fs_base/bdb/uuids-table.c

(svn_fs_bdb__get_uuid, svn_fs_bdb__set_uuid): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

  1. … 24 more files in changeset.
Stop casting away const-ness where we don't need to.

* subversion/libsvn_subr/io.c

(test_tempdir): No need for "*path" to be const.

* subversion/mod_authz_svn/mod_authz_svn.c

(req_check_access): Modify the data before (not after) assigning it to

a pointer-to-const, so a cast is not needed.

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

(parse_cstr): "*str" can be const...

(parse_invalid_atoms): so this no longer needs a cast.

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

(write_new_rep, write_rep, read_rep, delete_rep): Casts not needed.

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

(test1): The local string variables can be const (and can also be more

local), so the casts are not needed. One cast was not needed anyway.

  1. … 4 more files in changeset.
Merge the changes from the fs-abstraction branch. This allows the

libsvn_fs_fs filesystem to sit alongside the old BDB filesystem in the

same executable.

  1. … 89 more files in changeset.