Checkout Tools
  • last updated 24 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Update issue tracker links in comments, from Tigris (issuezilla) to Apache (Jira).

URL fragment identifiers like '#desc5' are left in place, not yet updated.

This is a merge of r1828508 from the 'shelve-checkpoint' branch where I

committed it by mistake.

  1. … 43 more files in changeset.
Remove some casts when using APR 2 and fix a "missing volatile" bug that

was uncovered.

* subversion/include/private/svn_dep_compat.h

(svn_atomic_casptr, svn_atomic_xchgptr): New.

* subversion/libsvn_fs/fs-loader.c

(struct fs_type_defn): Add missing volatile to vtable element, change

type to void * to avoid cast (we lose no type safety since we never

access the value as any other type).

(get_library_vtable_direct): Remove explicit cast.

* subversion/libsvn_subr/utf.c

(atomic_swap): Remove explicit cast.

  1. … 2 more files in changeset.
* subversion/libsvn_subr/utf.c

(svn_utf_string_from_utf8,

svn_utf_cstring_from_utf8_string): Reduce scope of variable to get rid of a

warning.

Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

* subversion/bindings/javahl/native/StateReporter.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

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

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

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

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

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

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

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

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

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

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-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_subr/cache-test.c

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

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

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

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

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

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

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

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

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

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

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Rename library private type to match our codestyle.

* subversion/libsvn_subr/win32_xlate.c

* subversion/libsvn_subr/win32_xlate.h

(svn_subr__win32_xlate_t): Rename from win32_xlate_t.

(svn_subr__win32_xlate_open, svn_subr__win32_xlate_to_stringbuf): Update

signature.

* subversion/libsvn_subr/utf.c

(xlate_handle_t): Typedef as svn_subr__win32_xlate_t on Windows.

  1. … 2 more files in changeset.
Refactor code a bit to avoid pointer cast.

* subversion/libsvn_subr/utf.c

(xlate_handle_t): Define local type that holds xlate handle on

different platform: win32_xlate_t on Windows and apr_xlate_t on

other platforms.

(xlate_handle_node_t, xlate_alloc_handle, convert_to_stringbuf): Use

new platform depended xlate_handle_t type instead of apr_xlate_t.

Merge the svn-auth-x509 branch to trunk.

This adds an X.509 parser which we use to display certificates via the auth

command rather than storing the details provided by serf from a connection.

* LICENSE,

NOTICE: Note that the X.509 parser is based on the parser from TropicSSL.

* build.conf

(libsvn_subr): Add svn_x509.h header to msvc-export.

(x509-test, __ALL_TESTS__): Add C tests for X.509 parser.

* subversion/include/private/svn_utf_private.h

(svn_utf__encode_ucs4_string, svn_utf__utf16_to_utf8,

svn_utf__utf32_to_utf8): New functions for converting various Unicode

character encodings needed by the X.509 parser.

* subversion/include/svn_x509.h: New header.

* subversion/include/svn_error_codes.h

(SVN_ERR_X509_CATEGORY_START): New category for errors from X.509 parser.

(SVN_ERR_ASN1_OUT_OF_DATA, SVN_ERR_ASN1_UNEXPECTED_TAG,

SVN_ERR_ASN1_INVALID_LENGTH, SVN_ERR_ASN1_LENGTH_MISMATCH,

SVN_ERR_ASN1_INVALID_DATA, SVN_ERR_X509_FEATURE_UNAVAILABLE,

SVN_ERR_X509_CERT_INVALID_PEM, SVN_ERR_X509_CERT_INVALID_FORMAT,

SVN_ERR_X509_CERT_INVALID_VERSION, SVN_ERR_X509_CERT_INVALID_SERIAL,

SVN_ERR_X509_CERT_INVALID_ALG, SVN_ERR_X509_CERT_INVALID_NAME,

SVN_ERR_X509_CERT_INVALID_DATE, SVN_ERR_X509_CERT_INVALID_PUBKEY,

SVN_ERR_X509_CERT_INVALID_SIGNATURE, SVN_ERR_X509_CERT_INVALID_EXTENSIONS,

SVN_ERR_X509_CERT_UNKNOWN_VERSION, SVN_ERR_X509_CERT_UNKNOWN_PK_ALG,

SVN_ERR_X509_CERT_SIG_MISMATCH, SVN_ERR_X509_CERT_VERIFY_FAILED):

New error codes.

* subversion/include/svn_config.h

(SVN_CONFIG_AUTHN_HOSTNAME_KEY, SVN_CONFIG_AUTHN_FINGERPRINT_KEY,

SVN_CONFIG_AUTHN_VALID_FROM_KEY, SVN_CONFIG_AUTHN_VALID_UNTIL_KEY,

SVN_CONFIG_AUTHN_ISSUER_DN_KEY): Remove constants used as keys for

storing parsed certificate info in authn files.

* subversion/libsvn_subr/x509parse.c,

subversion/libsvn_subr/x509info.c,

subversion/include/x509.h: New files for implementing the X.509 parser.

* subversion/libsvn_subr/ssl_server_trust_providers.c

(ssl_server_trust_file_first_credentials,

ssl_server_trust_file_save_credentials): Don't store/retrive parsed

details of X.509 certificates.

* subversion/libsvn_subr/utf.c

(membuf_insert_ucs4, svn_utf__utf16_to_utf8, svn_utf__utf32_to_utf8):

New functions to implement Unicode conversions.

* subversion/libsvn_subr/utf8proc.c

(encode_ucs4_string): Convert to the private function ...

(svn_utf__encode_ucs4_string): New function.

(svn_utf__glob): Update caller.

* subversion/svn/auth-cmd.c

(match_credential): Remove code to match the hostname/fingerprint since

the data isn't stored.

(show_cert): New function to drive the X.509 parser and then display

the certificate to the user.

(list_credential): Use show_cert().

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

(test_utf_conversions, test_funcs): Add tests for new unicode character

set conversions.

* subversion/tests/libsvn_subr/x509-test.c: Add tests for X.509 parser.

[in subverison/bindings/javahl]

* native/jniwrapper/jni_base.cpp,

native/jniwrapper/jni_exception.hpp:

Add IllegalArgumentException exeption.

* native/AuthnCallback.cpp,

native/AuthnCallback.hpp,

src/org/apache/subversion/javahl/callback/AuthnCallback.java:

(AuthnCallback::SSLServerCertInfo): Update the getters and constructor to

reflect the info available from the X.509 parser.

* native/org_apache_subversion_javahl_util_ConfigLib.cpp

(build_credential): Update to feed AuthnCallback::SSLServerCertInfo the info

that is available.

(Java_org_apache_subversion_javahl_util_ConfigLib_nativeSearchCredentials):

Update the searching of the certificates to parse the certificate rather

than depending on the stored data.

* src/org/apache/subversion/javahl/SVNUtil.java

(SVNUtil.searchCredentials): Update hostnamePattern documentation.

* native/Promper.cpp

(Prompter::dispatch_ssl_server_trust_prompt): Update to reflect changes

to SSLServerCertInfo.

* src/org/apache/subversion/javahl/util/ConfigLib.java: Remove some commented

out code.

* tests/org/apache/subversion/javahl/UtilTests.java

(util_cred_ssl_server, testCredentials): Update tests as needed.

  1. … 29 more files in changeset.
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.
Remove more compatability code for pre-1.3.x APR.

* subversion/include/private/svn_atomic.h

(svn_atomic_t, svn_atomic_read, svn_atomic_set, svn_atomic_int,

svn_atomic_dec, svn_atomic_cas): Assume the 32 bit versions of APR atomic

functions are available.

* subversion/libsvn_ra_serf/commit.c

(create_put_body): Always use apr_file_buffer_set().

* subversion/libsvn_ra_serf/update.c

(body_done_fn): Always use apr_file_buffer_set().

* subversion/libsvn_subr/hash.c

(svn_hash__clear): Remove the now unused function.

* subversion/libsvn_subr/io.c

(svn_io_file_aligned_seek): Assume apr_file_buffer_set() is always available.

* subversion/libsvn_subr/utf.c

(atomic_swap): Assume apr_atomic_xchangptr() is always available.

* subversion/svnserve/svnserve.c

(HAVE_THREADPOOLS): Remove, we always have thread pools if we have threads.

(THREAD_ERROR_MSG): Remove

(serve_thread): Remove implementation that doesn't know about thread pools.

(sub_main): Remove now unused tattr and tid local variables, assume we have

thread pools if we have threads.

(main): Assume we have thread pools if we have threads.

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

(aligned_seek): Remove compat code for old versions of APR that were limited

to 4k blocks.

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

(get_content): Assume we can always use large read buffers.

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

in variable argument lists. This avoids the ugliness of writing

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

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

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

subversion/include/svn_path.h (svn_path_join_many),

subversion/include/svn_xml.h (svn_xml_make_open_tag):

Update docstrings, mentioning SVN_VA_NULL as the argument list terminator.

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

function calls with variable argument lists.

  1. … 89 more files in changeset.
Add an optional prefix parameter to the Windows-specific UTF-8 <-> UTF-16

conversion functions.

* subversion/include/private/svn_utf_private.h

(svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8):

Added prefix argument and updated docstrings.

* subversion/libsvn_subr/utf.c

(svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8):

Implemented prefix handling.

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

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/config_win.c,

subversion/libsvn_subr/nls.c: Updated all callers.

  1. … 5 more files in changeset.
Move the new Win32-specific UTF-8 <-> UTF-16 conversion functions

to the svn_utf namespace.

* subversion/include/private/svn_subr_private.h

(svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):

Move prototypes from here to ...

* subversion/include/private/svn_utf_private.h

(svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8): ... here.

* subversion/libsvn_subr/win32_xlate.c

(svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):

Move implementation from here to ...

* subversion/libsvn_subr/utf.c

(svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8): ... here.

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

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/config_win.c,

subversion/libsvn_subr/nls.c: Update uses.

Include svn_utf_private.h instead of svn_subr_private.h for

svn_utf__win32_utf8_to_utf16 and svn_utf__win32_utf16_to_utf8.

  1. … 7 more files in changeset.
Move deprecated utf function to deprecated.c

* subversion/libsvn_subr/deprecated.c

(svn_utf_cstring_from_utf8_ex): Move function here..

* subversion/libsvn_subr/utf.c

(svn_utf_cstring_from_utf8_ex): ... that used to be here.

  1. … 1 more file in changeset.
Reimplement UTF-8 fuzzy conversion using the tools provided by utf8proc.

While the new implementation is slower and uses more memory than the

original, it also gives somewhat better results (in the author's opinion).

Since fuzzy escaping is only used as a last resort to generate error

messages, the extra cost should not be a problem.

* subversion/include/private/svn_utf_private.h

(svn_utf__fuzzy_escape): Declare new private function.

* subversion/libsvn_subr/utf8proc.c

(svn_utf__utf8proc_version): utf8proc_codepoint_valid is no longer unused.

(unicode_decomposition): New; common driver for utf8proc_decompose.

(decompose_normalized): Reimplement using unicode_decomposition.

(svn_utf__fuzzy_escape): Implement.

* subversion/libsvn_subr/utf.c (fuzzy_escape): Removed.

(convert_to_stringbuf, svn_utf__cstring_from_utf8_fuzzy):

Use svn_utf__fuzzy_escape.

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

(test_utf_fuzzy_escape): New test case for svn_utf__fuzzy_escape.

(test_funcs): Add test_utf_fuzzy_escape.

* subversion/tests/cmdline/merge_tests.py

(simple_property_merges): Adjust expected output.

* subversion/tests/cmdline/svnadmin_tests.py

(verify_non_utf8_paths): Likewise.

  1. … 5 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.
* subversion/libsvn_subr/utf.c

(xlate_alloc_handle): Fix typo in error message.

Found by: philip

* subversion/libsvn_subr/utf.c

(xlate_alloc_handle): Simplify the error handling.

Patch by: rhuijben

svn_utf_*: Improve error handling.

This follows up to r1503048 (which reverted r1503030,r1503032) by

reimplementing those two revisions in the correct layer.

Suggested by: rhuijben

* subversion/libsvn_subr/utf.c

(xlate_alloc_handle): Prefix the name of the library generating the error to

the error message. Also wrap the generic error code (APR_EINVAL,

APR_ENOTIMPL, APR_EGENERAL) by a Subversion one (which is not used elsewhere

in trunk).

svn_utf_*: Improve error handling.

This is part of a patch I posted recently. The remaining part --- handling

APR_EINVAL and APR_ENOTIMPL as fatal errors --- may be committed separately

(for ease of backporting).

* subversion/libsvn_subr/utf.c

(xlate_alloc_handle): Tweak the error handling so that apr_strerror() of the

error code is included in the error chain, in addition to the custom error

added here. The previous code would report error codes such as E70023

(although not that particular error which is caught and ignored) but mere

mortals aren't supposed to know what errno error that maps to. The new

code would, if the error was not ignored, report:

svn: E200001: Can't create a character converter from native encoding to 'UTF-8'

svn: E070023: This function has not been implemented on this platform

Swap the argument order of svn_utf_initialize2() in its definition and all its

callers to follow our standard ordering rules.

* subversion/include/svn_utf.h

(svn_utf_initialize2): Reorder arguments.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_init): Update caller.

* subversion/libsvn_subr/deprecated.c

(svn_utf_initialize): Update caller.

* subversion/libsvn_subr/utf.c

(svn_utf_initialize2): Update argument order.

* subversion/mod_dav_svn/mod_dav_svn.c

(init): Update caller.

  1. … 4 more files in changeset.
* **/**

Run tools/dev/remove-trailing-whitespace.sh to remove all trailing whitespace

before we branch 1.8, like we did before creating previous branches.

No functional changes.

  1. … 199 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.
Followup to r1399462: don't leak other errors either.

Found by: rhuijben

* subversion/libsvn_subr/utf.c

(svn_utf_stringbuf_from_utf8, svn_utf_string_from_utf8,

svn_utf_cstring_from_utf8, svn_utf_cstring_from_utf8_ex2,

svn_utf_cstring_from_utf8_string):

Use svn_error_compose_create() where due.

* everywhere: Add missing SVN_ERR() wraps.

(This is a semiautomated commit: I added 'warn_unused_result' attributes,

compiled, then used a macro to add the SVN_ERR() wraps.)

  1. … 12 more files in changeset.
Minor UTF conversion optimization: use the most suitable

variant of the UTF-8 checking functions.

* subversion/libsvn_subr/utf.c

(svn_utf_cstring_from_utf8,

svn_utf_cstring_from_utf8_ex2): call the cstring variants

and let them determine the string length as they go

Purge trailing whitespace, in the spirit of r1138109.

  1. … 97 more files in changeset.
For issue #2487, "mod_dav_svn and locales fail to play nicely together",

add a new configuration option which allows Subversion libraries called

from mod_dav_svn to process UTF-8 strings, instead of just ASCII strings.

Because httpd is not locale-aware, we cannot assume that a native character

set other than ASCII is present in the environment that mod_dav_svn runs in.

UTF-8 is backward compatible to ASCII, and all paths within Subversion

repositories are already encoded in UTF-8. Thus, we can safely allow UTF-8

without running into character set conversion issues in code called from

mod_dav_svn.

Basic testing shows that httpd is prepared to tolerate non-ASCII characters,

even though it doesn't seem to interpret them. E.g. it logs such characters

as hex codes preceded by a backslash.

The new configuration option is called SVNUseUTF8 and can be set to

"On" or "Off" (the default is "Off"). It is a global option that takes

effect for all repository locations defined in the configuration file.

When the option is "On", files that contain UTF-8 characters in their

names can be processed by the pre-lock hook, hooks are able to write

UTF-8 characters to stdout and stderr, and filesystem paths to Subversion

repositories may contain UTF-8 characters.

* subversion/mod_dav_svn/mod_dav_svn.c

(server_conf_t): Add use_utf8 boolean.

(init): Initialise the native character set of Subversion's UTF-8

conversion routines to either ASCII (default) or UTF-8.

(SVNUseUTF8_cmd): New option command processor.

(cmds): Add new "SVNUseUTF8" option.

* subversion/include/svn_utf.h

(svn_utf_initialize2): Declare. Includes the ablity to force the native

character set to UTF-8, regardless of locale.

(svn_utf_initialize): Deprecate.

* subversion/libsvn_subr/deprecated.c

(svn_utf_initialize): Re-implement as wrapper around svn_utf_initialize2().

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_init): Update funtion call to svn_utf_initialize2(), keeping

the native character set based on the current locale.

* subversion/libsvn_subr/utf.c

(svn_utf_initialize2): New.

(assume_native_charset_is_utf8): New global boolean variable. Defaults

to FALSE, and may be set to TRUE by svn_utf_initialize2() (which, like

its predecessor, is documented to not be thread-safe).

(get_ntou_xlate_handle_node, get_uton_xlate_handle_node): If the native

character set has been forced to UTF-8, use SVN_APR_UTF8_CHARSET instead

of SVN_APR_LOCALE_CHARSET.

  1. … 4 more files in changeset.
Remove unreferenced and intialized but unreferenced variables.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_verify):

* subversion/libsvn_subr/cache-membuffer.c

(membuffer_cache_set,

membuffer_cache_set_partial):

* subversion/libsvn_subr/utf.c

(svn_utf_initialize,

get_xlate_handle_node,

put_xlate_handle_node,

svn_utf_stringbuf_to_utf8):

Like it says at the top.

  1. … 2 more files in changeset.