Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Introduce the svn_cstring_join2() API that allows selecting if the

trailing separator is required in the joined string.

Previously, svn_cstring_join() has been always appending the trailing

separator, and that required us to sometimes manually strip that final

separator from the result.

* subversion/include/svn_string.h

(svn_cstring_join2): New, revved from ...

(svn_cstring_join): ...this function, which is now deprecated.

* subversion/libsvn_subr/string.c

(svn_cstring_join2): New, supports the new 'trailing_separator' argument.

(svn_cstring_join): Move ...

* subversion/libsvn_subr/deprecated.c

(svn_cstring_join): ...here and call svn_cstring_join2() with the

'trailing_separator' set to true, to match the original behavior.

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

(test_cstring_join): New test.

(test_funcs): Add new test.

* subversion/libsvn_repos/hooks.c

(svn_repos__hooks_start_commit): Use svn_cstring_join2() without

the trailing separator, instead of manually stripping it from the

resulting string.

(svn_repos__hooks_post_lock, svn_repos__hooks_post_unlock):

Switch to svn_cstring_join2(), request the trailing separator as

before.

* tools/dev/svnmover/svnmover.c

(execute): Switch to svn_cstring_join2(), request the trailing separator

as before.

  1. … 5 more files in changeset.
Merging branches/authzperf to /trunk and remove BRANCH-README.
  1. … 35 more files in changeset.
Save few cycles in svn_stringbuf_set().

* subversion/libsvn_subr/string.c

(svn_stringbuf_set): Do not use svn_stringbuf_ensure() because it will

preserve existing stringbuf content if any. Use membuf_ensure() directly.

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

(test_stringbuf_set): Add simple tests for svn_stringbuf_set().

(test_funcs): Add test.

  1. … 1 more file in changeset.
Follow-up to r1612823: Rename test_string_skip_prefix() to

test_cstring_skip_prefix() since it tests svn_cstring_skip_prefix().

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

(test_string_skip_prefix): Rename to test_cstring_skip_prefix().

(test_funcs): Update reference to test_cstring_skip_prefix.

Fix the overflow / truncating handling handling of svn_stringbuf_remove

and svn_stringbuf_replace. The API allows for deleted region to extend

beyond the current string; APR_SIZE_MAX in particular is a valid length

for the region to remove.

Note that all calls within our code use properly limited calls to these

functions, so they never may cause overflows. 3rd party callers might

be affected, though.

* subversion/libsvn_subr/string.c

(svn_stringbuf_remove,

svn_stringbuf_replace): Correct the removal length limiting code.

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

(test_stringbuf_remove,

test_stringbuf_replace): Add test cases for the fixed conditions.

  1. … 1 more file in changeset.
Merged the svn-info-detail branch to trunk.

This implements the --show-detail option for the 'svn info' command.

* subversion/svn/cl.h

(svn_cl__opt_state_t): New option show_item.

(svn_cl__simcheck_context_t): New forward-declared struct.

(svn_cl__simcheck_t): New structure.

(svn_cl__similarity_check): New client-local function.

* subversion/svn/info-cmd.c

(relative_url): New; constructs a relative URL.

(info_item_t): New enumeration.

(info_item_map_t): New struct.

(info_item_map): Static array of known keywords for --show-item.

(info_item_map_len): New.

(print_info_baton_t): New; baton for the various print_info functions.

Replaces the former use of just the path_prefix string as the baton.

(find_print_what): New; converts the --show-item argument to its

equivalent info_item_t enumeration value.

(print_info_xml, print_info): Call relative_url instead of

maintaining the same logic in two places.

Adjust to match the new baton type.

(print_info_item): New handler for 'svn info --show-item'.

(svn_cl__info): Initialize the receiver baton and handle the

--show-item and --no-newline options, including checking valid

option combinatinos. Change the texts of the parsing-error messages

to show the complete offending option names.

* subversion/include/private/svn_string_private.h

(SVN_STRING__SIM_RANGE_MAX): New; parametrized the similarity range.

(svn_cstring__similarity): Update docstring and adjust return type.

(svn_string__similarity): Adjust return type.

* subversion/libsvn_subr/string.c

(svn_cstring__similarity): Adjust return type.

(svn_string__similarity): Adjust return type. Change the result range.

* subversion/svn/props.c

(simprop_context_t, simprop_t): Removed in favour of the new

svn_cl__simcheck_context_t and svn_cl__simcheck_t.

(simprop_key_diff, simprop_compare): Moved to similarity.c.

(svn_cl__check_svn_prop_name): Use the new similarity check API.

* subversion/svn/similarity.c: New file.

(svn_cl__simcheck_context_t): Defined here.

(simcheck_key_diff): Replaces simprop_key_diff from props.c.

(simcheck_compare): Replaces simprop_compare from props.c.

(svn_cl__similarity_check): Implement.

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

(test_string_similarity): Adjust test case to account for the

changed range of the result of svn_string__similarity.

* subversion/tests/cmdline/info_tests.py

(info_item_simple,

info_item_simple_multiple,

info_item_url,

info_item_uncommmitted,

info_item_failures): New test cases.

(test_list): Updated.

  1. … 9 more files in changeset.
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.
Fix stringbuf insertion and replacement for the case that the source is

within the target string itself and contains NUL chars. Also, make the

test cases cover data containing NUL for those operations.

* subversion/libsvn_subr/string.c

(svn_stringbuf_insert,

svn_stringbuf_replace): Since the source data is binary, we need a binary

temp. copy - not a string-y one.

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

(test_stringbuf_insert,

test_stringbuf_replace): Add calls that insert strings containing NUL

and insert NULs from within the string.

Found by: julianfoad

  1. … 1 more file in changeset.
Implement svn_cstring_skip_prefix().

* subversion/libsvn_subr/string.c

* subversion/include/svn_string.h

(svn_cstring_skip_prefix): New.

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

(test_string_skip_prefix): New test for svn_cstring_skip_prefix().

(test_funcs): Add test_string_skip_prefix test.

  1. … 2 more files in changeset.
More constant definition cleanup in our test code.

* subversion/tests/libsvn_fs_x/string-table-test.c

(large_string_table_body,

many_strings_table_body): Use APR macros to define 64 bit constants.

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

(test_uint_stream): Same. Also use APR constants of min/max values.

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

(test24,

test_base36): Ditto.

  1. … 2 more files in changeset.
Make the C tests work with the --enable-optimize configure option.

Because the main() function used to be defined in libsvn_test,

the -flto option (which performs rather aggressive link-time

optimizations) would cause the linker to remove all "unreferenced"

static functions ... which includes all the actual tests.

Which this change, main() is now defined in each test driver.

* subversion/tests/svn_test.h

(test_funcs, svn_test_max_threads): Remove external declarations.

(svn_test_main): New prototype for the (existing-but-renamed) test driver.

(SVN_TEST_MAIN): Bolierplate macro that generates a main() implementation.

* subversion/tests/svn_test_main.c

(svn_test_main): Renamed from 'main', and takes two extra parameters,

'max_threads' and 'test_funcs'. Propagates test_funcs to get_array_size,

do_test_num and do_tests_concurrently.

(get_array_size, do_test_num,

test_params_t, test_thread, do_tests_concurrently): Require a test_funcs

parameter. All uses updated.

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

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

subversion/tests/libsvn_delta/random-test.c,

subversion/tests/libsvn_delta/window-test.c,

subversion/tests/libsvn_diff/diff-diff3-test.c,

subversion/tests/libsvn_diff/parse-diff-test.c,

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

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

subversion/tests/libsvn_fs_base/

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

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

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

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

subversion/tests/libsvn_fs_x/fs-x-pack-test.c,

subversion/tests/libsvn_fs_x/string-table-test.c,

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

subversion/tests/libsvn_ra_local/ra-local-test.c,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

subversion/tests/libsvn_subr/prefix-string-test.c,

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

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

subversion/tests/libsvn_subr/root-pools-test.c,

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

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

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

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

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

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

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

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

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

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

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

subversion/tests/libsvn_wc/entries-compat.c,

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

subversion/tests/libsvn_wc/pristine-store-test.c,

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

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

(max_threads): Renamed from svn_test_max_threads and made static.

(test_funcs): Made static.

(SVN_TEST_MAIN): Expanded boilerplate main() function.

  1. … 54 more files in changeset.
Fix some typos.

* CHANGES:

* contrib/cgi/mirror_dir_through_svn.cgi:

* contrib/client-side/emacs/psvn.el:

* contrib/client-side/svn2cl/svn2cl.xsl:

* contrib/hook-scripts/remove-zombie-locks.py:

* contrib/hook-scripts/syntax-check.sh:

* contrib/server-side/svnstsw/configure.ac:

* notes/assurance.txt:

* notes/fs-improvements.txt:

* notes/knobs:

* notes/merge-tracking/func-spec.html:

* notes/merge-tracking/summit-survey.html:

* notes/wc-ng/design:

* notes/wc-ng/locking:

* notes/wc-ng/nodes:

* subversion/bindings/ctypes-python/csvn/core/__init__.py:

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

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java:

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

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

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

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

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

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java:

* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java:

* subversion/bindings/swig/include/proxy_apr.swg:

* subversion/bindings/swig/perl/native/Client.pm:

* subversion/bindings/swig/perl/native/t/3client.t:

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

* subversion/include/private/svn_diff_tree.h:

* subversion/include/private/svn_io_private.h:

* subversion/include/private/svn_ra_svn_private.h:

* subversion/include/private/svn_string_private.h:

* subversion/include/svn_io.h:

* subversion/include/svn_iter.h:

* subversion/include/svn_props.h:

* subversion/libsvn_client/copy_foreign.c:

* subversion/libsvn_client/diff.c:

* subversion/libsvn_client/merge.c:

* subversion/libsvn_delta/xdelta.c:

* subversion/libsvn_diff/diff4.c:

* subversion/libsvn_diff/util.c:

* subversion/libsvn_fs/editor.c:

* subversion/libsvn_fs_fs/index.c:

* subversion/libsvn_fs_fs/temp_serializer.c:

* subversion/libsvn_fs_fs/temp_serializer.h:

* subversion/libsvn_fs_fs/transaction.c:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_fs_x/fs.h:

* subversion/libsvn_fs_x/index.c:

* subversion/libsvn_fs_x/reps.c:

* subversion/libsvn_fs_x/temp_serializer.c:

* subversion/libsvn_fs_x/temp_serializer.h:

* subversion/libsvn_fs_x/transaction.c:

* subversion/libsvn_fs_x/tree.c:

* subversion/libsvn_ra_serf/README:

* subversion/libsvn_ra_svn/protocol:

* subversion/libsvn_repos/dump.c:

* subversion/libsvn_repos/hooks.c:

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

* subversion/libsvn_subr/dirent_uri.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/opt.c:

* subversion/libsvn_subr/string.c:

* subversion/libsvn_subr/subst.c:

* subversion/libsvn_wc/entries.c:

* subversion/libsvn_wc/externals.c:

* subversion/libsvn_wc/lock.c:

* subversion/libsvn_wc/update_editor.c:

* subversion/svn/file-merge.c:

* subversion/svn/status-cmd.c:

* subversion/svnlook/svnlook.c:

* subversion/svnrdump/load_editor.c:

* subversion/svnserve/svnserve.c:

* subversion/tests/cmdline/commit_tests.py:

* subversion/tests/cmdline/diff_tests.py:

* subversion/tests/cmdline/merge_reintegrate_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/revert_tests.py:

* subversion/tests/cmdline/svnauthz_tests.py:

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

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

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

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

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

* subversion/tests/libsvn_wc/db-test.c:

* subversion/tests/svn_test_main.c:

* tools/dev/trails.py: Fix some typos.

Patch by: Veres Lajos <vlajos{_AT_}gmail.com>

(I removed some changes that were wrong or can't be made due to API breakage)

  1. … 90 more files in changeset.
Fix accidentally-global variables.

[ Changes to libsvn_subr and named_atomic-test-common.h reverted in r1571500 ]

* configure.ac

(CMAINTAINERFLAGS): Add -Wmissing-variable-declarations.

* subversion/libsvn_fs_fs/hotcopy.c

(hotcopy_body_baton):

* subversion/libsvn_fs_x/hotcopy.c

(hotcopy_body_baton):

* subversion/libsvn_repos/hooks.c

(parse_hooks_env_option_baton, parse_hooks_env_section_baton):

* subversion/libsvn_wc/wc_db.c

(struct op_delete_many_baton_t):

* subversion/svn/file-merge.c

(struct file_merge_baton):

Remove accidental declaration of global variables.

* subversion/libsvn_subr/ctype.c

(svn_ctype_table_internal):

* subversion/svndumpfilter/svndumpfilter.c

(filtering_vtable):

* subversion/svnserve/svnserve.c

(connection_pools, threads):

* subversion/tests/libsvn_fs_x/string-table-test.c

(basic_strings):

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

(proplist, new_proplist, review):

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

(test_file_definitions_template):

* subversion/tests/libsvn_subr/named_atomic-test-common.h

(name_namespace, name_namespace1, name_namespace2):

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

(sub_records, test_data_:

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

(test_cases):

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

(numbers, expected_modified):

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

(phrase_1, phrase_2):

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

(test_timestamp, test_timestring, test_old_timestring):

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

(base_origin_subtests):

* subversion/tests/svn_test_main.c

(mode_filter):

Make these variables file-static.

* subversion/tests/svn_test_main.c

(test_argc, test_argv):

* tools/server-side/mod_dontdothat/mod_dontdothat.c

(dontdothat_module):

Make these variables truly global by also declaring them extern.

  1. … 21 more files in changeset.
Add "--parallel" option to our C tests.

Besides shaving off a few seconds off our total test execution time,

parallel execution also stresses our code and the tests themselves

harder. It uncovers things like improperly separated working sets

that make post-failure analysis harder.

Parallel mode is only available with APR 1.3+ and threads enabled.

The option will simply be ignored in other configurations. Further

limitations are cleanups being delayed to after all tests completed

and segfaults not being intercepted.

Some tests can't be executed in parallel. Therefore, we introduce

svn_test_max_threads a simple upper limit to the number of threads

supported that each test must define alongside the test_funcs array.

This patch sets it to "1" in many cases because the tests are so

small that multi-threaded execution is simply not worth it.

* build/run_tests.py

(TestHarness._run_c_test): Pass --parallel option to the individual

test applications.

* subversion/tests/svn_test.h

(svn_test_max_threads): Declare new external setting to be set by

every test application.

* subversion/tests/svn_test_main.c

(parallel): New command line option presence flag.

(parallel_opt,

cl_options): Declare the new "--parallel" option.

(svn_test_add_dir_cleanup): Synchronize shared pool access since

this might be called from multiple

threads at the same time.

(log_results): Result logger function factored out from do_test_num

to be shared between serialized and parallel test

execution code.

(do_test_num): Use that new function.

(test_params_t,

test_thread,

do_tests_concurrently): Threads, their parameter and the thread

starter for thread-pooled test execution.

(main): Handle the new option.

Call concurrent execution when in PARALLEL mode.

* subversion/tests/libsvn_delta/random-test.c

subversion/tests/libsvn_subr/named_atomic-test.c

(svn_test_max_threads): These tests don't support concurrent execution.

* subversion/tests/libsvn_delta/random-test.c

subversion/tests/libsvn_delta/window-test.c

subversion/tests/libsvn_diff/parse-diff-test.c

subversion/tests/libsvn_ra_local/ra-local-test.c

subversion/tests/libsvn_ra/ra-test.c

subversion/tests/libsvn_subr/auth-test.c

subversion/tests/libsvn_subr/cache-test.c

subversion/tests/libsvn_subr/checksum-test.c

subversion/tests/libsvn_subr/compat-test.c

subversion/tests/libsvn_subr/config-test.c

subversion/tests/libsvn_subr/crypto-test.c

subversion/tests/libsvn_subr/dirent_uri-test.c

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

subversion/tests/libsvn_subr/error-test.c

subversion/tests/libsvn_subr/hashdump-test.c

subversion/tests/libsvn_subr/mergeinfo-test.c

subversion/tests/libsvn_subr/named_atomic-test.c

subversion/tests/libsvn_subr/opt-test.c

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

subversion/tests/libsvn_subr/path-test.c

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

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

subversion/tests/libsvn_subr/revision-test.c

subversion/tests/libsvn_subr/root-pools-test.c

subversion/tests/libsvn_subr/skel-test.c

subversion/tests/libsvn_subr/spillbuf-test.c

subversion/tests/libsvn_subr/sqlite-test.c

subversion/tests/libsvn_subr/stream-test.c

subversion/tests/libsvn_subr/string-test.c

subversion/tests/libsvn_subr/subst_translate-test.c

subversion/tests/libsvn_subr/time-test.c

subversion/tests/libsvn_subr/utf-test.c

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

subversion/tests/libsvn_wc/wc-queries-test.c:

(svn_test_max_threads): These are too small to benefit from multi-threading.

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

subversion/tests/libsvn_diff/diff-diff3-test.c

subversion/tests/libsvn_fs_base/changes-test.c

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

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

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

subversion/tests/libsvn_fs/fs-test.c

subversion/tests/libsvn_fs/locks-test.c

subversion/tests/libsvn_fs_x/fs-x-pack-test.c

subversion/tests/libsvn_fs_x/string-table-test.c

subversion/tests/libsvn_repos/repos-test.c

subversion/tests/libsvn_subr/io-test.c

subversion/tests/libsvn_subr/translate-test.c

subversion/tests/libsvn_wc/db-test.c

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

subversion/tests/libsvn_wc/wc-test.c

(svn_test_max_threads): Set concurrency limit to whatever various test

runs suggested as the most efficient value.

* subversion/tests/libsvn_wc/entries-compat.c

subversion/tests/libsvn_wc/pristine-store-test.c

(svn_test_max_threads): Set concurrency limit to "unbounded".

  1. … 54 more files in changeset.
Eliminate shared global variables (not constants) in our C tests by

simply declaring them locally in each tests that needs them.

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

(a, b, c): drop these global variables

(test1,

test2,

test3,

test4,

test5,

test6,

test7,

test8,

test9,

test_find_char_backward,

test13,

test14,

test15,

test16,

test17,

test_first_non_whitespace,

test21,

test_stringbuf_unequal,

test_stringbuf_insert,

test_stringbuf_remove,

test_stringbuf_replace): declare variables locally

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

(info1, info2): drop these global variables

(test_parse_combine_rangeinfo,

test_parse_broken_mergeinfo,,

test_mergeinfo_intersect,

test_merge_mergeinfo,

test_rangelist_to_string,

test_mergeinfo_to_string): declare variables locally

  1. … 1 more file in changeset.
Fix compiler warning.

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

(test_string_similarity): Use correct data type.

Fix the out-of-bounds memory access in test_string_matching_test. Follow-up

to r1505336.

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

(test_string_matching): Correctly initialize the 'max_match' value to avoid

out-of-bounds memory access.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>

Add a test for svn_cstring_*_match_length.

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

(test_string_matching): new test case

(test_funcs): register test

Add a test case for base36 string conversion.

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

(test24): remove line that accidentally got copied from test23

(sub_test_base36): new two-way conversion test

(test_base36): test the conversion with a few different values

(test_funcs): register the new test

* **/**

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.
Coding style patch: in logical expressions, instead of comparing

with arithmetic constants use boolean operations. I.e. replace

<expr> == TRUE with <expr> and

<expr> == FALSE with !<expr>

* subversion/libsvn_delta/svndiff.c

(send_simple_insertion_window,

window_handler): change condition style

* subversion/libsvn_fs_base/fs.c

(svn_fs_base__clean_logs): ditto

* subversion/libsvn_fs_fs/fs_fs.c

(representation_string,

create_rep_state_body,

build_rep_list): ditto

* subversion/libsvn_ra_serf/locks.c

(handle_lock): ditto

* subversion/libsvn_ra_serf/property.c

(create_propfind_body): same here,

* subversion/libsvn_ra_serf/update.c

(cancel_fetch,

handle_fetch,

end_report,

finish_report): here,

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__handle_xml_parser): here,

* subversion/libsvn_ra_svn/client.c

(optbool_to_tristate): here,

* subversion/libsvn_repos/authz.c

(authz_parse_section): and here.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__validate_prop): here as well

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_create_auth_baton): and here

* subversion/libsvn_subr/deprecated.c

(print_command_info): here

* subversion/libsvn_subr/opt.c

(print_command_info2): more of the same

* subversion/libsvn_subr/subst.c

(translate_chunk): ditto

* subversion/libsvn_subr/win32_crashrpt.c

(write_var_values,

svn__unhandled_exception_filter): ditto

* subversion/svn/svn.c

(sub_main): ditto

* subversion/svnsync/svnsync.c

(filter_props): and more of the

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

(test_readonly): same thing

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

(test21): ditto

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

(test_svn_subst_translate_string2_null_encode): here

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

(test_getting_info,

test_working_info): and here

* tools/client-side/svn-bench/svn-bench.c

(sub_main): and finally here

  1. … 21 more files in changeset.
* subversion/test/libsvn_subr/string-test.c

(test_string_similarity): Fix printf format.

Groundwork for issue #4261. Add svn_string_t based similarity scorer.

* subversion/include/private/svn_string_private.h

(svn_string__similarity): New prototype.

* subversion/libsvn_subr/string.c

(svn_string__similarity): Rename from svn_cstring__similarity.

Fix suffix scanner to not rely on NUL-termination.

(svn_cstring__similarity): Reimplement as wrapper of svn_string__similarity.

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

(test_string_similarity): Add test for sized, non-NUL-terminated case.

  1. … 2 more files in changeset.
Groundwork for issue #4261. Utility for calculating string similarity.

* subversion/include/private/svn_string_private.h

(svn_cstring__similarity): New prototype.

* subversion/libsvn_subr/string.c

(svn_cstring__similarity): Implement.

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

(test_string_similarity): New test case.

(test_funcs): Register test_string_similarity.

  1. … 2 more files in changeset.
Add stringbuf functions for insertion, removal and replacement of substrings.

* subversion/libsvn_subr/string.c

(svn_stringbuf_insert,

svn_stringbuf_remove,

svn_stringbuf_replace): implement new API

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

(expect_stringbuf_equal): new utility function

(test_stringbuf_insert,

test_stringbuf_remove,

test_stringbuf_replace): new tests

(test_funcs): register them

  1. … 1 more file in changeset.
Fix assignment / conversion warnings by using suitable types.

* libsvn_fs_fs/fs_fs.c

(get_contents): offset calculation is done using apr_off_t

* libsvn_repos/dump.c

(close_directory): APR arrays are being indexed by int

* tests/libsvn_subr/string-test.c

(test24): pass unsigned 64 bit ints to svn__ui64toa

  1. … 2 more files in changeset.
Follow-up to r1330729: fix the build against old APR, and change the literals.

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

(test24): Don't use APR_INT64_MIN. Construct its in-line literal differently.

Test an svn__i64toa() edge case.

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

(test24): Test svn__i64toa(APR_INT64_MIN).

Trim trailing whitespace.

* subversion/include/private/svn_named_atomic.h,

* subversion/include/svn_pools.h,

* subversion/libsvn_client/commit.c,

* subversion/libsvn_client/diff.c,

* subversion/libsvn_client/merge.c,

* subversion/libsvn_fs_fs/dag.c,

* subversion/libsvn_fs_fs/fs.h,

* subversion/libsvn_fs_fs/fs_fs.c,

* subversion/libsvn_fs_fs/temp_serializer.c,

* subversion/libsvn_fs_fs/tree.c,

* subversion/libsvn_repos/rev_hunt.c,

* subversion/libsvn_subr/cache-membuffer.c,

* subversion/libsvn_subr/checksum.c,

* subversion/libsvn_subr/crypto.c,

* subversion/libsvn_subr/named_atomic.c,

* subversion/libsvn_subr/pool.c,

* subversion/libsvn_wc/wc_db.c,

* subversion/svnserve/serve.c,

* subversion/tests/libsvn_subr/named_atomic-test-common.h,

* subversion/tests/libsvn_subr/named_atomic-test-proc.c,

* subversion/tests/libsvn_subr/named_atomic-test.c,

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

Trim trailing whitespace.

  1. … 21 more files in changeset.
Provide functions for efficient int64 -> ASCII conversion.

They have been designed for usage in serialization code

(e.g. svn://)

* subversion/include/private/svn_string_private.h

(SVN_INT64_BUFFER_SIZE): new constant

(svn__ui64toa, svn__i64toa): declare new private API

* subversion/libsvn_subr/svn_string.c

(decimal_table): new lookup table

(COPY_TWO_BYTES): new platform abstraction macro

(svn__ui64toa, svn__i64toa): implement new API

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

(test24): new test for new API

  1. … 2 more files in changeset.