Checkout Tools
  • last updated 2 hours ago
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.


subcommand_rev_size): New.

* subversion/include/private/svn_fs_fs_private.h




* 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



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.
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/

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,



(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_summarize_peg2): Tweak to match that 'const' change.

* subversion/svn/cl.h,


(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_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.
Shelving: new 'shelf-list-by-paths' command.

* subversion/svn/cl.h

(svn_cl__shelf_list_by_paths): New.

* subversion/svn/shelf-cmd.c




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




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,


(svn_client_shelf_t): Add a comment.

(svn_client_shelf_set_log_message): Add revprops parameter.

* subversion/svn/shelf-cmd.c



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/

Rename from ''.

(checkpoint_basic): New test.

(test_list): Run it.

* tools/client-side/bash_completion

(_svn): Update.

  1. … 5 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.
* tools/client-side/bash_completion: Update the completions for 'svnadmin'.
* tools/client-side/bash_completion: Fix spelling in comments.
* tools/client-side/bash_completion: Update.
Merge the 'shelve' branch to trunk (dropping BRANCH-README).
  1. … 11 more files in changeset.
* tools/client-side/bash_completion

(_svnadmin): Add the missing 'dump-revprops' and 'load-revprops' commands.

Tweak the help and add Bash completion for 'svnadmin dump --include/exclude'.

A follow-up to r1811992.


Note this enhancement.

* subversion/svnadmin/svnadmin.c

(options_table): Document the '--pattern' glob syntax, like r1783741 did

for svndumpfilter.

(cmd_table): Say more about exclude/include in the help for 'dump'.

(ary_prefix_match): Note that this...

* subversion/svndumpfilter/svndumpfilter.c

(ary_prefix_match): ... and this are duplicates.

* tools/client-side/bash_completion

(_svnadmin): Add the --exclude, --include and --pattern options.

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

(_svndumpfilter): Add the missing --pattern and --drop-all-empty-revs options.

Suggested by: ycdtosa

svnadmin: Introduce the `--normalize-props` option for the load and

load-revprops commands.

Currently, the only performed normalization is the automatic translation

of non-LF line endings in the svn: property values. Apparently, this is

a common issue reported by our users, as Subversion versions prior to 1.6

allowed such values for properties like svn:log and so they can be present

in the dump files. The behavior before this changeset is that a user can

either force loading the dump with such invalid properties using the

--bypass-prop-validation (that affects reading them in the future),

manually repair the dump file or use a tool like svnsync that performs

the property normalization. It would be better if the users had an option

to fix this right in the svnadmin load command.

See also the corresponding FAQ entry and related issues that have been

fixed in svnsync and svnrdump:

* subversion/include/svn_repos.h

(svn_repos_load_fs6): New version of svn_repos_load_fs5() accepting the

new `normalize_props` argument.

(svn_repos_load_fs5): Deprecate.

(svn_repos_load_fs_revprops): Accept the new `normalize_props` argument.

(svn_repos_get_fs_build_parser6): New version of

svn_repos_get_fs_build_parser5() accepting the new `normalize_props`


* subversion/include/private/svn_repos_private.h

(svn_repos__normalize_prop): New private helper. The `normalized_p`

argument will be currently unused by all calling sites, but it's added

as the groundwork to simplify implementing the notifications about

normalized properties in the future.

* subversion/libsvn_repos/deprecated.c

(svn_repos_load_fs5, svn_repos_get_fs_build_parser5): Implement by

forwarding to the new versions of these functions.

* subversion/libsvn_repos/fs-wrap.c

(): Include svn_subst.h.

(svn_repos__normalize_prop): Implement this new helper function.

The implementation is close to how svn_rdump__normalize_prop() is

written, but this function accepts two pools and handles the new

`normalized_p` output argument.

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

(struct parse_baton): Add new `normalize_props` field.

(change_rev_prop): Accept new `normalize_props` argument, call the

new helper function if it's set.

(close_revision): Normalize the revision properties if necessary.

(svn_repos_get_fs_build_parser6): New, replacing ...

(svn_repos_get_fs_build_parser5): ...this function.

(svn_repos_load_fs6): New, replacing ...

(svn_repos_load_fs5): ...this function.

(revprops_close_revision): Update call to change_rev_prop().

(build_revprop_parser): Accept new `normalize_props` argument, use it

to initialize the new field in the parse_baton.

(svn_repos_load_fs_revprops): Handle the new `normalize_props` argument

by forwarding it to build_revprop_parser().

* subversion/svnadmin/svnadmin.c

(svnadmin__cmdline_options_t, options_table): Add svnadmin__normalize_props.

(cmd_table): Enable the new option for load and load-revprops commands.

(struct svnadmin_opt_state): Add new `normalize_props` field and ...

(sub_main): ...initialize it here.

(subcommand_load, subcommand_load_revprops): Normalize properties when

running with --normalize-props. Use separate hints when encountering

invalid properties with non-LF line endings and all other kinds of

invalid properties.

* subversion/svnrdump/svnrdump.h

(svn_rdump__normalize_prop): Remove this declaration. This function is

now superseded by the new svn_repos__normalize_prop() helper.

* subversion/svnrdump/util.c

(): Include svn_repos_private.h, drop other includes.

(svn_rdump__normalize_prop): Remove. This function is now superseded

by the new svn_repos__normalize_prop() helper.

(svn_rdump__normalize_props): Use the new svn_repos__normalize_prop()

helper function.

* subversion/svnrdump/load_editor.c

(set_revision_property, set_node_property): Use the new

svn_repos__normalize_prop() helper function.

* subversion/tests/libsvn_repos/dump-load-test.c

(test_load_bad_props): Use the new svn_repos_load_fs6() function, keep

the previous behavior unchanged, i.e., do not normalize the properties.

* subversion/tests/cmdline/svntest/

(run_and_verify_load, load_repo): Accept new `normalize_props` argument.

* subversion/tests/cmdline/

(load_bad_props): Test loading with --normalize-props. Check for the error

codes reported during load with non-LF line endings and without the new

option. In cases when the load is successful, check the resulting

svn:log property value in the repository.

* tools/client-side/bash-completion

(_svnadmin): Extend completion info.

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

(_svn): Add some new-in-1.10 options to ls, lock, unlock and update.

Introduce `--file' option for svnadmin dump, dump-revprops, load and

load-revprops subcommands.

This option allows specifying input or output files, instead of using STDIN

or STDOUT. Using --file (-F) should probably work a bit faster, but, what

is more important, this option allows working with dump files in a shell

that performs additional processing when piping data and thus can silently

corrupt the dumps. For instance, that's how Microsoft PowerShell currently


* subversion/svnadmin/svnadmin.c

(options_table): Propagate existing description for -F ...

(cmd_table): Accept -F in the dump, dump-revprops, load

and load-revprops subcommands and provide corresponding description


(svnadmin_opt_state): Replace the `filedata' field with `file'.

(sub_main): Remember just the filename given with -F, instead of reading

and saving the content of that file to opt_state.

(subcommand_freeze): Open opt_state->file and parse its content if


(subcommand_dump, subcommand_dump_revprops): Open opt_state->file

or STDIN, depending on whether -F was specified. Overwrite existing

files to match the behavior of svnadmin dump > file.

(subcommand_load, subcommand_load_revprops): Open opt_state->file

or STDOUT, depending on whether -F was specified.

* subversion/tests/cmdline/

(dump_to_file, load_from_file): New tests.

(test_list): Add reference to new tests.

* tools/client-side/bash_completion

(_svnadmin): Extend completion info for `load' and `dump'.

  1. … 2 more files in changeset.
Introduce `--no-flush-to-disk' option for `svnadmin load'.

The option can be used to to dramatically speed up the load process when

there's no need to ensure that the resulting data survives a system crash

or power loss — e.g., when loading a dump into a fresh new repository.

This is one of the ideas in

(Subject: "Whiteboard -- topics list on the white board").

* subversion/include/svn_fs.h


* subversion/libsvn_fs_fs/fs.h

(fs_fs_data_t): Add `flush_to_disk' boolean field.

* subversion/libsvn_fs_fs/fs.с

(initialize_fs_struct): Initialize the new field.

* subversion/libsvn_fs_fs/fs_fs.c

(read_global_config): Set the new field based on what's in fs->config.

* subversion/libsvn_fs_fs/util.h

(svn_fs_fs__move_into_place): Accept a new `flush_to_disk' argument.

* subversion/libsvn_fs_fs/util.c

(svn_fs_fs__move_into_place): Make the flush optional based on the

new argument.

* subversion/libsvn_fs_fs/transaction.c

(get_and_increment_txn_key_body): Don't flush to disk if that's allowed.

(write_final_revprop): Accept a new `flush_to_disk' argument. Make the

flush optional based on the new argument.

(commit_body): Don't flush to disk if that's allowed. Adjust calls to

write_final_revprop() and svn_fs_fs__move_into_place().

* subversion/libsvn_fs_fs/revprops.c

(switch_to_new_revprop): Adjust the call to svn_fs_fs__move_into_place().

Keep the existing behavior and always flush to disk.

* subversion/svnadmin/svnadmin.c

(svnadmin__no_flush_to_disk): New enum value.

(options_table): Define --no-flush-to-disk option.

(cmd_table): Allow `load' to accept --no-flush-to-disk.

(svnadmin_opt_state): Add `no_flush_to_disk' member.

(open_repos): Move below the definition of svnadmin_opt_state. Accept

an svnadmin_opt_state structure as one of the arguments and initialize

the new SVN_FS_CONFIG_NO_FLUSH_TO_DISK option based on it.

(subcommand_crashtest, subcommand_deltify, subcommand_dump,

subcommand_dump_revprops, subcommand_load, subcommand_load_revprops,

subcommand_lstxns, subcommand_recover, subcommand_rmtxns, set_revprop,

subcommand_setuuid, subcommand_pack, subcommand_verify, subcommand_info,

subcommand_lock, subcommand_lslocks, subcommand_rmlocks,

subcommand_unlock): Adjust these callers of open_repos().

(main): Handle --no-flush-to-disk option.

* subversion/tests/cmdline/

(load_no_flush_to_disk): New test.

(test_list): Add reference to new test.

* tools/client-side/bash_completion

(_svnadmin): Add new option to `load'.

  1. … 10 more files in changeset.
Add -rN to "svnadmin lstxns" to skip the output of txns with a base

revision newer than rN. This makes it easier to remove obsolete txns.

* subversion/svnadmin/svnadmin.c

(cmd_table): Add 'r' to lstxns.

(subcommand_lstxns): Add an iterpool, get the base revision, use the

revision to restrict the output.

* tools/client-side/bash_completion

(_svnadmin): Add -r to lstxns.

  1. … 1 more file in changeset.
In 'bash_completion' implement much better URL completion.

See the dev@ email thread "bash_completion - subversion add: svn ls/merge

^/<remote path>", started by Christian Ferbar on 2015-08-12, archived at

e.g. <> or


Patch by: Christian Ferbar <chris{_AT_}>

(tweaked by me: removed a change in handling the SVN_BASH_COMPL_EXT env var)

* tools/client-side/bash_completion

(_svn_lls): Add a comment noting brokenness.

(_svn_complete_target): New.

(_svn): Use _svn_complete_target() to complete URLs for merge, mergeinfo,

checkout, list. Add a comment noting brokenness.

* tools/client-side/bash_completion

(_svn): Complete arguments to svn info --show-item.

Patch by: Andreas Stieger <andreas.stieger{_AT_}>

(tweaked by me)

* tools/client-side/bash_completion

(_svn): Suppress a trailing space when completing to a partial URL.

* tools/client-side/bash_completion (_svn): Update trust options.

tools/client-side/bash_completion (_svn): Add -r to status
* tools/client-side/bash_completion: Allow --show-item and --no-newline with 'info'.

* tools/client-side/bash_completion

(_svn): Stop offering deprecated options.

* tools/client-side/bash_completion_test: Don't expect deprecated

options or --help for help.

  1. … 1 more file in changeset.
* tools/client-side/bash_completion (_svn): Add --pin-externals.