Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename a bunch of 'main.c' files to more descriptive names. Naming

consistency is a good thing, and in this case, moving towards

consistently unique-but-obvious names as opposed to towards 'main.c'

uniformity helps, at a minimum, Emacs users whose buffer names are

generally shown as "main.c", "main.c<2>", "main.c<3>", etc.

* subversion/svn/main.c

Rename this...

* subversion/svn/svn.c

...to this.

* subversion/svnadmin/main.c

Rename this...

* subversion/svnadmin/svnadmin.c

...to this.

* subversion/svndumpfilter/main.c

Rename this...

* subversion/svndumpfilter/svndumpfilter.c

...to this.

* subversion/svnlook/main.c

Rename this...

* subversion/svnlook/svnlook.c

...to this.

* subversion/svnserve/main.c

Rename this...

* subversion/svnserve/svnserve.c

...to this.

* subversion/svnsync/main.c

Rename this...

* subversion/svnsync/svnsync.c

...to this.

* subversion/svnversion/main.c

Rename this...

* subversion/svnversion/svnversion.c

...to this.

* tools/client-side/svn-bench/main.c

Rename this...

* tools/client-side/svn-bench/svn-bench.c

...to this.

* tools/dev/svnraisetreeconflict/main.c

Rename this...

* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c

...to this.

  1. … 17 more files in changeset.
Rather than continue the trend of accumulating new --pre-X.Y-compatible

options to 'svnadmin create', make use of the new version parsing and

comparison private functions to add a single new option that should

work henceforth.

* subversion/svnadmin/main.c

(svnadmin__cmdline_options_t): Add 'svnadmin__compatible_version' value;

remove 'svnadmin__pre_1_8_compatible'.

(options_table): Add record for new --compatible-version option, and

remove the one for --pre-1.8-compatible. Deprecate the

--pre-1.4-compatible, --pre-1.5-compatible, and --pre-1.6-compatible

options.

(cmd_table): Teach 'svnadmin create' to accept --compatible-version

(and to stop accepting --pre-1.8-compatible).

(svnadmin_opt_state): Trade 'pre_1_8_compatible' member for a new

'compatible_version' one.

(subcommand_create, sub_main): Add handling for --compatible-version;

drop handling for --pre-1.8-compatible.

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

(create_repos): Now pass the --compatible-version to 'svnadmin

create'; this matches the flexibility of the --server-minor-version

test harness option.

Suggested by: rhuijben

  1. … 1 more file in changeset.
Remove layering violation introduced in r1400498. We simply add a

special value ("2") to the "cache revprops" config setting. When

set to this value, it will cause FSFS to enable revprop caching iff

we the required infrastructure is also available.

* subversion/include/svn_fs.h

(SVN_FS_CONFIG_FSFS_CACHE_REVPROPS): document extended value range

* subversion/libsvn_fs_fs/caching.c

(read_config): add handling for option value "2"

* subversion/svnadmin/main.c

(open_repos): use extended option value

  1. … 2 more files in changeset.
On systems without efficient 64 bit atomics, svnadmin should not attempt

to enable revprop caching because FSFS will reject it and log a warning.

svnadmin writes the latter to stderr - which confuses our tests.

* subversion/svnadmin/main.c

(open_repos): enable revprop caching only if efficient

Implement 'svnadmin freeze REPOS_PATH PROGRAM [ARG...]'.

* subversion/include/svn_repos.h

(svn_repos_freeze): New.

* subversion/libsvn_repos/repos.c

(svn_repos_freeze): New.

* subversion/include/svn_fs.h

(svn_fs_freeze): New.

* subversion/libsvn_fs/fs-loader.h

(struct fs_vtable_t): Add freeze.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_freeze): New.

* subversion/libsvn_fs_base/fs.c

(base_bdb_freeze): New.

(fs_vtable): Add base_bdb_freeze.

* subversion/libsvn_fs_fs/fs.c

(struct fs_freeze_baton_t, fs_freeze_body, fs_freeze): New.

(fs_vtable): Add fs_freeze.

* subversion/libsvn_fs_fs/rep-cache.h

(svn_fs_fs__lock_rep_cache): New.

* subversion/libsvn_fs_fs/rep-cache.c

(svn_fs_fs__lock_rep_cache): New.

* subversion/libsvn_fs_fs/rep-cache-db.sql

(STMT_LOCK_REP): New.

* subversion/svnadmin/main.c

(cmd_table): Add freeze command.

(freeze_body, subcommand_freeze): New.

  1. … 10 more files in changeset.
Expand "svn --version" output with information about the running system

when --verbose is also given on the command line. Currently available:

- Minimal running system info on systems with uname().

- System info and commercial release name on Windows.

* build.conf (libsvn_subr): Require kernel32.lib on Windows.

* configure.ac: Check for uname() in sys/utsname.h.

* subversion/include/svn_opt.h (svn_opt_print_help4): New, with verbose option.

(svn_opt_print_help3): Deprecate.

* subversion/libsvn_subr/sysinfo.c, subversion/libsvn_subr/sysinfo.h: New.

* subversion/libsvn_subr/opt.h (svn_opt__print_version_info): Add "verbose".

* subversion/libsvn_subr/opt.c: Include sysinfo.h.

(svn_opt__print_version_info): In verbose mode, print svn_sysinfo__*.

(svn_opt_print_help4): Implement.

(svn_opt_print_help3): Remove.

* subversion/libsvn_subr/deprecated.c

(svn_opt_print_help3, svn_opt_print_help3): Reimplenment in terms of

svn_opt_print_help4.

(svn_opt_print_help): Update call to svn_opt__print_version_info.

* subversion/svn/main.c: Add --verbose option to "svn --version".

* subversion/svnlook/main.c: Add --verbose option to "svn --version".

Use svn_opt_print_help4 instead of svn_opt_print_help3.

* subversion/svn/help-cmd.c, subversion/svnadmin/main.c,

subversion/svndumpfilter/main.c, subversion/svnmucc/svnmucc.c,

subversion/svnrdump/svnrdump.c, subversion/svnserve/main.c,

subversion/svnsync/main.c, subversion/svnversion/main.c,

tools/dev/svnraisetreeconflict/main.c,

tools/server-side/svn-rep-sharing-stats.c:

Use svn_opt_print_help4 instead of svn_opt_print_help3.

  1. … 19 more files in changeset.
* subversion/svn/main.c,

subversion/svnadmin/main.c

(sub_main): Adjust white space following r1368252.

  1. … 1 more file in changeset.
Factor out some of the error and pool handling in the main() functions of

svn and svnadmin. Create and destroy the pool exactly once, in the outer

function, instead of destroying it at every return statement -- where,

inevitably, some were missed (at the three places where we were calling

svn_handle_error2(...TRUE...), specifically).

We should probably do the same for the other svn* executables too.

* subversion/svnadmin/main.c,

subversion/svn/main.c

(EXIT_ERROR): New macro.

(SVN_INT_ERR): Redefine this public macro name to suppress error messages

about writing to a broken pipe, and (in svnadmin only) to report the

program name as 'svnadmin' instead of 'svn'.

(sub_main): New name for the body of main(). Use SVN_INT_ERR and SVN_ERROR

to simplify error handling.

(main): Extract everything except the initialization of the application

and of the top-level pool, and the destruction of that pool, into the

new function sub_main(), and call that.

  1. … 1 more file in changeset.
* subversion/svnadmin/main.c

(subcommand_crashtest): Move this function higher up with the other

subcommand functions, so that main() comes last as usual.

Simplify error handling by calling an existing subroutine.

* subversion/svnadmin/main.c,

subversion/svn/main.c

(main): Use svn_cmdline_handle_exit_error().

  1. … 1 more file in changeset.
Tweak white space around uses of 'SVN_VERSION_DEFINE' macro which declares a

variable and so should be grouped as a declaration rather than a statement.

* subversion/svnadmin/main.c,

subversion/svndumpfilter/main.c,

subversion/svnlook/main.c,

subversion/svn/main.c,

subversion/svnserve/main.c,

subversion/svnsync/main.c,

subversion/svnversion/main.c,

tools/dev/svnraisetreeconflict/main.c,

tools/server-side/svn-rep-sharing-stats.c,

contrib/client-side/svn-push/svn-push.c

(check_lib_versions): Group SVN_VERSION_DEFINE with the declarations.

* subversion/svnmucc/svnmucc.c

(init): Same.

  1. … 10 more files in changeset.
Before bumping the FSFS format, add a pre-1.8 compatibility option

to svnadmin create.

* subversion/include/svn_fs.h

(SVN_FS_CONFIG_PRE_1_8_COMPATIBLE): new config flag

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__create): create format 4 FSFS for pre-1.8 compatibility

* subversion/svnadmin/main.c

(svn_opt_subcommand_t,

svnadmin__cmdline_options_t,

options_table): add pre-1.8 compatibility option

(cmd_table,

subcommand_create,

main): support the new option

  1. … 2 more files in changeset.
Use svn_stream_puts() instead of svn_stream_printf() to write raw string.

* subversion/libsvn_delta/debug_editor.c

* subversion/libsvn_diff/diff_file.c

* subversion/libsvn_diff/diff_memory.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_ra/debug_reporter.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_subr/hash.c

* subversion/svn/blame-cmd.c

* subversion/svn/log-cmd.c

* subversion/svnadmin/main.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

(write_indent, output_conflict_with_context, svn_fs_fs__write_noderev,

rep_write_contents_close, write_hash_rep, finish_report, abort_report,

dump_node, hash_write, blame_receiver, log_entry_receiver,

repos_notify_handler, do_dump_props, do_dump_newlines, close_file,

replay_revstart, dump_revision_header): Use svn_stream_puts().

  1. … 11 more files in changeset.
SvnAdmin should always have revprop caching enabled such that

the infrastructure is being set up to notify *other* processes of

changes done by e.g. setrevprop.

Even if the revprop update infrastructure fails for some reason,

the impact on svnadmin is low because it imposes a small overhead

for some operations but the process will always see its own changes.

Foreign changes may or may not become visible to the tool while

it is running -- just as today.

* subversion/svnadmin/main.c

(open_repos): enable revprop caching

Merge all changes (-r1298521-1326293) from branches/revprop-cache to trunk

and resolve minor conflicts.

  1. … 25 more files in changeset.
Replace the allocator creation & initialization boilerplate code

with a call to our new API.

* subversion/svn/main.c

* subversion/svnadmin/main.c

(main): use new API

* subversion/svndumpfilter/main.c

(main): use new API

* subversion/svnlook/main.c

(main): use new API

* subversion/svnrdump/svnrdump.c

(main): use new API

* subversion/svnserve/main.c

(main): use new API

* subversion/svnsync/main.c

(main): use new API

* subversion/svnversion/main.c

(main): use new API

* subversion/tests/svn_test_main.c

(main): use new API, be thread-safe (just in case)

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

(init): use new API

* tools/dev/svnraisetreeconflict/main.c

(main): use new API

* tools/server-side/svn-rep-sharing-stats.c

(main): use new API

  1. … 11 more files in changeset.
Purge trailing whitespace, in the spirit of r1138109.

  1. … 97 more files in changeset.
* subversion/svnadmin/main.c

(cmd_table.subcommand_lock): Don't abbreviate hook names.

* subversion/svnadmin/main.c

(cmd_table.subcommand_unlock): Don't abbreviate hook names.

Finish issue #4092 ("Add 'svnadmin unlock' subcommand which provides a

lock token for unlock validation").

* subversion/svnadmin/main.c

(cmd_table): Add new "unlock" function.

(subcommand_unlock): New function.

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

(get_pre_unlock_hook_path): New function.

* subversion/tests/cmdline/svnadmin_tests.py

(locking): Expand testing to cover uses of 'svnadmin unlock'.

  1. … 2 more files in changeset.
* subversion/svnadmin/main.c

(subcommand_lock): Avoid the creation of an unnecessary subpool.

More cleanups in and around the 'svnadmin lock' subcommand code.

* subversion/svnadmin/main.c

(cmd_table): Mention --bypass-hooks in 'lock' subcommand usage

string.

(subcommand_lock): Wrap path in 'lock' output in quotes.

* subversion/tests/cmdline/svnadmin_tests.py

(locking): Expect paths in 'lock' output to be wrapped in quotes,

and continue genericizing the error output regexps to mention only

the error code.

  1. … 1 more file in changeset.
Fix issue #3942 ("Provide new subcommand on svnadmin to create a

lock") by adding said subcommand. The new subcommand supports the

following syntax:

svnadmin lock REPOS PATH USERNAME COMMENT-FILE [TOKEN]

The command locks the PATH by USERNAME setting comment from

COMMENT-FILE. If the optional TOKEN is given then it is used as lock

token. If --bypass-hooks options is passed then bypass the repository

hook system.

* subversion/svnadmin/main.c

(svn_opt_subcommand_t): New subcommand.

(svn_opt_subcommand_desc2_t): Add description.

(subcommand_lock): New function, implementing the subcommand.

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

(get_pre_lock_hook_path): New function.

* subversion/tests/cmdline/svnadmin_tests.py

(lock): New test for 'lock' subcommand.

Patch by: Noorul Islam K M <noorul@collab.net>

  1. … 2 more files in changeset.
Tweak help text.

* subversion/svnadmin/main.c

(subcommand_hotcopy): As above.

New and improved implementation of 'hotcopy' for FSFS.

This is based on the old implementation, adds support for cancellation,

supports an incremental hotcopy mode (addresses issue #3815, "incremental

hotcopy, fsfs-only"), has better input parameter verification, and always

uses absolute paths internally (if called from the repos layer).

The incremental mode is invoked via "svnadmin hotcopy --incremental".

In incremental mode, only files which are new or have changed in type

(e.g. file->symlink), size, or mtime since the last hotcopy are copied

to the destination. This mode supports writing to existing hotcopies of

the repository. Before copying it verifies that the UUID of the destination

matches the UUID of the source, that the destination has no newer revisions

than the source, and that the filesystem format and configuration of the

source and destination are equal.

It also removes stale locks from the destination (by removing all locks

from the destination and then copying all locks from source to

destination -- this is racy and may need to be revisited).

Performance improvements of incremental mode seem to be quite significant.

Copying the ASF repository (a copy from r0 to r421895, about 15GB in size),

using the original hotcopy implementation, took about 150 minutes (source and

destination residing on the same disk volume of a software RAID1 configuration

on an OpenBSD FFS2 filesystem with softupdates disabled).

A subsequent incremental copy that doesn't copy any changed files from source

to destination completes in about 2 minutes.

Behaviour of the non-incremental mode is affected slightly. It still

refuses to copy to an existing destination. However, readers can peek

at the destination filesystem while the hotcopy is in progress and

see newer revisions appearing as the hotcopy progresses.

This change was made to avoid having two separate implementations of

hotcopy in FSFS, one for incremental and one for non-incremental mode.

A write lock is now always held on the destination while a hotcopy

is in progress. In the old implementation it was possible for a client

to commit to the destination while a hotcopy was in progress, racing

the hotcopy operation.

The BDB hotcopy implementation is not affected, except that it throws

an error if incremental hotcopy mode is requested. Cancellation support

is only added at the API level of the BDB implementation in this commit,

but is not actually implemented.

With lots of suggestions from danielsh, thanks.

* subversion/svnadmin/main.c

(options_table): Adjust description of --incremental option.

(cmd_table): Update help text of 'svnadmin hotcopy'.

(subcommand_hotcopy): Call svn_repos_hotcopy2().

* subversion/include/svn_fs.h

(svn_fs_hotcopy2): Declare.

* subversion/include/svn_repos.h

(svn_repos_hotcopy2): Declare.

* subversion/libsvn_fs_fs/fs.c

(fs_hotcopy): Adjust for new vtable 'hotcopy' prototype, adding source

and destination filesystem parameters (instead of just their paths),

the new 'incremental' parameter, and a cancellation function.

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__hotcopy): Moved down to the near the bottom of this file and

mostly reimplemented.

(hotcopy_io_dir_file_copy, entry_name_to_utf8,

hotcopy_io_copy_dir_recursively): New helpers. Based on similar functions

in libsvn_subr/io.c.

(hotcopy_copy_shard_file, hotcopy_copy_packed_shard, hotcopy_update_current,

hotcopy_remove_rev_files, hotcopy_incremental_check_preconditions,

hotcopy_create_empty_dest): New helpers.

(hotcopy_body_baton, hotcopy_body): New. This function contains those

parts of the hotcopy code which run with the FSFS write-lock held on

the destination filesystem.

* subversion/libsvn_fs_fs/fs_fs.h

(svn_fs_fs__hotcopy): Update declaration, adding parameters for source

and destination filesystem, a boolean to enabled incremental mode,

and cancellation support.

* subversion/libsvn_fs/fs-loader.h

(fs_library_vtable_t): Update declaration of 'hotcopy' as in previous.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_hotcopy2): New. Adds support for incremental mode and cancellation.

* subversion/tests/cmdline/svnadmin_tests.py

(hotcopy_incremental, test_list): New, fairly simple, test. The hotcopy

tests are currently few in number. None of the existing and new tests

verify the complete result of the hotcopy but run 'svnadmin dump' on

the destination after the hotcopy operation. This doesn't verify if all

files in the repository were copied correctly (rings a bell wrt r905303).

These deficiencies in testing will be addressed in a later commit.

* subversion/libsvn_fs_base/fs.c

(base_hotcopy): Change signature in accordance with API changes made above.

But don't change the implementation. Refuse to operate in incremental mode.

* subversion/libsvn_repos/repos.c

(hotcopy_ctx_t): Add new parameters for incremental mode and cancellation.

(hotcopy_structure): Add cancellation support. Tolerate existing destination

directory in incremental hotcopy mode.

(svn_repos_hotcopy2): Add support for cancellation and incremental mode.

Convert input source and destionation paths to absolute paths.

Verify that source and destination parameters are different directories.

Apart from the general hilarity of copying things onto themselves this

avoids a dead-lock when trying to hotcopy the rep-cache sqlite db onto

itself. Tolerate some existing directories in incremental mode.

(svn_repos_hotcopy): Reimplement as wrapper around svn_repos_hotcopy2().

  1. … 10 more files in changeset.
Reintegrate integrate-string-improvements branch into /trunk.
  1. … 83 more files in changeset.
Finish issue #3734 ('Add revision-based filtering to the dumpstream

load functionality'). Add support for the --revision (-r) option for

'svnadmin load' to facilitate incremental loads.

* subversion/include/svn_repos.h

(svn_repos_notify_action_t): Add 'svn_repos_notify_load_skipped_rev'

enum value.

(svn_repos_load_fs4, svn_repos_get_fs_build_parser4): New versions

of these APIs which add 'start_rev' and 'end_rev' parameters.

(svn_repos_load_fs3, svn_repos_get_fs_build_parser3): Deprecate.

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

(struct parse_baton): Add 'start_rev' and 'end_rev' members.

(struct revision_baton): Add 'skipped' member.

(new_revision_record): Don't create a transaction when skipping

revisions, but do notify about the skip.

(new_node_record, set_revision_property, set_node_property,

delete_node_property, remove_node_props, apply_textdelta,

set_fulltext, close_node, close_revision): Don't make any real FS

changes if we're skipping the current revision.

(svn_repos_load_fs4): Was svn_repos_load_fs3(). Add 'start_rev' and

'end_rev' parameters. Update call to svn_repos_get_fs_build_parser4().

(svn_repos_get_fs_build_parser4): Was svn_repos_get_fs_build_parser3().

Add 'start_rev' and 'end_rev' parameters, which are validated and

then stuff into the parse_baton.

* subversion/libsvn_repos/deprecated.c

(svn_repos_load_fs3): New wrapper around svn_repos_load_fs4().

(svn_repos_get_fs_build_parser3): New wrapper around

svn_repos_get_fs_build_parser4().

* subversion/svnadmin/main.c

(cmd_table): Cause the 'load' command to also accept the --revision (-r)

option.

(repos_notify_handler): Handle the svn_repos_notify_load_skipped_rev

notification, too.

(optrev_to_revnum): New helper function.

(subcommand_load): Handle revision options now with an updated call

to svn_fs_load_fs4().

* subversion/tests/cmdline/svnadmin_tests.py

(load_ranges): New test.

(test_list): Add reference to new test.

  1. … 4 more files in changeset.
Revert r1166096 and r1166098.
  1. … 2 more files in changeset.
[ Reverted in r1166183 ]

Teach the svn_repos_notify_* interface to say "I won't repeat this warning

in the future".

* subversion/include/svn_repos.h

(svn_repos_notify_t): New member LAST_WARNING.

* subversion/svnadmin/main.c

(repos_notify_handler): Consume new member.

  1. … 1 more file in changeset.
Pre-branch trailing whitespace cleanup.

* subversion/include/svn_client.h,

* subversion/include/svn_types.h,

* subversion/libsvn_delta/svndiff.c,

* subversion/libsvn_fs_fs/caching.c,

* subversion/libsvn_subr/cache-membuffer.c,

* subversion/libsvn_subr/hash.c,

* subversion/libsvn_subr/svn_base64.c,

* subversion/libsvn_wc/adm_crawler.c,

* subversion/libsvn_wc/status.c,

* subversion/libsvn_wc/workqueue.c,

* subversion/mod_dav_svn/reports/update.c,

* subversion/svnadmin/main.c,

* subversion/tests/cmdline/info_tests.py,

* tools/dist/release.py,

* win-tests.py:

Trim trailing whitespace.

  1. … 14 more files in changeset.