client-side

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Report a revision's size on disk.

This adds an 'svnadmin rev-size' CLI and a libsvn_fs ioctl API to report

the total size in bytes of the representation on disk of a revision,

including rev-props, excluding FSFS indexes.

$ svnadmin rev-size /path/to/repo -r1

1337 bytes in revision 1

* subversion/svnadmin/svnadmin.c

(cmd_table): Add and document the 'rev-size' command.

(revision_size,

subcommand_rev_size): New.

* subversion/include/private/svn_fs_fs_private.h

(svn_fs_fs__ioctl_revision_size_input_t,

svn_fs_fs__ioctl_revision_size_output_t,

SVN_FS_FS__IOCTL_REVISION_SIZE): New.

* subversion/libsvn_fs_fs/fs.c

(fs_ioctl): Handle SVN_FS_FS__IOCTL_REVISION_SIZE.

* subversion/libsvn_fs_fs/fs_fs.h

* subversion/libsvn_fs_fs/stats.c

(svn_fs_fs__revision_size,

rev_size_index_entry_cb,

rev_size_baton_t): New.

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/revprops.c

(svn_fs_fs__get_revision_props_size): New.

* tools/client-side/bash_completion

(_svnadmin): Add 'rev-size'.

  1. … 7 more files in changeset.
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().

    • ?
    ./svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
  1. … 3 more files in changeset.
Add a bunch of missing build artifact svn:ignore items.
  1. … 7 more files in changeset.
Fix SVN-4776: Shelving: remove non-x-prefixed command aliases.

Remove the non-x-prefixed aliases such as 'svn shelve', leaving only the

'svn x-shelve' form, because this feature is experimental and the command-

line syntax for it is not yet stable.

* subversion/svn/svn.c

Remove the non-x-prefixed aliases of shelving subcommands.

* subversion/tests/cmdline/shelf_tests.py

Change all shelving subcommands to the x-prefixed forms.

* tools/client-side/bash_completion

(_svn): Change all shelving subcommands to the x-prefixed forms.

  1. … 2 more files in changeset.
Shelving: implement shelf diff summary mode.

"svn shelf-diff --summarize"

* subversion/include/private/svn_client_private.h,

subversion/libsvn_client/client.h,

subversion/libsvn_client/diff_summarize.c

(svn_client__get_diff_summarize_callbacks): Move from a private to a

semi-public header file. Remove 'const' from the output parameter.

* subversion/libsvn_client/diff.c

(svn_client_diff_summarize2,

svn_client_diff_summarize_peg2): Tweak to match that 'const' change.

* subversion/svn/cl.h,

subversion/svn/diff-cmd.c

(svn_cl__get_diff_summarize): Newly exposed API.

(svn_cl__diff): Use it.

* subversion/svn/shelf-cmd.c

(shelf_diff): Implement summary mode.

* subversion/svn/svn.c

(svn_cl__cmd_table): Add '--summarize' option to shelf-diff.

* subversion/tests/cmdline/shelf_tests.py

(shelf_diff_simple): Extend to test summary mode.

* tools/client-side/bash_completion

(_svn): Add '--summarize' option to shelf-diff.

  1. … 9 more files in changeset.
Follow-up to r1829012, handle macro correctly

* subversion/svn/help-cmd.c (svn_cl__help): handle macro correctly

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

(svn_min__help): same

  1. … 1 more file in changeset.
Follow-up to r1798004, fix informative output for Gnome Keyring with

libsecret

* subversion/svn/help-cmd.c (svn_cl__help): Print Gnome Keyring when

* using libsecret

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

(svn_min__help): same

  1. … 1 more file in changeset.
Viewspec: Add regression tests for 'svn-viewspec.py'.

Patch by: Paul Hammant <paul[_AT_]hammant.org>

modified by me

* tools/client-side/svn-viewspec.py

Prepare for testability: allow passing in a mock 'os.system' object, and

make main() externally callable.

* tools/client-side/svnviewspec_test.py

New file, for use with Python 'pytest'.

tools/client-side/svn-viewspec.py

(svn_path_compare_paths): Remove extraneous semicolons.

Revert a debug print accidentally added to svn-viewspec.py in r1827032.
Add 'schedule' and 'depth' items to 'svn info --show-item'.

* subversion/svn/info-cmd.c

(info_item_t,

info_item_map,

print_info_item): Add schedule and depth items.

* subversion/svn/svn.c

(svn_cl__options): Document them.

* tools/client-side/svn-viewspec.py

Accidentally add a debug print.

[This change reverted in r1827187.]

  1. … 2 more files in changeset.
Resolve some GCC "casting away 'const'" warnings.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_serialize): Keep 'const' in the existing cast.

* subversion/libsvn_fs_fs/index.c,

subversion/libsvn_fs_fs/load-index.c

(compare_p2l_entry_revision): Keep 'const' in the existing cast.

* subversion/libsvn_subr/x509info.c

(CONSTANT_PAIR): Keep 'const' in the existing cast.

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

(compare_mergeinfo): Keep 'const' in the existing cast.

  1. … 4 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.

    • ?
    ./svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
  1. … 7 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.

    • ?
    ./svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
  1. … 13 more files in changeset.
Shelving: new 'shelf-list-by-paths' command.

* subversion/svn/cl.h

(svn_cl__shelf_list_by_paths): New.

* subversion/svn/shelf-cmd.c

(targets_relative_to_wcs,

targets_relative_to_a_wc,

shelf_list_by_paths,

svn_cl__shelf_list_by_paths): New.

* subversion/svn/svn.c

(svn_cl__cmd_table): Describe the new command.

* tools/client-side/bash_completion

(_svn): Add the new command.

  1. … 3 more files in changeset.
Shelving: add 'svn unshelve --drop' option.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new 'drop' flag.

* subversion/svn/shelf-cmd.c

(svn_cl__shelf_unshelve): Drop after shelving, if successful.

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__options,

svn_cl__cmd_table,

sub_main): Add new 'drop' option.

* tools/client-side/bash_completion

(_svn): Add new 'drop' option.

  1. … 3 more files in changeset.
* tools/client-side/bash_completion

(_svn): Move '--editor-cmd' into the standard set of log-message options,

like it is in 'svn.c'.

Shelving: let 'shelve' and 'shelf-save' accept --with-revprop.

This is for consistency with other commands that take a log message, as in

principle there is nothing ultra-special about the log message property.

At present any non-log-message revprops are saved in the shelf but there are

only private APIs to retrieve them (svn_client__shelf_revprop_get, _list).

* subversion/include/svn_client.h,

subversion/libsvn_client/shelf.c

(svn_client_shelf_t): Add a comment.

(svn_client_shelf_set_log_message): Add revprops parameter.

* subversion/svn/shelf-cmd.c

(shelve,

shelf_shelve,

svn_cl__shelf_shelve): Pass the revprops through.

* subversion/svn/svn.c

(svn_cl__cmd_table): Let 'shelf-save' and 'shelve' accept the standard set

of log-message options which includes --with-revprop.

* tools/client-side/bash_completion

(_svn): Let 'shelf-save' and 'shelve' accept the standard set

of log-message options which includes --with-revprop.

  1. … 4 more files in changeset.
Make trunk run Shelving v2 by default.

Update the tests and Bash-completion from the 'shelve-checkpoint' branch.

Keep the v1 APIs and a compile-time option to use the v1 CLI.

* subversion/svn/svn.c

(WITH_SHELVE_V1): Undefine.

* subversion/tests/cmdline/getopt_tests_data/svn_help_stdout,

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

Update.

* subversion/tests/cmdline/shelf_tests.py

Rename from 'shelf_tests.py'.

(checkpoint_basic): New test.

(test_list): Run it.

* tools/client-side/bash_completion

(_svn): Update.

  1. … 5 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.

    • ?
    ./svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
  1. … 9 more files in changeset.
* tools/client-side/bash_completion: Add the 'svn shelves -q' option.

(That option is committed in the next revision, r1820047.)

* tools/client-side/bash_completion: Add the new '--password-from-stdin' option.
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.

    • ?
    ./svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
  1. … 9 more files in changeset.
Don't ignore error returns.

c: [skip]

Found by: danielsh

using tools/dev/warn-unused-result.sh

  1. … 7 more files in changeset.
* tools/client-side/bash_completion: Update the completions for 'svnadmin'.
* tools/client-side/bash_completion_test: Test completions for other svn

commands: svnadmin, svndumpfilter, svnlook, svnrdump, svnsync.

* tools/client-side/bash_completion_test: Refactor towards being able to test

completions for other svn commands such as 'svnadmin'.

* tools/client-side/bash_completion_test: Find the completion script in the

same directory, if not specified.

* tools/client-side/bash_completion: Fix spelling in comments.
* tools/client-side/bash_completion_test:

(get_svn_options): Detect options even if command has no non-global options.