subversion

Checkout Tools
  • last updated 28 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1574988 is being indexed.

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. … 40 more files in changeset.
Fix typos in comments: s/begin/being/.

* subversion/include/svn_fs.h

(svn_fs_progress_notify_func_t): Fix typo.

* subversion/libsvn_subr/named_atomic.c

(svn_atomic_namespace__create): Fix typo.

Don't let invalid mergeinfo stop 'svnadmin dump' from producing a dump.

Just continue.

Part of issue #4476 "Mergeinfo containing r0 makes svnsync and svnadmin dump

fail".

* subversion/libsvn_repos/dump.c

(verify_mergeinfo_revisions): New function, factored out of ...

(dump_node): ... here. And if verify_mergeinfo_revisions() produces any

error, ignore the error and continue.

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

(dump_r0_mergeinfo_notifier): New function.

(test_dump_r0_mergeinfo): New test function.

(test_funcs): Run it.

* configure.ac: Add quotes around ${abs_srcdir}.

* configure.ac: Tweak .pc generation to handle builddir != srcdir.

Add missing descriptions for several libraries to build.conf.

These descriptions are used in pkg-config .pc files and I noticed

a few .pc files were lacking them.

* build.conf

(libsvn_fs_base, libsvn_fs_fs, libsvn_fs_x,

libsvn_fs_util, libsvn_ra, libsvn_ra_serf,

libsvn_ra_svn, libsvn_ra_local): Describe these libraries.

Kick off work on pkg-config support (issue #738, and also #4435).

pkg-config support allows API consumers on UNIX-like systems to link

to Subversion libraries without having to manually specify the correct

set of linker flags, including the particular flags for dependencies

required by a particular build of Subversion (bdb, serf, etc.).

pkg-config uses libsvn_foo.pc files which describe the set of flags

required to link to libsvn_foo.

See http://www.freedesktop.org/wiki/Software/pkg-config/ for more information.

Make gen-make.py produce .pc.in files for all Subversion libraries,

and make the configure script produce .pc files from these .pc.in files.

Dependency declarations and linker flags are based on information

parsed from build.conf.

Dependencies of Subversion which support pkg-config can be marked

as such in build.conf, allowing pkg-config to resolve them. The

name of the dependency's pkg-config script has to be specified

without the .pc extension, e.g.:

[gnome-keyring]

type = lib

external-lib = $(SVN_GNOME_KEYRING_LIBS)

pkg-config = gnome-keyring-1

Dependencies not aware of pkg-config are added to linker flags directly.

To illustrate, the generated libsvn_client.pc file on my system contains:

[[[

prefix=/home/stsp/svn/prefix/svn-trunk

exec_prefix=${prefix}

libdir=${exec_prefix}/lib

includedir=${prefix}/include

Name: libsvn_client

Description: Subversion Client Library

Version: 1.9.0

Required: apr-1

Required.private:

Libs: -L${libdir} -lsvn_wc -lsvn_ra -lsvn_delta -lsvn_diff -lsvn_subr

Cflags: -I${includedir}

]]]

There is no support for optional dependencies between Subversion libraries

yet, however. For instance, libsvn_client might or might not be linked to

libsvn_ra_serf. Such dependencies are currently omitted. Also, I'm not

sure yet what to do in cases where a dependency might be statically or

dynamically linked, e.g. sqlite.

The .pc files are not being installed yet. I don't want to expose these

files to systems using pkg-config until all outstanding issues are resolved.

* build/generator/gen_make.py

(Generator.write): Generate .pc.in files.

(Generator.write_pkg_config_dot_in_files): New helper function.

* build/generator/templates/pkg-config.in.ezt: New file, the .pc.in template.

* build.conf: apr, apr-util, serf, gnome-keyring, and sqlite support pkg-config.

There may be others (kwallet?) but I haven't investiged more yet.

I also haven't checked yet if all versions of these dependencies support

pkg-config. The most recent versions do support it.

* configure.ac

(SVN_APR_MAJOR_VERSION): Declare. APR's major version number is needed

to select the correct pkg-config script name (e.g. apr-1 or apr-2).

Generate .pc files from pc.in files.

* subversion/libsvn_auth_gnome_keyring, subversion/libsvn_auth_kwallet,

subversion/libsvn_client, subversion/libsvn_delta, subversion/libsvn_diff,

subversion/libsvn_fs, subversion/libsvn_fs_base, subversion/libsvn_fs_fs,

subversion/libsvn_fs_util, subversion/libsvn_fs_x, subversion/libsvn_ra,

subversion/libsvn_ra_local, subversion/libsvn_ra_serf,

subversion/libsvn_ra_svn, subversion/libsvn_repos, subversion/libsvn_subr,

subversion/libsvn_wc: Ignore generated .pc and .pc.in files.

  1. … 6 more files in changeset.
Fix getopt tests with KWallet, followup to r1572106

Obvious fix.

* subversion/tests/cmdline/getopt_tests.py

(del_lines_res): Adjust pattern to fit actual output of --version

with KWallet

* subversion/libsvn_subr/utf8proc.c

Following up on r1573069, resolve a shadowed symbol warning by redefining

strlen when including "utf8proc/utf8proc.c".

Remove some (since at least 1.8.0) unused gen-make options, from when we only

supported in-tree builds of bdb and apr-util.

* gen-make.py

Remove support for --enable-bdb-in-apr-util,

--with-neon and --without-neon.

* build/generator/gen_win_dependencies.py

Stop parsing enable-bdb-in-apr-util.

On fsfs-lock-many branch: replace some macros with functions

for easier debugging.

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

(expect_lock, expect_error, expect_unlock, expect_unlock_error): New.

(lock_multiple_paths): Remove macros, use functions.

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

(expect_lock, expect_error, expect_unlock, expect_unlock_error): New.

(lock_test): Remove macros, use functions.

* subversion/svn/conflict-callbacks.c

(open_editor, handle_text_conflict, conflict_func_interactive): Use the

svn_err_best_message() function instead of hand-rolling an error messsage

to fall back on.

* subversion/svn/conflict-callbacks.c

(handle_text_conflict): Inform the user if falling back to the internal

merge tool.

* subversion/svn/util.c

(svn_cl__merge_file_externally): When the merge tool fails to run, include

the path to the merge tool in the error message, not just the exit code.

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

(dir_delta_get_editor): Add a doc string.

* subversion/libsvn_subr/mergeinfo.c: Fix typos in comments.
Shut up a bunch of warnings from SQLite Amalgamation.

I get no warnings from CLang now, but GCC still spits a bunch out for me

since you simply can't turn them off with pragmas. Our only option is

to figure out how to pass '-w' to GCC when building this file.

* subversion/libsvn_subr/sqlite3wrapper.c:

Don't bother with the push or pop. Effectively nothing is in this file but

the SQLite Amalgamation so no reason to turn them back on. Since the other

pragmas have been supported since GCC 4.2 let more compilers benefit from

reduced warnings. CLang has shorten-64-to-32 so disable it for it not just

Apple's fork of GCC. Add two CLang specific warnings.

In libsvn_repos, simplify hash iteration code a little by using key and

value accessor functions rather than apr_hash_this(), as we already do in

many other places.

Though I lament the length of those svn__apr_hash_index_* identifiers (which

I created), at least it's a step closer to readable. We can shorten them

later to apr_hash_this_* by adding configury, now that APR 1.5 has those.

* subversion/libsvn_repos/delta.c

(delta_dirs): As above.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_commit_txn): As above.

* subversion/libsvn_repos/hooks.c

(lock_token_content): As above.

* subversion/libsvn_repos/load-fs-vtable.c

(prefix_mergeinfo_paths,

renumber_mergeinfo_revs,

remove_node_props): As above.

* subversion/libsvn_repos/log.c

(svn_repos_check_revision_access,

turn_moves_into_copies,

turn_unique_copies_into_moves,

detect_changed,

fs_mergeinfo_changed,

get_combined_mergeinfo_changes,

send_log,

combine_mergeinfo_path_lists): As above.

* subversion/libsvn_repos/replay.c

(add_subdir,

svn_repos_replay2,

svn_repos__replay_ev2): As above.

* subversion/libsvn_repos/reporter.c

(delta_proplists): As above.

* subversion/libsvn_repos/rev_hunt.c

(find_merged_revisions): As above.

Stop trading one compiler warning for another.

* subversion/libsvn_subr/error.c

(err_abort): Disable the unused-variable warning via pramgas when e can

rather than using the variable by setting it to itself, which creates

another warning. Leave the old method in place for compilers that

don't support this method.

* subversion/libsvn_fs_x/string_table.c

(svn_fs_x__string_table_builder_add): Remove unnecessary initialization.

Follow-up to r1574144: Fix accidental change in logic.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_check_related): Stick with the original "!= unreleated" comparison.

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

(lock_multiple_paths): Fix typo, no functional change.

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

(lock_test): Extend to test force unlock.

Since we introduced symbolic names for all kinds of node relationships

in r1554800, let's use them instead of magic values everywhere in the

FS layer. There is no actual change to the logic.

* subversion/libsvn_fs/fs-loader.h

(id_vtable_t): Use the new enum as the return value of compare.

Tweak formatting for consistency.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_check_related,

svn_fs_compare_ids): Convert the new FS ID vtable return value type

to the FS API level type.

* subversion/libsvn_fs_base/id.h

(svn_fs_base__id_compare): Update return type to match vtable.

* subversion/libsvn_fs_base/id.c

(svn_fs_base__id_compare): Update implementation.

* subversion/libsvn_fs_base/tree.c

(get_copy_inheritance,

base_node_relation,

txn_body_copy): Update BDB-internal users of that function.

* subversion/libsvn_fs_fs/id.h

(svn_fs_fs__id_compare): Similar change as in BDB.

* subversion/libsvn_fs_fs/id.c

(svn_fs_fs__id_compare): Ditto.

* subversion/libsvn_fs_fs/tree.c

(get_copy_inheritance): Update FSFS-internal users of that function.

* subversion/libsvn_fs_x/id.h

(svn_fs_x__id_compare): Similar change as in BDB.

* subversion/libsvn_fs_x/id.c

(svn_fs_x__id_compare): Ditto.

* subversion/libsvn_fs_x/tree.c

(get_copy_inheritance): Update FSX-internal users of that function.

Suggested by: julianfoad

Fix compiler warnings about the size of membuffer cache entries.

Entries in the membuffer cache are limited to a maximum size of the maximum

value of an apr_uint32_t, since cache values larger than that would not be

efficient. However, our APIs generally use apr_size_t for the size of data

in memory. apr_size_t may be 64-bits wide on some platforms.

For the convenience of other developers the membuffer APIs take apr_size_t

values and the effort to ensure the cache entries are not larger than

apr_uint32_t is handled by the membuffer cache code itself. It does this by

calculating the maximum cache entry value and comparing it against the size

of the incoming entry. This means it is safe to cast the size to the

apr_uint32_t type it uses internally once this check has been completed.

* subversion/libsvn_subr/cache-membuffer.c

(select_level): Cast to apr_uint32_t when setting dummy_entry.size.

(membuffer_cache_set_internal, membuffer_cache_set_partial_internal):

Cast to apr_uint32_t when setting entry->size.

Fix compiler errors regarding index values for membuffer cache.

The maximum entries in a membuffer cache is limited to the max value of an

apr_uint32_t. But does pointer arithmatic to calculate indexes into the

cache. On 64-bit platforms the pointers are going to be 64-bits wide, so

the calculation will be 64-bits wide. The results will stay within the

range of the apr_uint32_t so it's safe to just cast these calculations.

* subversion/libsvn_subr/cache-membuffer.c

(free_spare_group): Cast to apr_uint32_t when calculating first_spare_group.

(drop_entry): Cast to apr_uint32_t when calculating last_in_group.

(find_entry): Cast to apr_uint32_t when calculating previous and next on

group headers.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_node_relation): As we recently defined different FS instances

to imply unrelated notes, we can replace the

somewhat fragile vtable check with a stricter

FS comparison.

Suggested by: julianfoad

Incorporate documentation and naming feedback gotten for r1554800.

No functional change.

* subversion/include/svn_fs.h

(svn_fs_node_relation_t): Add references to the values previously

used for these relations. Fix member

spelling and docstring typos.

(svn_fs_node_relation): Just declare the current behavior as the

intended one.

* subversion/libsvn_fs_base/tree.c

(base_node_relation): Adapt to enum member spelling fix.

* subversion/libsvn_fs_fs/tree.c

(fs_node_relation): Ditto.

* subversion/libsvn_fs_x/tree.c

(x_node_relation): Ditto.

Suggested by: julianfoad

* subversion/svnserve/svnserve.c

(is_busy): Fix typo in comment.

Tagging release 1.9.0-alpha2