Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix various typos detected by codespell

* CHANGES, INSTALL, build.conf, configure.ac,

notes/anchors_and_targets.txt, subversion/svn/cl.h,

subversion/svn/conflict-callbacks.c, subversion/svn/svn.c,

subversion/svn_private_config.hw,

subversion/svnbench/null-blame-cmd.c,

subversion/svnbench/svnbench.c,

subversion/svnfsfs/load-index-cmd.c,

subversion/svnlook/svnlook.c, subversion/svnserve/serve.c,

subversion/svnserve/server.h, subversion/svnserve/svnserve.c,

subversion/svnsync/sync.c:

(): Spelling fixes

  1. … 15 more files in changeset.
Split long help strings into paragraphs to ease translation.

Resolves issue SVN-4724.

This patch covers every help string defined in svn_opt_subcommand_desc3_t

format, which is most help strings in most but not all of the command-line

programs 'svn', 'svnadmin', etc. For this patch, the definition of a

paragraph is a group of non-blank lines. The split points can be manually

adjusted later.

* subversion/svnadmin/svnadmin.c,

subversion/svnbench/svnbench.c,

subversion/svnfsfs/svnfsfs.c,

subversion/svnlook/svnlook.c,

subversion/svnrdump/svnrdump.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

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

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

Split long help texts.

  1. … 8 more files in changeset.
Allow splitting long help strings into paragraphs to ease translation.

Issue SVN-4724.

This patch revises the help string definition format that is used in 'svn'

and most of the other command-line tools to svn_opt_subcommand_desc3_t

(introduced in r1826328).

This patch does not split each long string into paragrpahs, it only adds the

mechanism for doing so.

  1. … 14 more files in changeset.
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.
Introduce a new global option: --password-from-stdin

This new option makes Subversion's command line applications read a password

from standard input. It can be used as an alternative to the --password option

in order to provide passwords without leaking them to argv, which on Unix-like

systems can be viewed by anyone with tools such as ps(1).

Patch by: William Orr <will@worrbase.com>

* subversion/include/svn_io.h

(svn_io_stdin_readline): Declare.

* subversion/libsvn_subr/io.c

(svn_io_stdin_readline): New public API which reads a line of input from

standard input.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Declare auth_password_from_stdin option.

* subversion/svn/svn.c,

subversion/svnbench/svnbench.c

(svn_cl__longopt_t): Add opt_auth_password_from_stdin.

(svn_cl__options): Add --password-from-stdin.

(svn_cl__global_options): Add opt_auth_password_from_stdin.

(sub_main): Handle the new option.

* subversion/svnmucc/svnmucc.c

(help): Add --password-from-stdin option to help text.

(sub_main): Handle the new option.

* subversion/svnrdump/svnrdump.c

(svn_svnrdump__longopt_t): Add opt_auth_password_from_stdin.

(svnrdump__options, opt_baton_t): Add --password-from-stdin and --dumpfile.

(opt_baton_t, replay_revisions, dump_cmp, load_cmd, sub_main): Add support

for the new options. Since svnrdump has historically been reading dump file

data from stdin the --password-from-stdin option requires --dumpfile.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Adjust exected output.

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

(svn_min__longopt_t, svn_min__options): Add opt_auth_password_from_stdin.

(svn_min__options): Add --password-from-stdin.

(sub_main): Support the new options.

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

(svnconflict_cmd_baton_t, global_options): Add opt_auth_password_from_stdin.

(svnconflict_options): Add --password-from-stdin.

(sub_main): Support the new options.

  1. … 10 more files in changeset.
Revert r1806548.
  1. … 2 more files in changeset.
[Reverted in r1807050]

As Julian discovered, '--search' as used with 'svn log' may not suitable

for 'svn ls'. File name matching should be case-sensitive and requires

full patterns just like e.g. the ordinary unix command line 'ls' command.

Therefore, introduce a separate '--pattern' option for 'svn log' that works

similar to patterns with Unix command line 'ls'. Since the actual matching

already confirms to that, we only need a different option pre-processing.

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__options): Add '--pattern' option as a non-normalizing,

case-sensitive alternative to '--search'.

(svn_cl__cmd_table): For 'ls', replace '--search' by '--pattern'.

(sub_main): Handle the new '--pattern' option.

* subversion/svnbench/svnbench.c

(svn_cl__longopt_t,

svn_cl__options,

svn_cl__cmd_table): Replace '--search' by '--pattern'.

(sub_main): Handle the new '--pattern' option.

* subversion/tests/cmdline/basic_tests.py

(filtered_ls): Update option names used by the test.

  1. … 2 more files in changeset.
Use more robust coding style in handling UTF-8 conversion of command-line

arguments.

Convert to UTF-8 as soon as possible, and name variables assuming UTF-8

encoding is the default rather than an exception, and minimize visibility of

non-UTF-8 values.

* subversion/svn/propdel-cmd.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/propset-cmd.c:

Rename variables assuming UTF-8; minimize storing non-UTF-8 values.

* subversion/svn/svn.c,

subversion/svnadmin/svnadmin.c,

subversion/svnbench/svnbench.c,

subversion/svndumpfilter/svndumpfilter.c,

subversion/svnfsfs/svnfsfs.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svnrdump/svnrdump.c,

subversion/svnsync/svnsync.c

tools/client-side/svnconflict/svnconflict.c

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

tools/dev/svnmover/svnmover.c

tools/server-side/svnauthz.c

(sub_main): Convert to UTF-8 before matching the subcommand name; no

observable change if environment's encoding is a superset of ASCII.

(...): Rename variables assuming UTF-8; minimize storing non-UTF-8 values.

  1. … 16 more files in changeset.
Change the svn_*_list APIs to use NULL as the "don't filter by pattern"

parameter instead of an empty pattern list.

Suggested by: Patrick Steinhardt (patrick.steinhardt at elegosoft.com)

* subversion/include/svn_repos.h

(svn_repos_list): Document the new PATTERN options behavior.

* subversion/libsvn_repos/list.c

(matches_any): Implement the new behavior.

(svn_repos_list): Empty lists will almost always be created by dumb

scripts. It's probably a good idea to explicitly

not waste any resources in the degenerate case.

* subversion/include/svn_ra.h

(svn_ra_list): Document the new PATTERN options behavior.

* subversion/libsvn_ra_svn/protocol

(3.1.1. Main Command Set): The patterns list in the list command is

now optional.

* subversion/libsvn_subr/log.c

(svn_log__list): Make the logging cope with NULL pattern lists.

* subversion/svnserve/serve.c

(list): Receive NULL for PATTERNS, if no list was received.

* subversion/libsvn_ra_svn/client.c

(ra_svn_list): Omit the pattern list entirely, if patterns is NULL.

* subversion/include/svn_client.h

(svn_client_list4): Document the new PATTERN options behavior.

(svn_client_list3): Update docstring.

* subversion/libsvn_client/deprecated.c

(svn_client_list3): Update implementation.

* subversion/libsvn_client/list.c

(match_patterns): Implement the new behavior.

(list_internal): Update docstring.

* subversion/svn/list-cmd.c

(svn_cl__list): If no patterns were specified, pass NULL to the API.

* subversion/svnbench/null-list-cmd.c

(svn_cl__null_list): Same.

  1. … 11 more files in changeset.
Add '--search' option support to 'svnbench null-list'.

This replicates features already implemented for 'svn list'.

* subversion/svnbench/cl.h

(svn_cl__opt_state_t): Copy SEARCH_PATTERNS from the standard CL client.

* subversion/svnbench/null-list-cmd.c

(svn_cl__null_list): Process the search patterns just like in 'svn'.

* subversion/svnbench/svnbench.c

(svn_cl__longopt_t,

svn_cl__options,

svn_cl__cmd_table,

add_search_pattern_group,

sub_main): Replicate svn's '--search' option.

* 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

(): Remove another unsed header file.

  1. … 6 more files in changeset.
* subversion/svnbench/svnbench.c

(): Remove now unsed header files.

(sub_main): Remove some signal code that is now in the library.

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. … 10 more files in changeset.
* 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

(signal_map): Fix typo in WIN32 code.

  1. … 6 more files in changeset.
* subversion/svn/svn.c

* subversion/svnbench/svnbench.c

* subversion/svnfsfs/svnfsfs.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/svnrdump.c

* subversion/svnsync/svnsync.c

(signal_handler, setup_cancellation,

sub_main, main): Followup to r1727916, handle race if second signal

arrives, don't assume int fits in sig_atomic_t.

Found by: danielsh

  1. … 6 more files in changeset.
Followup to r1727621, properly resend the signal for all caught signals.

* 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

(signal_handler): Store signal number.

(main): Resend signal when signal is caught.

  1. … 6 more files in changeset.
* 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): Exit via SIGINT when SIGINT is caught.

  1. … 6 more files in changeset.
Port r1673153 to svnbench from svn: request only required directory fields in

'svnbench null-list' to have the same performance as 'svn ls'.

* subversion/svnbench/null-list-cmd.c

(print_dirent_fields, print_dirent_fields_verbose): New constant variables.

(svn_cl__null_list): Only request the required fields.

Show how many bytes transferred over network in svnbench's non-quiet output.

* subversion/svnbench/svnbench.c

(): Include private/svn_string_private.h.

(ra_progress_baton_t, ra_progress_func): New.

(sub_main): Setup RA progress callback if not in quiet mode. Print

information how many bytes transferred over network if RA layer provided

this information.

Make svn-bench null-log actually evaluate the --with-no-revprops option.

* subversion/svnbench/null-log-cmd.c

(svn_cl__null_log): Explicitly request 0 revprops when no-revprops has

has been set.

Correct the statistics gathered 'svnbench null-export' output. The start

node was not included into it.

* subversion/svnbench/null-export-cmd.c

(file_write_handler): New stream function.

(bench_null_export): Count the root node. For exports of single files,

count the plaintext bytes received.

Show time taken in svnbench's non-quiet output.

* subversion/svnbench/svnbench.c

(sub_main): If there was no error and we are not simply showing help,

show the time taken as the last line (if not in quiet mode).

Formatting fix.

* subversion/svnbench/svnbench.c

(sub_main): Remove space before parenthesis.

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 r1630117 and r1678734, extend --trust-server-cert-failures.

Suggested by:

stsp

brane

* subversion/svn/svn.c

(svn_cl__options): Extend docs.

* subversion/svnbench/svnbench.c

(svn_cl__options): Extend docs.

* subversion/svnmucc/svnmucc.c

(help): Extend docs.

* subversion/svnrdump/svnrdump.c

(svnrdump__options): Extend docs.

* subversion/svnsync/svnsync.c

(svnsync_options): Extend docs.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Update expected result.

  1. … 5 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.
Following up on r1674301, improve the warning message produced on passing

an invalid configuration option for svnbench and svnsync.

Patch by: danielsh

* subversion/svnbench/svnbench.c

* subversion/svnsync/svnsync.c

(sub_main): Update application name prefix.

  1. … 1 more file in changeset.
--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.
Let 'svnbench null-blame' accept a revision range. This will make it possible

to benchmark 'prospective blame' (needs a reverse revision range).

* subversion/svnbench/svnbench.c

(sub_main): Allow svn_cl__null_blame to accept a revision range.