Checkout Tools
  • last updated 1 hour ago
Constraints: committers
Constraints: files
Constraints: dates
'svn log': Make the --quiet and --diff options not mutually exclusive.

Suggested by: wuzhouhui


Date: Sun, 22 Dec 2019 11:29:35 +0800

From: wuzhouhui <>

To: Subversion <>

Subject: Why option --diff and -q of svn log are mutually exclusive

Message-Id: <>

* subversion/svn/log-cmd.c

(svn_cl__log): As above.

In help text, remove obsolete examples of 'svn switch --relocate'.

* subversion/svn/svn.c

Remove it from help text.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Remove it from test expectation.

  1. … 1 more file in changeset.
  1. … 2 more files in changeset.
'svn help' output: Rewrap 3 lines that were longer than 80 characters

* subversion/svn/svn.c

(svn_cl__cmd_table): Rewrap first line of 'svn help' output for

'svn cleanup', 'svn changelist', and 'svn switch'. Because the

command name and its aliases are prepended to the first line of

help output, these 3 lines (all of which appear to fit within 80

characters in the code) extended beyond 80 characters at runtime.

Whitespace changes only. No functional change.

* subversion/svn/info-cmd.c

(find_print_what, print_info_item): Reindent blocks from last commit.

'info': Support multiple items in --show-item, as tab-separated values (TSV).

Suggested by: brane



Date: Thu, 7 Nov 2019 17:28:35 +0100

From: Branko Čibej <>


Subject: svn status tabbed output [was: Re: svn status should not show unmodified files in changelists]

Message-ID: <>

* subversion/svn/info-cmd.c

(print_info_baton_t::print_what): Rename to..

(print_info_baton_t::print_whats): .. this.

(find_print_what): Rename argument and parse it as a list.

(print_info_item): Track changes to the baton.

(svn_cl__info): Track changes to the baton.

* subversion/svn/svn.c

(svn_cl__options."show_item"): Update docstring.

* subversion/tests/cmdline/

(info_item_simple): Extend existing test case to unit test this feature.

Blocks that haven't been reindented in this commit will be reindented in the

next commit.

  1. … 2 more files in changeset.
Add 'changelist' option to 'svn info --show-item'.

* subversion/svn/info-cmd.c


info_item_map): Add 'changelist' item.

(print_info_item): Print it.

* subversion/svn/svn.c

(svn_cl__options): Document it.

Issue #4828, Hide experimental commands and options by default.

* subversion/libsvn_subr/opt.c


print_generic_help_body3): Show commands and options starting with

'x-' only if new 'with_experimental' option is true.

(print_generic_help): Extracted from 'svn_opt_print_generic_help3', to

take the new 'with_experimental' option.

(subcommand_help): Extracted from 'svn_opt_subcommand_help4', to

take the new 'with_experimental' option.

(svn_opt_print_help5): Let the 'verbose' option control 'with

experimental', when printing help. The 'verbose' option previously was

not used here except for the case of printing version info.

* subversion/svn/svn.c

Let 'help' take the '-v' option.

* subversion/tests/cmdline/getopt_tests_data/svn_help_stdout

* subversion/tests/cmdline/getopt_tests_data/svn--help_stdout

Adjust the expected output.

* tools/dist/

[Accidental change; reverted in 1866189.]

  1. … 4 more files in changeset.
Let the WC mods editor and WC replay editor APIs take explicit notification


* subversion/include/private/svn_client_private.h


svn_client__wc_copy_mods): Take a notification callback.

* subversion/libsvn_client/commit.c

(svn_client__wc_replay): Take a notification callback.

* subversion/libsvn_client/wc_editor.c

(svn_client__wc_copy_mods): Take a notification callback.

* subversion/svn/shelf-cmd.c

(svn_cl__wc_copy_mods): Adjust caller.

  1. … 3 more files in changeset.
Add two resolver options for 'dir move vs dir move upon merge' conflicts.

These new options work similar to their existing counterparts for files.

* subversion/include/svn_client.h


svn_client_conflict_option_both_moved_dir_move_merge): Declare.

* subversion/libsvn_client/conflicts.c


resolve_both_moved_dir_move_merge): New resolution option handlers.


configure_option_both_moved_dir_merge): Enable new options on applicable

tree conflicts.




svn_client_conflict_option_set_moved_to_abspath2): Handle new options.

* subversion/svn/conflict-callbacks.c

(builtin_resolver_options): Assign resolver menu keys to the new options.

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


test_merge_dir_move_vs_dir_move_accept_move, test_funcs): Add new tests.

(create_dir_move_vs_dir_move_merge_conflict): New helper for above tests.

  1. … 3 more files in changeset.
Follow up to r1851268: our coding guidelines say that output parameters

should come first in the function argument list.

* subversion/include/svn_client.h

(svn_client_blame6): Move start_revnum_p and end_revnum_p to the

beginning of the argument list and update the docstring to say that

either of these may be NULL.

* subversion/libsvn_client/blame.c

(svn_client_blame6): Update signature.

* subversion/svn/blame-cmd.c (svn_cl__blame),

subversion/libsvn_client/deprecated.c (svn_client_blame5),

subversion/bindings/javahl/native/SVNClient.cpp (SVNClient::blame):

Update all callers.

  1. … 4 more files in changeset.
Fix blame field alignment, following r1851265,r1851268.

* subversion/svn/blame-cmd.c


blame_receiver): Move the field width calculation back to here,

(svn_cl__blame): after having over-enthusiastically moved it to here where

it wasn't calculated until after all the output was printed.

Move misplaced parameters out of the blame callback.

The svn_client_blame_receiver4_t parameters "start_revnum" and "end_revnum"

do not really belong here because they are not per-line data. They are the

"resolved" versions of the input revnums to svn_client_blame6(). This patch

moves them to svn_client_blame6() output parameters.

* subversion/bindings/javahl/native/BlameCallback.h,



singleLine): Drop the start/end parameters.

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

(blame): Adjust the call to svn_client_blame6(). Don't provide access to

the start/end parameters here, as we weren't providing access to them

through the callback. We could add them later.

* subversion/svn/blame-cmd.c


blame_receiver): Don't expect and process start/end revnums here.

(svn_cl__blame): Handle them here instead.

  1. … 3 more files in changeset.
Update callers to use the newly revved svn_client_blame6() API.

* subversion/bindings/javahl/native/BlameCallback.h,



singleLine): Expect 'svn_string_t *' instead of 'char *'.

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

(blame): Update the call to use svn_client_blame6.

* subversion/svn/blame-cmd.c


blame_receiver): Expect 'line' to be an svn_string_t.

(svn_cl__blame): Update to use svn_client_blame6 and


  1. … 3 more files in changeset.
Un-break the build. A follow-up to r1850720.

* subversion/svn/svn.c

(svn_cl__cmd_table): Remove an empty initializer list, as it's invalid C

and broke the build on Windows.

Implement an experimental 'x-wc-copy-mods' command.

This can be used to comprehensively test the WC editor (issue #4786).

* subversion/include/private/svn_client_private.h,


(svn_client__wc_copy_mods): New.

* subversion/svn/svn.c

(svn_cl__cmd_table): Add 'x-wc-copy-mods' command.

* subversion/svn/cl.h

(svn_opt_subcommand_t): Declare 'svn_cl__wc_copy_mods'.

* subversion/svn/shelf-cmd.c

(svn_cl__wc_copy_mods): New.

  1. … 2 more files in changeset.
Implement issue 4798 "revert: option to remove added items from disk".

But the the API doesn't currently work for items found by recursion, so the

last part of the test fails.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add a new flag, 'remove_added'.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Pass that flag on to the API.

* subversion/svn/svn.c




sub_main): Add a new option, 'opt_remove_added', to the 'revert' command.

Start using the safe canonicalize and internal_style functions.

* subversion/svn/svn.c

(sub_main): Use svn_dirent_internal_style_safe().

* subversion/svn/util.c

(svn_cl__merge_file_externally): Add comment explaining why we don't have

to use the 'safe' version in this case.

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

(svn_dirent_internal_style_safe): Use svn_dirent_internal_style_safe().

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

(sub_main): Use svn_dirent_internal_style_safe().

* tools/server-side/svnauthz.c

(subcommand_accessof): Use svn_dirent_internal_style_safe().

(canonicalize_access_file): Likewise, also use svn_uri_canonicalize_safe().

(sub_main): Use svn_dirent_internal_style_safe().

  1. … 3 more files in changeset.
* subversion/svn/cl.h: Fix typos in comments. No functional change.

Consolidate file size formatting for 'svn info' and 'svn list'.

* subversion/svn/cl.h

(svn_cl__size_unit_t): Renamed and extended from svn_cl__unit_base_t.

(svn_cl__opt_state_t): New field 'file_size_unit' replaces the

'human_readable' flag. All users updated.

(svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

* subversion/svn/filesize.c

(get_base2_unit_file_size, get_base10_unit_file_size): Tweak some comments.

(svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

Also handle formatting for XML and for normal output.

* subversion/svn/info-cmd.c

(print_info_baton_t): 'file_size_unit' replaces the 'human_readable' flag.

(print_info_xml): Use svn_cl__format_file_size() in XML mode.

(print_info): Use only svn_cl__format_file_size() for file sizes.

(print_info_item): Likewise.

(svn_cl__info): Allow unit-based file size output with --show-item.

* subversion/svn/list-cmd.c

(print_baton): 'file_size_unit' replaces the 'human_readable' flag.

(print_dirent): Use only svn_cl__format_file_size() for file sizes.

(print_dirent_xml): Use svn_cl__format_file_size() in XML mode.

(svn_cl__list): Update for changes to svn_cl__opt_state_t.

* subversion/svn/svn.c

(sub_main): Handle the new file_size_unit field in svn_cl__opt_state_t.

* subversion/tests/cmdline/

(info_item_size_repos): Add two new test modes.

  1. … 1 more file in changeset.
* subversion/svn/filesize.c (format_size): Fix typo in comment ... again.

/me really improved my commit stats

* subversion/svn/filesize.c (format_size): Fix typo in comment.

Found by: danielsh

Combine base-2 and base-10 unit file size conversion into a single API,

with a common implementation for the identical bits.

* subversion/svn/cl.h

(svn_cl__unit_base_t): New enumeration.


svn_cl__get_base10_unit_file_size): Removed. Replaced by ...

(svn_cl__get_unit_file_size): ... this new function.

* subversion/svn/filesize.c

(filesize_order_t): New common struct.

(get_order_index, format_size): New; refactored common code.

(get_base2_unit_file_size): Reworked from svn_cl__get_base2_unit_file_size.

(get_base10_unit_file_size): Reworked from svn_cl__get_base10_unit_file_size.

(svn_cl__get_unit_file_size): Implement.

* subversion/svn/info-cmd.c (print_info): Use svn_cl__get_unit_file_size().

* subversion/svn/list-cmd.c (print_dirent): Likewise.

Add a function for converting file sizes to base-10 units for display.

* subversion/svn/cl.h (svn_cl__get_base10_unit_file_size): New prototype.

* subversion/svn/filesize.c (svn_cl__get_base10_unit_file_size): Implement it.

Teach 'svn info' to show human-readable file sizes.

* subversion/svn/cl.h (svn_cl__get_base2_unit_file_size): New prototype.

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

(svn_cl__get_base2_unit_file_size): Implement. Moved here from list-cmd.c.

* subversion/svn/list-cmd.c: Remove unused includes.

(get_human_readable_size): Remove. Implementation moved to filesize.c.

(print_dirent): Use svn_cl__get_base2_unit_file_size().

* subversion/svn/info-cmd.c

(print_info_baton_t): New member 'human_readable'.

(print_info): Optionally print human-readable file sizes.

(svn_cl__info): Handle option --human-readable.

* subversion/svn/svn.c (svn_cl__cmd_table): Add -H to 'svn info'.

Show in-repository sizes of files with 'svn info'.

The file size is only displayed if the target of 'svn info' is a file URL.

With --show-item=repo-size, an error is returned if the target is a single

local path. However, if there are multiple local targets (e.g., in recursive

mode), nothing at all will be printed, since there are no valid results.

* subversion/libsvn_client/info.c

(DIRENT_FIELDS): Add SVN_DIRENT_SIZE to the mask, otherwise recursive

queries do not return file sizes, which is inconsistent with the

non-recursive or single-target case.

* subversion/svn/info-cmd.c

(info_item_t): Add new enumeration, info_item_repos_size.

(info_item_map): Map "repos-size" to info_item_repos_size.

(print_info_xml): If the file size is available, add a "size"

attribute to the <entry/> node.

(print_info): Print the file size if it's available.

(print_info_item): Handle info_item_repos_size.

* subversion/svn/svn.c (svn_cl__options): Describe --show-item=repos-size.

* subversion/tests/cmdline/



info_item_size_repos_recursive) New test cases.

(info_item_failures): Test the size-of-WC-target failure mode.

  1. … 2 more files in changeset.
* subversion/svn/list-cmd.c

(svn_cl__list): Do not allow --human-readable with --xml.

Make the option compatibility error messages from 'svn list' consistent

with those from 'svn info'.

* subversion/svn/list-cmd.c (svn_cl__list): Update error messages.

Follow up to r1847384, changing the 'svn ls -vH' output to:

- fix a bug where the size is between 1000 and 1023 units; and,

- use the locale-specific decimal separator.

* subversion/svn/list-cmd.c: Include <assert.h> for assert(),

<math.h> for fabs() and <stdio.h> for sprintf().


- Update the part of the docstring about negative sizes.

- Scale to the next higher magnitude when the adjusted size is

between 1000 and 1023 units.

- Use standard sprintf() to format the displayed number, because

APR's formatter does not use locale information.

* subversion/svn/list-cmd.c (get_human_readable_size):

Fix a comment to avoid confusing wishful thinking and reality.