Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix a client SEGV with ra-local and --enable-runtime-module-search.

When DSO loading is enabled ra-local must pass a pool with an

appropriate lifetime to svn_fs_initialize.

* subversion/include/private/svn_subr_private.h

(svn_dso__pool): New.

* subversion/libsvn_subr/dso.c

(svn_dso__pool): New.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__init): Use svn_dso__pool.

  1. … 2 more files in changeset.
Fix building with apr trunk by removing unnecessary header includes.

apr_thread_mutex.h is included by apr_allocator.h which is included

by apr_pools.h. This header is prone to circular references because

it also includes apr_pools.h and despite efforts to prevent this

it's blowing up clang pretty bad with apr trunk. However, we don't

need it at all because we always have apr_pools.h.

* subversion/include/private/svn_mutex.h,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/fs.c,

subversion/libsvn_fs_x/fs.c,

subversion/libsvn_subr/cache-inprocess.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/pool.c: Remove apr_thread_mutex.h include.

  1. … 6 more files in changeset.
Move atomic protection inside svn_dso_initialize2.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): Add atomic protection, move original code to...

(atomic_init_func): ...here.

(svn_dso_load): Simple call to svn_dso_initialize2.

Wrap svn_dso_initialize2 call with svn_atomic__init_once, this

fixes a crash in the DSO hash code when running the C tests in

parallel.

* subversion/libsvn_subr/dso.c

(atomic_init_func): New.

(svn_dso_load): Use svn_atomic__init_once.

Remove the "checked" option from svn_mutex_t. Update all callers

and remove the regression test.

The reason is that there seems to be no portable way (e.g. via a

series of conversions) to use APR atomic CAS operations with

apr_os_thread_t.

* subversion/include/private/svn_mutex.h

(svn_mutex__init): Remove CHECKED option.

* subversion/include/svn_error_codes.h

(SVN_ERR_RECURSIVE_LOCK): Remove as it has no users anymore.

(SVN_ERR_INVALID_INPUT): Update number.

* subversion/libsvn_subr/mutex.c

(svn_mutex__t): Remove all aux. members that were used for mutex

checking only. Make sure we don't end up with an

empty struct on systems that don't support threads.

(svn_mutex__init,

svn_mutex__lock,

svn_mutex__unlock): Remove all mutex the checking code.

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

(never_reached,

lock_again,

recursive_locking): Remove test case for "checked" mutexes.

(test_funcs): Remove test from list.

* subversion/libsvn_fs_base/bdb/env.c

(bdb_init_cb): Update mutex init call.

* subversion/libsvn_fs_fs/fs.c

(fs_serialized_init): Same.

* subversion/libsvn_fs/fs-loader.c

(synchronized_initialize): Same.

* subversion/libsvn_fs_x/fs.c

(x_serialized_init): Same.

* subversion/libsvn_ra_svn/cyrus_auth.c

(sasl_mutex_alloc_cb_internal,

svn_ra_svn__sasl_common_init): Same.

* subversion/libsvn_subr/cache-inprocess.c

(svn_cache__create_inprocess): Same.

* subversion/libsvn_subr/cache-membuffer.c

(svn_cache__membuffer_cache_create,

svn_cache__create_membuffer_cache): Same.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): Same.

* subversion/libsvn_subr/named_atomic.c

(init_thread_mutex): Same.

* subversion/libsvn_subr/object_pool.c

(svn_object_pool__create): Same.

* subversion/libsvn_subr/root_pools.c

(svn_root_pools__create): Same.

* subversion/libsvn_subr/utf.c

(svn_utf_initialize2): Same.

* subversion/svnserve/logger.c

(logger__create_for_stderr,

logger__create): Same.

* subversion/tests/svn_test_main.c

(svn_test_main): Same.

  1. … 17 more files in changeset.
APR mutexes don't support recursive locking on all platforms.

As a result, trying to take out the same lock twice in the

same thread will cause a lock up under e.g. Linux. This patch

adds an option to svn_mutex__t that detects recursive locking

attempts in most cases and returns a proper error.

The idea is simply to store the thread ID of the lock OWNER

along the actual mutex object. If that matches the current

thread's ID, there is a violation. As the current thread

cannot race with itself and because any other thread uses a

different thread ID, setting and comparing this aux. info can

be done safely.

Also, we may allow for false negatives here since we only try

to detect code sequences that are already illegal in the first

place. We also don't make that check mandatory as access to

thread IDs and their comparison may be somewhat expensive on

some systems - which would impair the futex-like behavior that

we assume in some places like the caches.

A more detailed description has been added to the source code.

A FSFS-based test is added as that has been the origin of the

feature request.

Current users will be updated as follows. FS level locks and

library / module initialization will enable recursion detection.

Potentially runtime critical, internal use disables it.

* subversion/include/svn_error_codes.h

(SVN_ERR_RECURSIVE_LOCK): Define a new error code for invalid

locking schemes.

* subversion/include/private/svn_mutex.h

(svn_mutex__t): Our mutex is now a struct as we add aux.

data to it.

(svn_mutex__init): Add the CHECKED option.

* subversion/libsvn_subr/mutex.c

(svn_mutex__t): Define the mutex structure and and document

the aux. data extensively.

(svn_mutex__init): Update constructor.

(svn_mutex__lock): Optionally, check for recursive locking attempts

and update the associtated aux. data.

(svn_mutex__unlock): Optionally, update the aux. data for recursive

lock detection.

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

(never_reached,

lock_again): Callback functions required by the new test.

(recursive_locking): New test expecting an SVN_ERR_RECURSIVE_LOCK.

(test_funcs): Register the new test.

* subversion/libsvn_fs_base/bdb/env.c

(bdb_init_cb): Initialization code should detect recursions.

* subversion/libsvn_fs/fs-loader.c

(synchronized_initialize): Same.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): Same.

* subversion/libsvn_fs_fs/fs.c

(fs_serialized_init): FS-level locks shall detect recursion do aid

API users.

* subversion/libsvn_fs_x/fs.c

(x_serialized_init): Same.

* subversion/libsvn_ra_svn/cyrus_auth.c

(sasl_mutex_alloc_cb_internal,

svn_ra_svn__sasl_common_init): Internal, potentially tightly used

mutexes shall not suffer the overhead.

* subversion/libsvn_subr/cache-inprocess.c

(svn_cache__create_inprocess): Same.

* subversion/libsvn_subr/cache-membuffer.c

(svn_cache__membuffer_cache_create,

svn_cache__create_membuffer_cache): Same.

* subversion/libsvn_subr/file.c

(init_handle_pool): Same.

* subversion/libsvn_subr/named_atomic.c

(init_thread_mutex): Same.

* subversion/libsvn_subr/object_pool.c

(svn_object_pool__create): Same.

* subversion/libsvn_subr/root_pools.c

(svn_root_pools__create): Same.

* subversion/libsvn_subr/utf.c

(svn_utf_initialize2): Same.

* subversion/svnserve/logger.c

(logger__create_for_stderr,

logger__create): Same.

* subversion/tests/svn_test_main.c

(svn_test_main): For best test coverage, we enable recursion detection

in our test suite main app.

  1. … 18 more files in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

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

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

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

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

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

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

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

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

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

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

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

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

* subversion/tests/svn_test_fs.c

* tools/server-side/fsfs-stats.c

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,

subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

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

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

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

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

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

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

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

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

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

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

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

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

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_subr/xml.c

  1. … 21 more files in changeset.
Use svn_hash_gets/svn_hash_sets, part 1: #include "svn_hash.h" everywhere

that <apr_hash.h> is included. I assume most of those use APR_HASH_KEY_STRING.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/import.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs/fs-loader.c

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

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/conflicts.c

* subversion/mod_dav_svn/deadprops.c

* subversion/mod_dav_svn/merge.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/props.c

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

(svn_hash.h): Add #include.

  1. … 22 more files in changeset.
Slightly changing the semantics of svn_mutex__init(). If the

enable_mutex parameter has been set, the function will try

to enable the the mutex only if SVN is potentially multi-threaded,

i.e. if APR_HAS_THREADS is set.

Thus, the parameter can simply be set to TRUE, if we would

need synchronization in a multi-threaded environment.

* subversion/libsvn_subr/svn_mutex.c

(svn_mutex__init): no-op if APR_HAS_THREADS isn't set

* subversion/include/private/svn_mutex.h

(svn_mutex__init): update docstring

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): adapt caller

* subversion/libsvn_fs_base/bdb/env.c

(bdb_init_cb): ditto

* subversion/libsvn_fs/fs-loader.c

(svn_fs_initialize): ditto

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

(test_inprocess_cache_basic): adapt indirect caller

(test_membuffer_cache_basic): ditto

  1. … 5 more files in changeset.
Fix some more fallout with thread-less APR caused by the svn_mutex merge.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): Don't enable mutexes if APR is thread-less.

Reintegrate svn_mutex branch into /trunk and remove BRANCH-README.
  1. … 14 more files in changeset.
Follow-up to r1148374:

* subversion/libsvn_subr/dso.c

(svn_dso_load): Print error message when SVN_DEBUG_DSO is defined. Also

improve error message.

* notes/knobs: Document SVN_DEBUG_DSO.

  1. … 1 more file in changeset.
Wrap a debug fprintf() call added in r877783 in #if 0 instead of SVN_DEBUG.

Initially added by Arfrever in r877783, it was amended by Julian and

Greg in r879959 and r879960 to use SVN_DBG() instead of fprintf() to

work around test suite failures. It was later flipped back to fprintf()

by Arfrever in r880496 for an unspecified reason.

The error message printed, in my case, was 'File not found' on a single

line, with no context information whatsoever. This is very irritating.

* subversion/libsvn_subr/dso.c

(svn_dso_load): Don't print a confusing error message to stderr.

The message is only useful for people who want to debug the dso loading

code, not everyone compiling debug builds.

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.
* subversion/libsvn_subr/dso.c

(svn_dso_load): Use fprintf() instead of SVN_DBG() to print error message.

Followup to Julian's fix in r39885, and switch to use the SVN_DBG macro.

It brings in all the "standard stuff" for debug output: the DBG prefix,

and the correct output descriptor. The output is also subject to "quiet

mode" thru compilation or an envvar.

* subversion/libsvn_subr/dso.c:

(svn_dso_load): use SVN_DBG, as appropriate.

Adjust the warning messages that are emitted by debug builds on failure to

load a Dynamic Shared Object file (such as the KWallet or Gnome Keyring auth

libs) so that the test suite will ignore them. This is useful when testing

with just one of KWallet or Gnome Keyring because Subversion tries to load

both and we don't care if it can't find one of them.

We could have kept the message going to stderr and made the test suite

ignore debug messages on stderr as well as on stdout, but there is precedent

for such messages to go to stdout.

We probably should make Subversion consistent about whether it tries to load

these libs. It is odd to try loading both (assuming both are listed in the

config option) if built with support for either but not to try if built with

support for neither.

* subversion/libsvn_subr/dso.c

(svn_dso_load): Prefix the warning message with "DBG: " and emit it on

stdout rather than stderr.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): Wrap declaration of 'status' variable in

#if APR_HAS_THREADS, as all code that uses it is also wrapped in it.

Avoids 'unused variable' warning during compilation with non-threaded APR.

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.
When SVN_DEBUG is defined, print error messages containing details about

failures of dynamic loading of libraries performed by apr_dso_load().

* subversion/libsvn_subr/dso.c

(svn_dso_load): Print message retrieved by apr_dso_error().

* subversion/libsvn_subr/dso.c

(svn_dso_initialize): Move deprecated function to ...

* subversion/libsvn_subr/deprecated.c

(svn_dso_initialize): ... this file.

  1. … 1 more file in changeset.
Delete trailing whitespace.

Follow-up to r26317 and r27598.

* build/generator/extractor.py:

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

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

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

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

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

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

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

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

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

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

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

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

* subversion/include/private/svn_auth_private.h:

* subversion/include/private/svn_sqlite.h:

* subversion/include/private/svn_wc_private.h:

* subversion/include/svn_auth.h:

* subversion/include/svn_checksum.h:

* subversion/include/svn_client.h:

* subversion/include/svn_cmdline.h:

* subversion/include/svn_dirent_uri.h:

* subversion/include/svn_path.h:

* subversion/include/svn_props.h:

* subversion/libsvn_client/commit_util.c:

* subversion/libsvn_client/copy.c:

* subversion/libsvn_client/deprecated.c:

* subversion/libsvn_client/export.c:

* subversion/libsvn_client/externals.c:

* subversion/libsvn_client/info.c:

* subversion/libsvn_client/merge.c:

* subversion/libsvn_client/mergeinfo.h:

* subversion/libsvn_client/ra.c:

* subversion/libsvn_client/repos_diff.c:

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

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

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

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

* subversion/libsvn_fs_base/dag.c:

* subversion/libsvn_fs_base/dag.h:

* subversion/libsvn_fs_base/err.h:

* subversion/libsvn_fs_base/fs.c:

* subversion/libsvn_fs_base/reps-strings.c:

* subversion/libsvn_fs_base/tree.c:

* subversion/libsvn_fs_base/tree.h:

* subversion/libsvn_fs_base/util/fs_skels.c:

* subversion/libsvn_fs_fs/dag.h:

* subversion/libsvn_fs_fs/fs_fs.h:

* subversion/libsvn_fs/fs-loader.c:

* subversion/libsvn_fs/fs-loader.h:

* subversion/libsvn_fs_fs/rep-cache.c:

* subversion/libsvn_fs_fs/rep-cache.h:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_ra/compat.c:

* subversion/libsvn_ra_neon/log.c:

* subversion/libsvn_ra_neon/session.c:

* subversion/libsvn_ra_serf/log.c:

* subversion/libsvn_ra_serf/update.c:

* subversion/libsvn_ra_serf/util.c:

* subversion/libsvn_ra_serf/win32_auth_sspi.c:

* subversion/libsvn_repos/hooks.c:

* subversion/libsvn_repos/log.c:

* subversion/libsvn_repos/repos.h:

* subversion/libsvn_subr/checksum.c:

* subversion/libsvn_subr/cmdline.c:

* subversion/libsvn_subr/config_file.c:

* subversion/libsvn_subr/config_win.c:

* subversion/libsvn_subr/dirent_uri.c:

* subversion/libsvn_subr/dso.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/nls.c:

* subversion/libsvn_subr/simple_providers.c:

* subversion/libsvn_subr/sqlite.c:

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c:

* subversion/libsvn_subr/stream.c:

* subversion/libsvn_subr/win32_crypto.c:

* subversion/libsvn_wc/adm_ops.c:

* subversion/libsvn_wc/diff.c:

* subversion/libsvn_wc/props.c:

* subversion/libsvn_wc/status.c:

* subversion/libsvn_wc/tree_conflicts.c:

* subversion/libsvn_wc/tree_conflicts.h:

* subversion/libsvn_wc/update_editor.c:

* subversion/libsvn_wc/wc_db.h:

* subversion/svn/cl.h:

* subversion/svndumpfilter/main.c:

* subversion/svnlook/main.c:

* subversion/svn/propedit-cmd.c:

* subversion/svn/propget-cmd.c:

* subversion/svnserve/main.c:

* subversion/svn/status-cmd.c:

* subversion/svn/tree-conflicts.c:

* subversion/svn/util.c:

* subversion/tests/cmdline/commit_tests.py:

* subversion/tests/cmdline/copy_tests.py:

* subversion/tests/cmdline/info_tests.py:

* subversion/tests/cmdline/log_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/prop_tests.py:

* subversion/tests/cmdline/revert_tests.py:

* subversion/tests/cmdline/stat_tests.py:

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

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

* subversion/tests/cmdline/switch_tests.py:

* subversion/tests/cmdline/tree_conflict_tests.py:

* subversion/tests/cmdline/update_tests.py:

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

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

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

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

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

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

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

  1. … 112 more files in changeset.
Compiler warning cleanups.

* subversion/include/svn_wc.h:

(svn_wc_operation_t): removing trailing comma in enumeration

* subversion/svn/cl.h:

(svn_cl__accept_t): removing trailing comma in enumeration

* subversion/libsvn_subr/sqlite.c:

(svn_sqlite__open): move flags declaration into an inner-block inside

the #ifdef so that compilations against earlier version of SQLite

don't see an unused local variable.

* subversion/libsvn_subr/cache-inprocess.c:

(svn_cache_create_inprocess): remove NULL assignments since the wrapper

structure is created with apr_pcalloc(). the form of the assignment

created weird typing that a strict ISO compilation warned about.

* subversion/libsvn_subr/dso.c:

(svn_dso_initialize, svn_dso_initialize2): add void to declaration.

  1. … 4 more files in changeset.
Bump 'svn_dso_initialize' to 'svn_dso_initialize2' which has a

return type of 'svn_error_t *' with a reason of error.

Fix callers of 'svn_dso_initialize' to make use 'svn_dso_initialize2'

* subversion/include/svn_dso.h

(svn_dso_initialize2): New prototype.

(svn_dso_initialize): Deprecated.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize2): New function.

(svn_dso_initialize): Make use of new 'svn_dso_initialize2' and ignore

error if any.

(svn_dso_load): Make use of 'svn_dso_initialize2' instead of

'svn_dso_initialize'.

* subversion/mod_dav_svn/mod_dav_svn.c

(init_dso):

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_init): Make use of svn_dso_initialize2

instead of 'svn_dso_initialize'.

Suggested by: stsp

blair

  1. … 3 more files in changeset.
Fix 'svn_dso_initialize' which was *silently* failing to create lock

and causing later accessors to fail.

* subversion/libsvn_subr/dso.c

(svn_dso_initialize): When 'apr_thread_mutex_create' is not successful,

abort.

Reviewed by: stsp

Fix several files with svn:eol-style missing.

* subversion/libsvn_subr/constructors.c,

subversion/libsvn_subr/user.c,

subversion/libsvn_subr/atomic.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_client/util.c,

subversion/libsvn_client/compat_providers.c,

subversion/libsvn_client/repos_diff_summarize.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_serf/propfind_buckets.c,

subversion/libsvn_ra_serf/locks.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/getdate.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/replay.c,

subversion/mod_dav_svn/mirror.c,

subversion/mod_dav_svn/reports/replay.c,

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

subversion/libsvn_ra_svn/streams.c,

subversion/libsvn_ra_svn/sasl_auth.c,

subversion/libsvn_ra_svn/simple_auth.c,

subversion/libsvn_delta/debug_editor.c,

subversion/libsvn_ra_dav/replay.c,

subversion/svnserve/sasl_auth.c,

tools/server-side/svnauthz-validate.c,

contrib/server-side/mod_dontdothat/mod_dontdothat.c:

Set the svn:eol-style=native.

  1. … 34 more files in changeset.
Fix compile error when APR_HAS_DSO is not defined (e.g. on RISC OS).

* subversion/include/svn_dso.h

* subversion/libsvn_subr/dso.c

(svn_dso_load): Only declare the function when APR_HAS_DSO is

defined (required because apr_dso_handle_t also won't be

available).

Patch by: Alex Waugh <alex@alexwaugh.com>

(Tweaked by me.)

Review by: rooneg

  1. … 1 more file in changeset.
Follow up to r20996 with some cleanups.

* subversion/include/svn_dso.h

(svn_dso_initialize): Make void argument explicit.

* subversion/libsvn_subr/dso.c

(NOT_THERE): Cast to void * to avoid warnings about comparing different

types of pointers.

  1. … 1 more file in changeset.