Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename and move the new-for-1.10 function 'svn_io_stdin_readline()' to

'svn_cmdline__stdin_readline()'.

It is just a wrapper around existing API functions and lacks some checking and

options so was deemed not suitable to go into the public API in its current

form.

* subversion/include/private/svn_cmdline_private.h,

subversion/libsvn_subr/cmdline.c

(svn_cmdline__stdin_readline): Rename and move to here...

* subversion/include/svn_io.h

* subversion/libsvn_subr/io.c

(svn_io_stdin_readline): ... from here.

* subversion/svnbench/svnbench.c,

subversion/svnmucc/svnmucc.c,

subversion/svnrdump/svnrdump.c,

subversion/svn/svn.c,

tools/client-side/svnconflict/svnconflict.c,

tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c,

tools/dev/svnmover/svnmover.c

(sub_main): Track the rename.

  1. … 10 more files in changeset.
Avoid code duplication by using existing function.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__be_interactive): Use svn_cmdline__stdin_is_a_terminal().

Small refactoring.

* subversion/libsvn_subr/cmdline.c

(most_similar): Initialize MAX_SIMILAR to NULL at the beginning and return

it directly instead of checking if MAX_SCORE is non-zero.

Move a bit more of the signal handling code from the programs to the library.

* subversion/include/private/svn_cmdline_private.h

(svn_cmdline__get_cancellation_signal): Remove.

(svn_cmdline__cancellation_exit): New.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__get_cancellation_signal): Remove.

(svn_cmdline__cancellation_exit): New.

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnbench/svnbench.c

* subversion/svnfsfs/svnfsfs.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/svnrdump.c

* subversion/svnsync/svnsync.c

(main): Call new function.

  1. … 8 more files in changeset.
Move signal handling and cancellation code to libsvn_subr to avoid

duplication in multiple programs.

* subversion/include/private/svn_cmdline_private.h

(svn_cmdline__setup_cancellation_handler,

svn_cmdline__disable_cancellation_handler,

svn_cmdline__get_cancellation_signal): New.

* subversion/libsvn_subr/cmdline.c

(signal_handler, check_cancel,

svn_cmdline__setup_cancellation_handler,

svn_cmdline__disable_cancellation_handler,

svn_cmdline__get_cancellation_signal): New, code from svn.c and svnadmin.c.

* subversion/svn/cl.h

(svn_cl__check_cancel): Change type to pointer.

* subversion/svn/svn.c

(svn_cl__check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnadmin/svnadmin.c

(check_cancel): Change type to pointer.

(signal_handler, setup_cancellation_signalsl): Remove.

(repos_notify_handler, subcommand_recover, subcommand_upgrade,

sub_main, main): Call new functions.

* subversion/svnbench/cl.h

(svn_cl__check_cancel): Change type to pointer.

* subversion/svnbench/svnbench.c

(svn_cl__check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnfsfs/svnfsfs.h

(check_cancel): Change type to pointer.

* subversion/svnfsfs/svnfsfs.c

(check_cancel): Change type to pointer.

(signal_handler, setup_cancellation_signals): Remove.

(sub_main, main): Call new functions.

* subversion/svnlook/svnlook.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnrdump/svnrdump.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnsync/svnsync.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

  1. … 11 more files in changeset.
Merge the 'svnmover' prototype from the 'move-tracking-2' branch to trunk.

See the dev@ email thread "Merge 'svnmover' demo tool to trunk" started on

2015-11-10, archived at e.g. <http://mail-archives.apache.org/mod_mbox/subversion-dev/201511.mbox/%3CCAEcU=1YE5Ci02j_4aAeB_roS1X0H2QWPP3juu0exjVJ-FGCLyg@mail.gmail.com%3E>.

This is a reintegration (performed as an automatic merge) followed by

reverting the unwanted parts. As such, those unwanted parts (such as shim

insertions in several libraries) will be treated as 'record-only merged' and

will not be picked up by any subsequent automatic merge to trunk.

A brief description of the changes follows.

* build.conf

Adjust to build the new files.

* configure.ac

Adjust compiler warning flags to not warn about passing or returning a

structure, because some of the code does so.

* LICENSE

Add the licence text for the embedded 'linenoise' library.

* notes/move-tracking/README

New file, describing this work.

* subversion/include/private/svn_branch.h,

subversion/include/private/svn_branch_compat.h,

subversion/include/private/svn_branch_impl.h,

subversion/include/private/svn_branch_nested.h,

subversion/include/private/svn_branch_repos.h,

subversion/include/private/svn_element.h

New files.

* subversion/libsvn_delta/branch.c,

subversion/libsvn_delta/branch_compat.c,

subversion/libsvn_delta/branch_migrate.c,

subversion/libsvn_delta/branch_nested.c,

subversion/libsvn_delta/branch_repos.c,

subversion/libsvn_delta/element.c

New files.

* subversion/include/private/svn_cmdline_private.h

subversion/libsvn_subr/cmdline.c

(svn_cmdline__stdin_is_a_terminal,

svn_cmdline__stdout_is_a_terminal,

svn_cmdline__stderr_is_a_terminal): New.

* subversion/tests/cmdline/svnmover_tests.py

New file.

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

(run_and_verify_svnmover,

run_and_verify_svnmover2): New.

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

(svnmover_binary,

run_svnmover): New.

(execute_tests): Initialize 'svnmover_binary'.

* subversion/tests/cmdline/svntest/wc.py

(State): Add 'rename' and 'from_eids' methods.

(StateItem): Add an 'eid' attribute.

* tools/dev/svnmover

New tool.

  1. … 25 more files in changeset.
Following up on r1678734, remove unneeded prefix from error message.

* subversion/include/private/svn_cmdline_private.h

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__parse_trust_options): Remove unneeded argument and usage.

* subversion/svn/svn.c

* subversion/svnbench/svnbench.c

* subversion/svnmucc/svnmucc.c

* subversion/svnrdump/svnrdump.c

* subversion/svnsync/svnsync.c

(sub_main): Update caller.

  1. … 6 more files in changeset.
Following up on an irc discussion integrate the --trust-unknown-ca,

--trust-cn-mismatch, --trust-expired, --trust-not-yet-valid and

--trust-other-failure commandline options of svn, svnbench, svnmucc,

svnrdump and svnsync into a new --trust-server-cert-failures option

with arguments that specify which error will be ignored.

This patch is based on an initial (much smaller)

Patch by: danielsh

This patch should be released in 1.9.0 or at least partially reverted.

* subversion/include/private/svn_cmdline_private.h

(svn_cmdline__parse_trust_options): New function.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__parse_trust_options): New function.

* subversion/svn/svn.c

(svn_cl__longopt_t): Tweak options.

(svn_cl__options): Update definition and documentation.

(svn_cl__global_options): Update.

(sub_main): Use new api. Tweak error.

* subversion/svnbench/svnbench.c

(svn_cl__longopt_t): Tweak options.

(svn_cl__options): Update definition and documentation.

(svn_cl__global_options): Update.

(sub_main): Use new api. Tweak error.

* subversion/svnmucc/svnmucc.c

(help): Update documentation.

(sub_main): Tweak options, definition and usage.

* subversion/svnrdump/svnrdump.c

(svn_svnrdump__longopt_t,

SVN_SVNRDUMP__BASE_OPTIONS): Tweak options.

(svnrdump__options): Update definition and documentation.

(sub_main): Use new api. Tweak error.

* subversion/svnsync/svnsync.c

(svnsync__opt,

SVNSYNC_OPTS_DEFAULT): Tweak options.

(svnsync_options): Update definition and documentation.

(sub_main): Use new api. Tweak error.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Update expected output.

  1. … 7 more files in changeset.
* subversion/libsvn_subr/cmdline.c

(trust_server_cert_non_interactive): Fix false-positive acceptance of

certificates with multiple failures of which some but not all were

designated acceptable.

* subversion/libsvn_subr/cmdline.c

(validate_config_option): Fix docstring. No functional change.

* subversion/libsvn_subr/cmdline.c

(validate_config_option): Remove SVN_DBG() call to unbreak compilation in

release mode.

--config-option: Warn when the FILE:SECTION:OPTION combination may be invalid.

Currently there are false negatives: if each component is individually known,

then there won't be a warning, even if the tuple as a whole is invalid.

The implementation is as follows: first, parse svn_config.h to generate a list

of valid file/section/option names:

* subversion/libsvn_subr/config_keys.inc:

Not a versioned file, but will be generated by gen-make.py.

* build/generator/gen_base.py

(collections): Import.

(GeneratorBase.FileSectionOptionEnum): New class.

(GeneratorBase._client_configuration_defines): New method.

(GeneratorBase.write_config_keys): New method.

(IncludeDependencyInfo._scan_for_includes):

Exempt config_keys.inc from dependency scanning.

* build/generator/templates/build-outputs.mk.ezt

(EXTRACLEAN_FILES): Clean config_keys.inc.

* gen-make.py

(main): Generate config_keys.inc.

Second, have the --config-option parser warn to stderr about unknown values:

* subversion/include/private/svn_cmdline_private.h

(svn_cmdline__parse_config_option): Add PREFIX argument, document new

functionality.

* subversion/libsvn_subr/cmdline.c

(config_keys.inc): Include.

(most_similar, string_in_array, validate_config_option): New functions.

(svn_cmdline__parse_config_option): Validate the config option's coordinates

and warn if they may be invalid.

* subversion/svn/similarity.c

(svn_cl__similarity_check): Cross-reference most_similar().

No functional change.

Third, add a unit test:

* subversion/tests/cmdline/getopt_tests.py

(getopt_config_option): New test.

Finally, update callers for the trivial signature change:

* subversion/svn/svn.c (sub_main),

* subversion/svnbench/svnbench.c (sub_main),

* subversion/svnmucc/svnmucc.c (sub_main),

* subversion/svnrdump/svnrdump.c (sub_main):

Pass new PREFIX argument.

* subversion/svnsync/svnsync.c

(sub_main): Ditto, in two places.

  1. … 11 more files in changeset.
* subversion/libsvn_subr/cmdline.c

(svn_cmdline__edit_string_externally): Following up on r1663012 and r1663013,

fix the ignoring of an error (as documented right above this function call).

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__edit_string_externally): Really use time - 2 sec,

instead of something like time - 0.002 sec

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__edit_file_externally): Use svn_io_file_*() where possible,

to use standard path conversions and error handling. Compose errors

instead of dropping them.

For non-interactive mode, allow fine-grained control over which SSL

certificate failures are considered fatal and which may be ignored.

The --trust-server-cert option only accepts certificates signed by an

unknown CA, and rejects certificates which fail for other reasons.

However, in practice, people run into broken SSL configurations that

trigger other failure conditions such as hostname/CN mismatch, expired

certs, etc. Sometimes they are not in a position to fix the problem themselves

and can't get work done (writing scripts) since SVN refuses to operate.

This topic is one of the most discussed issues in the #svn IRC channel.

Somewhat less so on the users@ mailing lists, though it also occurs there.

There is no real reason to prefer one kind of failure condition over

any other. An invalid cert is an invalid cert, regardless of why it fails

validation. Ultimately, it is up to users to waive trust in SSL when it

gets in the way in a particular situation. We should not be making this

decision for them.

Deprecate the --trust-server-cert option and add the following new options

to 'svn', exposing all possible failure modes the underlying API can handle:

--trust-unknown-ca : with --non-interactive, accept SSL server

certificates from unknown certificate authorities

--trust-cn-mismatch : with --non-interactive, accept SSL server

certificates even if the server hostname does not

match the certificate's common name attribute

--trust-expired : with --non-interactive, accept expired SSL server

certificates

--trust-not-yet-valid : with --non-interactive, accept SSL server

certificates from the future

--trust-other-failure : with --non-interactive, accept SSL server

certificates with failures other than the above

* subversion/include/svn_cmdline.h

(svn_cmdline_create_auth_baton2): Declare and document new parameters.

(svn_cmdline_create_auth_baton): Deprecate.

* subversion/libsvn_subr/cmdline.c

(trust_server_cert_non_interactive_baton): New baton.

(ssl_trust_unknown_server_cert): Rename to ...

(trust_server_cert_non_interactive): .. this and implement generic

validation failure checks according to flags passed in baton.

(svn_cmdline_create_auth_baton): Move to libsvn_subr/deprecated.c.

(svn_cmdline_create_auth_baton2): Implement new revision of this API with

new options trust_server_cert_unknown_ca, trust_server_cert_cn_mismatch,

trust_server_cert_expired, trust_server_cert_not_yet_valid, and

trust_server_cert_other_failure.

* subversion/libsvn_subr/deprecated.c

(svn_cmdline_create_auth_baton): Implement as wrapper around

svn_cmdline_create_auth_baton2.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new options trust_server_cert_unknown_ca,

trust_server_cert_cn_mismatch, trust_server_cert_expired,

trust_server_cert_not_yet_valid, and trust_server_cert_other_failure.

.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add new options opt_trust_server_cert_unknown_ca,

opt_trust_server_cert_cn_mismatch, opt_trust_server_cert_expired,

opt_trust_server_cert_not_yet_valid, opt_trust_server_cert_other_failure.

(svn_cl__options): Add options and help text for --trust-unknown-ca,

--trust-cn-mismatch, --trust-expired, --trust-not-yet-valid, and

--trust-other-failure.

(svn_cl__global_options): Add the new options here.

(sub_main): Process new options and use svn_cmdline_create_auth_baton2().

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Adjust expected output.

  1. … 5 more files in changeset.
* subversion/libsvn_subr/cmdline.c

(svn_cmdline__edit_string_externally): Use NULLs for pointers to booleans

that could potentially be filled in rather than FALSE when calling

svn_subst_translate_string2(), no functional change, stylistic.

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.
Get rid of the ever increasing number of private apis in svn_sorts.h by adding

a new private/svn_sorts_private.h file with the private parts and updating the

needed #include-s.

*AND*

Improve error reporting during xml parsing in ra_serf a bit.

For 1.9 the number of private apis in this public header more than doubled,

doubling the original filesize, while our policy is to never add private

functions in public headers.

* build.conf

(libsvn_subr): Add export.

* subversion/include/private/svn_sorts_private.h

New file, copied from ../svn_sorts.h.

* subversion/include/svn_sorts.h

Remove everything possible in our private namespace. Keeping some

references.

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/status.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/lock.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/log-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

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

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

Fix includes.

* subversion/libsvn_ra_serf/util.c

(expat_response_handler): Combine XML errors with our custom parser errors

instead of only reporting one or the other.

  1. … 42 more files in changeset.
Use SVN_VA_NULL instead of plain NULL in variable-arguments lists in all

remaining cases, as far as I can discover, following r1536307 (introducing

SVN_VA_NULL) and r1543394 (warning about missing or inappropriate sentinels for

some Subersion functions).

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

calls with variable argument lists.

  1. … 37 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 initialization of the platform specific ssl server certificate

initialization to svn_auth_get_platform_specific_client_providers().

* subversion/libsvn_subr/auth.c

(svn_auth_get_platform_specific_client_providers): Move ssl server provider

setup here..

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_create_auth_baton): ... that somehow stayed here when we moved

the other providers some time ago.

  1. … 1 more file in changeset.
Extend the Windows CRYPTOAPI based ssl certificate verification to properly

handle intermediate authorities, like how webbrowsers handle this.

When I originally implemented the ssl server certificate verification, most

certificates were directly signed by the root authority while since then

most certificates moved to using short lived intermediate authorities.

This re-enables common cases like

$ svn info https://svn.apache.org/repos/asf/

to work directly on Windows, without an initial prompt for accepting a

certificate from an unknown authority, just like it worked a few years ago.

* subversion/include/private/svn_auth_private.h

(SVN_AUTH_CRED_SSL_SERVER_AUTHORITY): Declare new credential type.

(svn_auth__get_windows_ssl_server_authority_provider): New function.

* subversion/libsvn_ra_serf/util.c

(includes): Add svn_auth_private.h.

(ssl_server_cert): Instead of just recording authority failures call a

new (optional) provider to allow

* subversion/libsvn_subr/auth.c

(includes): Add svn_auth_private.h.

(svn_auth_get_platform_specific_provider): Allow loading new provider.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_create_auth_baton): Hook new provider in the same place as

where we hook the server certificate provider.

* subversion/libsvn_subr/win32_crypto.c

(windows_ssl_server_trust_first_credentials): Fix an old bug, where instead

of properly accepting a failure, we removed the failure where it was

originally stored. (This happened to work in serf an neon for years)

(windows_server_authority_provider): New variable.

(svn_auth__get_windows_ssl_server_authority_provider): New function.

  1. … 4 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.
Follow up to r1534037: Add missing include.

* subversion/libsvn_subr/cmdline.c: Do not include win32_xlate.h.

Include private/svn_subr_private.h instead.

Add a Windows specific svn_cmdline_puts() shortcut for the direct console

output case to avoid the insanely expensive double character conversion

in the Visual C++ CRT for this specific, but for Subversion very common case.

Before: VM/Network WC Host

$ svn status -v trunk = 7.5s 5.8s

$ svn status -v trunk > file = 0.7s 0.1s

After:

$ svn status -v trunk = 1.3s 0.4s

$ svn status -v trunk > file = 0.7s 0.1s

(Measured on Windows 7, 8 and 8.1 with several CRT versions >= 2008)

When locales are explicitly enabled (such as in Subversion) the Visual

C++ CRT applies a double character conversion to make the console output

identical to what DOS and Win9X would do, while the console natively supports

displaying unicode. Instead of using the standard conversion route, this

shortcut converts our utf-8 to utf-16 and sends that to the attached console.

This patch avoids the extreme performance penalty and at the same time

enables displaying all unicode characters that the console support even

when they can't be expressed in the ansi character set.

Note that you will not see any change in the test suite, as the test suite

redirects all output. It will make subversion easier to profile though,

as before this patch many performance scenarios were console io bound on

Windows.

* subversion/libsvn_subr/cmdline.c

(includes): Add conio.h on Windows. Add win32_xlate.

(svn_cmdline_init): Detect if stdout and/or stderr are connected to the

console.

(svn_cmdline_fputs): Shortcut stdout/stderr to the console when possible.

* subversion/libsvn_subr/win32_xlate.c

(includes): Add svn_private_config.h.

(svn_subr__win32_utf8_to_utf16): New function.

* subversion/libsvn_subr/win32_xlate.h

(svn_subr__win32_utf8_to_utf16): New function.

  1. … 2 more files in changeset.
Hide some essentially dead code by using the preprocessor.

* subversion/libsvn_subr/cmdline.c

(CMDLINE_USE_CUSTOM_ENCODING): New macro. Document why this still exists.

(input_encoding,

output_encoding): Disable when CMDLINE_USE_CUSTOM_ENCODING is not defined.

(svn_cmdline_init): Use CMDLINE_USE_CUSTOM_ENCODING as condition around

initializing the encoding usage.

(svn_cmdline_cstring_from_utf8,

svn_cmdline_cstring_to_utf8,

svn_cmdline_output_encoding): Use preprocessor instead of runtime check

for the 99.9% case.

Fix issue 4425 and issue 3014 on Windows. Treat ERROR_NO_DATA Windows

error code as EPIPE error.

* subversion/include/svn_types.h

(SVN__APR_STATUS_IS_EPIPE): New macro, same as APR_STATUS_IS_EPIPE with

additional handling of ERROR_NO_DATA on Windows.

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/io.c

(svn_cmdline_fputs, svn_cmdline_fflush, do_io_file_wrapper_cleanup): Use

SVN__APR_STATUS_IS_EPIPE macro instead of APR_STATUS_IS_EPIPE.

  1. … 2 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.
On Windows add SVN_CMDLINE_DISABLE_CRASH_HANDLER environment variable to

disable crash handler. Useful for debugging crashing command line client.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_init): Do not set crash handler if

SVN_CMDLINE_DISABLE_CRASH_HANDLER environment variable set.