Checkout Tools
  • last updated 7 hours ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1504951 is being indexed.

Make svnadmin load really atomic by adding option to

svn_fs_commit_txn2 to disable updating 'svn:date' revision property after

committing transaction.

* subversion/include/svn_fs.h

(svn_fs_commit_txn2): New. Revv svn_fs_commit_txn() and add new

SET_TIMESTAMP argument to disable setting 'svn:date' in FS layer.

* subversion/libsvn_fs/fs-loader.h

* subversion/libsvn_fs/fs-loader.c

(svn_fs_commit_txn2): Revv svn_fs_commit_txn() and pass set_timestamp

argument to commit vtable method.

(svn_fs_commit_txn): Call svn_fs_commit_txn2() with SET_TIMESTAMP=TRUE.

* subversion/libsvn_fs_base/dag.h

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__dag_commit_txn): Add SET_TIMESTAMP argument and update

'svn:date' revision property only if SET_TIMESTAMP is non-zero.

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_base/tree.h

(commit_args): Add SET_TIMESTAMP member.

(txn_body_commit): Pass SET_TIMESTAMP to svn_fs_base__dag_commit_txn().

(svn_fs_base__commit_txn): Add SET_TIMESTAMP argument and store it in

commit baton.

* subversion/libsvn_fs_fs/fs_fs.h

* subversion/libsvn_fs_fs/fs_fs.c

(commit_baton): Add SET_TIMESTAMP member.

(commit_body): Update 'svn:date' revision property only if SET_TIMESTAMP

is non-zero.

(svn_fs_fs__commit): Add SET_TIMESTAMP argument and store it in commit


* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/tree.h

(svn_fs_fs__commit_txn): Add SET_TIMESTAMP argument and pass it to


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

(close_revision): Use svn_fs_commit_txn2() and do not fix-up 'svn:date'

property after commit.

  1. … 11 more files in changeset.
Speedup svnadmin load by settings revision properties in one FS call.

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

(revision_baton): Add REVPROPS member.

(make_revision_baton): Initialize REVPROPS member in revision baton.

(set_revision_property): Store revision property changes in REVPROPS array.

(close_revision): Apply revision property changes using one FS call.

Follow-up to r1464137:

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

(close_revision): Remove an unneeded initialization.

Avoid parsing the hooks-env file multiple times for closely-knit hook

invocations, specifically the pre-/post- pairs for commit, revprop

change, lock, and unlock operations.

* subversion/libsvn_repos/repos.h,

* subversion/libsvn_repos/hooks.c

(svn_repos__parse_hooks_env): Was parse_hooks_env().









svn_repos__hooks_post_unlock): Add 'hooks_env' parameter, used now

instead of calling parse_hooks_env() from within.

* subversion/libsvn_repos/commit.c

(complete_cb, svn_repos__get_commit_ev2): Call

svn_repos__parse_hooks_env(), and update calls to hook wrapper


* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_commit_txn, svn_repos_fs_begin_txn_for_commit2,

svn_repos_fs_change_rev_prop4, svn_repos_fs_lock, svn_repos_fs_unlock):

Call svn_repos__parse_hooks_env(), and update calls to hook wrapper


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

(close_revision): Call svn_repos__parse_hooks_env(), and update

calls to hook wrapper functions.

  1. … 4 more files in changeset.
Remove some docstring ambiguity, and leave a comment with a suggestion

for a possible future change of behavior.

* subversion/include/svn_repos.h

(svn_repos_load_fs4, svn_repos_get_fs_build_parser4): Remove @note

about what might happen when filtering by revision range. Current

behavior exactly matches the most naive interpretation of the

remaining docstrings anyway.

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

(new_revision_record): Leave a comment about a different way we

could handle out-of-range revisions.

  1. … 1 more file in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

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

* subversion/libsvn_repos/load.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

  1. … 13 more files in changeset.
Add an 'svn_rangelist_t' typedef for use with the existing 'svn_rangelist_*'

APIs, instead of using 'apr_array_header_t' directly.

The immediate reason is to improve the debugging experience: I can make

GDB display 'svn_rangelist_t' values in a simple human-readable form, whereas

the best it can do with 'apr_array_header_t', not knowing the type of the

elements, is print something like 'array of 2 items'.

Beyond that, it makes sense from a coding abstraction point of view, filling

a gap in this hierarchy:

svn_mergeinfo_catalog_t is a collection of

svn_mergeinfo_t is a collection of

svn_rangelist_t is a collection of


This type has public visibility. Because it is just a typedef, the C API

will be backward-compatible and the ABI won't change. Therefore all uses,

even in deprecated functions, are being changed.

Using such a typedef doesn't provide any additional static type-checking.

Unlike svn_mergeinfo_t and svn_mergeinfo_catalog_t, svn_rangelist_t is not a

pointer type.

* subversion/include/svn_mergeinfo.h

(svn_rangelist_t): New typedef.

(...everywhere...): Use it.

* subversion/include/private/svn_mergeinfo_private.h

(...everywhere...): Use it.

* subversion/include/svn_client.h

(svn_client_mergeinfo_get_merged): Update doc string to refer to this.

* subversion/bindings/javahl/native/CreateJ.cpp,






(...everywhere...): Update the bindings.















(...everywhere...): Use it.

  1. … 22 more files in changeset.
Accept dump format v3, except for property deltas, in svndumpfilter.

Replace the hardcoded version number ("2") with a parser callback for

the dump file format version number. Used by svndumpfilter only (so


Add an API option to treat text-deltas as text instead of applying

them. TRUE for svndumpfilter only.

* subversion/tests/cmdline/

(with_deltas): New test.

(test_list): Add the test.

* subversion/tests/cmdline/svndumpfilter_tests_data/simple_v3.dump

New file.

* subversion/include/svn_repos.h

(magic_header_record): New callback declaration.

(svn_repos_parse_fns3_t): Add the new callback declaration.

(svn_repos_parse_dumpstream3): Add the text-delta option.

* subversion/libsvn_repos/load.c

(parse_format_version): While we're here, put the "output" argument


(svn_repos_parse_dumpstream3): Implement the text-delta-as-text option.

Pass the format version to the new callback. Don't reject v3 dumpfiles


* subversion/svndumpfilter/main.c

(magic_header_record): New callback.

(svn_repos_parse_fns3_t): Add the new callback.

(parse_baton_initialize): Remove the hard-coded format-version output.

(do_filter): Treat text-deltas as text.

* subversion/svnrdump/load_editor.c

(magic_header_record): New callback.

(svn_rdump__load_dumpstream): Use the new callback.

* subversion/libsvn_repos/deprecated.c

(fns3_from_fns2): Set the new callback.

(svn_repos_get_fs_build_parser3): Add the text-delta option.

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

(magic_header_record): New callback.

(svn_repos_get_fs_build_parser4): Use the new callback.

(svn_repos_load_fs4): Add the text-delta option.

  1. … 7 more files in changeset.
Make a small change in that should have been part of r1350545.

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

(svn_repos_load_fs4): Upgrade a local variable to a new type.

Prepare to handle dump format v3 in svndumpfilter.

This revision sets up the boilerplate for backward compatibility.

Later revisions will add a new parser callback for the version number,

and a new option to allow treating text-deltas as text (instead of

applying them immediately).

* subversion/include/svn_repos.h

(svn_repos_parse_fns3_t): New struct. Tweak the callback declarations

to reflect the usual ordering in dump files.

(svn_repos_parse_dumpstream3): New API using the new struct. No

real changes yet.

(svn_repos_get_fs_build_parser4): Modify this new-in-1.8 function to

use the new struct.



svn_repos_get_fs_build_parser3): Deprecate.

(svn_repos_get_fs_build_parser2): Move below below the newly-

deprecated svn_repos_parse_fns2_t declaration.

* subversion/svndumpfilter/main.c


do_filter): Use the new API.

* subversion/svnrdump/load_editor.c

(svn_rdump__load_dumpstream): Use the new API.

* subversion/libsvn_repos/deprecated.c


fns3_from_fns2): New functions.

(svn_repos_get_fs_build_parser3): Use the new API.

* subversion/libsvn_repos/load.c



svn_repos_parse_dumpstream3): Use the new API.

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


svn_repos_load_fs4): Use the new API.

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

  1. … 97 more files in changeset.
* subversion/libsvn_repos/load-fs-vtable.c

(new_revision_record): If we're going to cast the result, let's cast the


Teach post-commit hooks to receive the txn name.

The txn name is already passed to the pre-commit hook, so this allows the

pre-commit and post-commit hook to easily pass state.

(An svn_fs_* API to answer "What txn did a <given revision> originate in?"

would be easy to implement for FSFS f3 and newer and for BDB, but is beyond

the scope of this commit.)

Suggested by: Trent Nelson <>

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_commit_txn): Pass TXN_NAME to the post-commit hook.

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

(close_revision): Reorganize code to pass TXN_NAME to the post-commit hook.

* subversion/libsvn_repos/repos.c

(create_hooks): Add the new paramater to the hook template.

* subversion/libsvn_repos/repos.h

(svn_repos__hooks_post_commit): Grow TXN_NAME parameter.

* subversion/libsvn_repos/hooks.c

(svn_repos__hooks_post_commit): Grow TXN_NAME parameter, and pass it

to the child's argv.

  1. … 4 more files in changeset.
Fix a case of reversed logic.

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

(change_rev_prop): Use a libsvn_repos wrapper function if property

validation is required, its libsvn_fs counterpart otherwise; not

the reverse.

Patch by: Vijayaguru G <vijay{_AT_}>

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

(delete_node_property): Don't crash trying to delete properties in skipped


Reported by: Trent Nelson

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

(apply_textdelta, set_fulltext): When skipping revisions, make sure

to initialize output parameters to NULL before returning. Else, callers

might try to use the returned window handler, or stream, respectively,

and crash.

Reported by: Trent Nelson

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


* subversion/svnadmin/main.c

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


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

(load_ranges): New test.

(test_list): Add reference to new test.

  1. … 4 more files in changeset.
* subversion/libsvn_repos/load-fs-vtable.c

(renumber_mergeinfo_revs): Use svn_mergeinfo_merge2().

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

(renumber_mergeinfo_revs): Point to its duplicate,


Merge r1144017 from the revprop-packing branch, as that revision

was intended for trunk:

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

(prefix_mergeinfo_paths): Point to the duplicate of this function in svnrdump.

  1. … 8 more files in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 more files in changeset.
The semi-annual trailing whitespace cleansing ritual.

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`


  1. … 144 more files in changeset.
* subversion/libsvn_repos/load-fs-vtable.c,

* subversion/svnrdump/load_editor.c

Drop in some comment pointers to issue #3903.

  1. … 1 more file in changeset.
Simplify some code in the generic FS loader vtable, in the same

fashion that I did for 'svnrdump load' in r1128138. This should allow

us to more easily rework the storage mechanism for the revision

mapping later without having to revisit all the consumers thereof.

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

(set_revision_mapping, get_revision_mapping): New helpers.

(renumber_mergeinfo_revs, maybe_add_with_history, close_revision):

Use set_revision_mapping() and get_revision_mapping() instead of

peeking and poking directly into the revision mapping hash.

Make more extensive use of svn_checksum_mismatch_err(). In addition to

improving code reuse, this has the benefit of reducing the amount of translator

effort and eliminating a number of "format is not a string literal" warnings.

* subversion/libsvn_fs_base/tree.c



(svn_fs_base__rep_contents, txn_body_read_rep),



















Use svn_checksum_mismatch_err() where appropriate.

* subversion/tests/cmdline/

(basic_corruption): Update expected error code.

  1. … 11 more files in changeset.
Continue saving the Universe from deprecated svn_path_* API usage.

* subversion/libsvn_repos/delta.c

(svn_repos_dir_delta2, delta_dirs): Replace uses of deprecated

svn_path_* APIs.

* subversion/libsvn_repos/dump.c

(struct edit_baton, struct dir_baton): Tweak comments to indicate

some path types.

(make_dir_baton, open_file, open_directory, verify_directory_entry,

dump_node): Replace uses of deprecated svn_path_* API functions

and other string manipulations in favor of svn_relpath_* work.

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

(struct parse_baton): Document a path type.

(prefix_mergeinfo_paths, make_node_baton): Replace uses of

deprecated svn_path_* APIs.

(set_node_property): Remove unnecessary convenience variable.

(svn_repos_get_fs_build_parser3): Canonicalize 'parent_dir'.

* subversion/libsvn_repos/node_tree.c

(find_real_base_location): Replace uses of deprecated svn_path_* APIs.

* subversion/libsvn_repos/rev_hunt.c

(svn_repos__prev_location): Replace uses of deprecated svn_path_* APIs.

  1. … 4 more files in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`


  1. … 166 more files in changeset.
Have all remaining calls of svn_fs_commit_txn() and

svn_repos_fs_commit_txn() use the contract that a commit was

successful if the returned revision is a valid revision number. The

returned error, if any, is no longer used as an indication of commit


* subversion/mod_dav_svn/version.c



Use revision number returned from svn_repos_fs_commit_txn() to

test for a successful commit.

* subversion/mod_dav_svn/lock.c



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



* subversion/libsvn_repos/commit.c



  1. … 3 more files in changeset.
Fix issue #3755 ("svnadmin and svnrdump should error on non-UTF8 log

messages, authors, etc."). This commit causes 'svnadmin setrevprop',

'svnadmin setlog', and 'svnrdump load' to use codepaths which validate

property changes before they are applied to the target repository.

(Though, I suspect 'svnrdump load' already did this server-side...).

It also teaches 'svnadmin load' to do so by default, but provides a new

--bypass-prop-validation option so that these checks can be avoided at

the administrator's discretion.

NOTE: I took the quick-n-dirty way out on the JavaHL bindings, simply

passing a hardcoded value to svn_repos_load_fs3() in the

SVNRepos.load() function rather than exposing the new boolean

through the API.

* subversion/include/svn_repos.h

(svn_repos_load_fs3, svn_repos_get_fs_build_parser3): Add

'validate_props' parameter.

(svn_repos_load_fs2, svn_repos_get_fs_build_parser2): Update docstrings.

* subversion/include/private/svn_repos_private.h

(svn_repos__validate_prop): New function prototype.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__validate_prop): Was static validate_prop().

(svn_repos_fs_change_node_prop, svn_repos_fs_change_txn_props,

svn_repos_fs_change_rev_prop4): Track renamed validate_prop() function.

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

(struct parse_baton): Add 'validate_props' member.

(change_rev_prop, change_node_prop): New helper functions which

account for the desire (or lack thereof) of propery validation.

(set_revision_property, close_revision): Maybe use

svn_repos_fs_change_txn_prop() instead of svn_fs_change_txn_prop(),

depending on whether property validation is desired. Also, use

the change_rev_prop() helper.

(set_node_property, delete_node_property, remove_node_props): Use

change_node_prop() helper.

(svn_repos_get_fs_build_parser3): Add 'validate_props' parameter,

used to populate the similarly named baton member.

(svn_repos_load_fs3): Add 'validate_props' parameter, passed to

updated call to svn_repos_get_fs_build_parser3().

* subversion/libsvn_repos/deprecated.c

(svn_repos_load_fs2): Update call to svn_repos_load_fs3().

(svn_repos_get_fs_build_parser2): Update call to


* subversion/svnrdump/load_editor.c

(set_revision_property, set_node_property, delete_node_property,

close_revision): Validate properties before passing them off to the

RA layer.

* subversion/svnadmin/main.c

(svnadmin__bypass_prop_validation): New enum value.

(options_table): Add record for new --bypass-prop-validation option.

(cmd_table): Make 'load' accept --bypass-prop-validation.

(struct svnadmin_opt_state): Add 'bypass_prop_validation' member.

(set_revprop): Always use svn_repos_fs_change_rev_prop4() now.

(subcommand_load): Update call to svn_repos_load_fs3().

(main): Handle --bypass-prop-validation.

* subversion/tests/cmdline/svntest/

(run_and_verify_load): Add 'bypass_prop_validation' param and handling.

(load_repo): Update call to run_and_verify_load().

* subversion/tests/cmdline/

(load_bad_props): New test.

(test_list): Add reference to new test.

* subversion/tests/cmdline/

(run_dump_test): Add 'bypass_prop_validation' parameter, passed to

updated call to run_and_verify_load().

(copy_bad_line_endings_dump): Update call to run_dump_test(),

with bypass_prop_validation=True.

* subversion/tests/cmdline/

(info_bad_newlines): Update call to load_repo(), with


* subversion/tests/cmdline/

(setup_and_sync): Add 'bypass_prop_validation' parameter, passed to

updated call to run_and_verify_load().

(run_test): Add 'bypass_prop_validation' parameter, passed to

updated call to setup_and_sync().

(copy_bad_line_endings): Update call to run_test(), with


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

(SVNRepos::load): Update call to svn_repos_load_fs3().

  1. … 12 more files in changeset.
Fix error leaks.

* everywhere:

Add missing SVN_ERR() calls.

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

(make_node_baton): Return an svn_error_t *.

(new_node_record): Track return type change.

* subversion/svnadmin/main.c (main),

subversion/svndumpfilter/main.c (main),

subversion/svnlook/main.c (main),

subversion/svnrdump/svnrdump.c (main),

subversion/svnsync/main.c (main):

Use SVN_INT_ERR() around subcommand_help() or help_cmd().

  1. … 34 more files in changeset.