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

Changeset 1694191 is being indexed.

Implement the new 'svnadmin load-revprops' sub-command. It takes a normal

dumpfile but applies the revprop data only, and only to existing revisions.

We simply use the existing dumpfile parser infrastructure and implement

two callbacks: Starting a revision record b/c we don't create a txn here

and closing revisions - which sets the revprops. Revprop parser and magic

header callbacks can be reused from the standard dumpfile loader.

* subversion/include/svn_repos.h

(svn_repos_notify_action_t): Add a new notification for writing revprops.

(svn_repos_load_fs_revprops): Declare new API. This is a variant of the

existing svn_repos_load_fs5. We don't

trigger hooks nor do we modify the UUID.

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

(revprops_new_revision_record,

revprops_close_revision): New callback implementations.

(build_revprop_parser): New parser setup function. Based on the preexisting

svn_repos_get_fs_build_parser5.

(svn_repos_load_fs_revprops): Implement new API.

* subversion/svnadmin/svnadmin.c

(svn_opt_subcommand_t): Declare new sub-command.

(cmd_table): Add UI spec for the new sub-command.

(repos_notify_handler): Handle the new notification type.

(get_load_range): New utility, factored out from ...

(subcommand_load): ... this.

(subcommand_load_revprops): Implement the new sub-command. Code taken

mostly from subcommand_load.

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

(set_revision_property): Fix compile error.

Fix issue 4563 (load does not delete svn:date from r0).

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

(set_revision_property): Collect property changes for all revisions.

(close_revision): Move special handling for r0 here from

set_revision_property(). Calculate difference between current revision

properties for r0 and collected from dump.

* subversion/tests/cmdline/svnadmin_tests.py

(load_no_svndate_r0): Remove XFail marker.

  1. … 1 more file in changeset.
Factor out mergeinfo adjustment from 'svnadmin load' and 'svnrdump load'.

Part of issue #4483 "De-duplicate mergeinfo processing code in svnadmin load,

svnrdump load, svndumpfilter".

No functional change.

* subversion/include/private/svn_repos_private.h,

(svn_repos__adjust_mergeinfo_property): New.

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

(prefix_mergeinfo_paths): Remove note about duplication.

(renumber_mergeinfo_revs): Take separate arguments instead of batons.

Remove note about duplication.

(svn_repos__adjust_mergeinfo_property): Make semi-public, renaming from

'adjust_mergeinfo_property'. Take separate arguments instead of batons.

(set_node_property): Adjust the caller accordingly.

* subversion/svnrdump/load_editor.c

(prefix_mergeinfo_paths,

renumber_mergeinfo_revs,

adjust_mergeinfo_property): Delete.

(set_node_property): Call svn_repos__adjust_mergeinfo_property() instead.

Wrap any error with a simple message.

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

Remove unused includes and add some missing doc strings.

Cosmetically tweak some duplicated code to be even more identical. No

functional change.

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

(parse_baton): Rename 'oldest_old_rev' to 'oldest_dumpstream_rev' for

consistency with svnrdump/load_editor.c, and update all references.

(adjust_mergeinfo_property): Correct a comment.

* subversion/svnrdump/load_editor.c

(adjust_mergeinfo_property): New, factored out...

(set_node_property): ... of here.

  1. … 1 more file in changeset.
Expose missing options in the repository dumpfile loader API.

Rev svn_repos_get_fs_build_parser4() to svn_repos_get_fs_build_parser5(),

adding the three flags that have been added to its implementation and used by

its 'convenience' wrappers svn_repos_load_fs2() to svn_repos_load_fs5() but

that were not exposed here. Now all the features that the wrapper provides

are also exposed by the slightly lower level API.

* subversion/include/svn_repos.h

(svn_repos_load_fs4): Correct the '@since' version.

(svn_repos_get_fs_build_parser5): New.

(svn_repos_get_fs_build_parser4): Deprecate.

* subversion/libsvn_repos/deprecated.c

(svn_repos_get_fs_build_parser4): Implement as a wrapper.

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

(svn_repos_get_fs_build_parser5): Rename from ...4() and add the new

parameters.

(svn_repos_load_fs5): Simplify by using svn_repos_get_fs_build_parser5().

  1. … 2 more files in changeset.
Fix issue #4538 "'load' strips r1 references in mergeinfo": don't filter out

references to r1 in mergeinfo during 'svnadmin load' and 'svnrdump load'.

r1 is not an invalid mergeinfo source revision, merely an unlikely one, and

we don't treat it as invalid anywhere else.

This reverts r941438 which has been in place since v1.7.0. Note also that

this commit didn't remove r0 mergeinfo, only r1, despite the claim in its

log message.

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

subversion/svnrdump/load_editor.c

(renumber_mergeinfo_revs): Don't filter out references to r1.

Canonicalize mergeinfo, where previously the combination of sorting

followed by filtering achieved canonicalization.

* subversion/svndumpfilter/svndumpfilter.c

(adjust_mergeinfo): Remove a comment that said r1 is invalid.

* subversion/tests/cmdline/svndumpfilter_tests.py

(filter_mergeinfo_revs_outside_of_dump_stream): Correct a comment that

said r1 is invalid, written in r941408.

  1. … 3 more files in changeset.
Fix the 'svnadmin load' part of issue #4476 "Mergeinfo containing r0 makes

svnsync and svnadmin dump fail".

Make 'svnadmin load' accept mergeinfo containing r0 (with a warning) if the

option to validate properties is not enabled. In that case that mergeinfo

property will not be adjusted for revision numbers or paths. Add a test.

* subversion/include/svn_repos.h

(svn_repos_notify_warning_t): Add a new value for invalid mergeinfo.

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

(adjust_mergeinfo_property): New, factored out of ...

(set_node_property): ... here. If adjusting the mergeinfo fails, return an

error if validating properties, or give a warning and use the invalid

value otherwise.

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

(test_dump_bad_props): New, factored out of...

(test_dump_r0_mergeinfo): ... here.

(test_load_bad_props,

load_r0_mergeinfo_notifier,

test_load_r0_mergeinfo): New.

(test_funcs): Add the new test.

  1. … 2 more files in changeset.
Stop re-using a single notify struct while loading a repository from a

dumpfile. While nice in theory it is easy to forget clearing out variables

in the struct, which our bindings then try to read on the next invocation.

As temporary -but safe to backport- intermediate step introduce a scratch/

iter pool to hold the notification struct, while the code doesn't have

proper scratch pools yet.

This resolves a segfault in the JavaHL tests on OpenBSD

Found by: stsp

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

(parse_baton): Remove notify struct. Add notify pool.

(new_revision_record,

maybe_add_with_history,

new_node_record,

set_node_property,

close_node,

close_revision): Allocate notify struct instead of reusing.

(svn_repos_get_fs_build_parser4): Update initialization.

Following the availability of apr_hash_this_key() etc. in APR v1.5, use

these in Subversion code instead of svn__apr_hash_index_key() etc. Provide

substitutes only when APR is too old to provide them.

* subversion/include/svn_types.h,

subversion/libsvn_subr/iter.c

(svn__apr_hash_index_key,

svn__apr_hash_index_klen,

svn__apr_hash_index_val):

Rename to apr_hash_this_key, apr_hash_this_key_len, apr_hash_this_val.

Declare and define them only if APR is older than 1.5.

Everywhere else: track the renames.

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

(revision_baton): Document two fields.

(new_revision_record): Fix typo in comment.

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

(set_node_property): Don't change the caller's data through an input

parameter: get rid of a horrible casting away of 'const'. This bug wasn't

hurting our code but could hurt other users of the API.

In libsvn_repos, simplify hash iteration code a little by using key and

value accessor functions rather than apr_hash_this(), as we already do in

many other places.

Though I lament the length of those svn__apr_hash_index_* identifiers (which

I created), at least it's a step closer to readable. We can shorten them

later to apr_hash_this_* by adding configury, now that APR 1.5 has those.

* subversion/libsvn_repos/delta.c

(delta_dirs): As above.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_commit_txn): As above.

* subversion/libsvn_repos/hooks.c

(lock_token_content): As above.

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

(prefix_mergeinfo_paths,

renumber_mergeinfo_revs,

remove_node_props): As above.

* subversion/libsvn_repos/log.c

(svn_repos_check_revision_access,

turn_moves_into_copies,

turn_unique_copies_into_moves,

detect_changed,

fs_mergeinfo_changed,

get_combined_mergeinfo_changes,

send_log,

combine_mergeinfo_path_lists): As above.

* subversion/libsvn_repos/replay.c

(add_subdir,

svn_repos_replay2,

svn_repos__replay_ev2): As above.

* subversion/libsvn_repos/reporter.c

(delta_proplists): As above.

* subversion/libsvn_repos/rev_hunt.c

(find_merged_revisions): As above.

  1. … 7 more files in changeset.
Fix some typos.

* CHANGES:

* contrib/cgi/mirror_dir_through_svn.cgi:

* contrib/client-side/emacs/psvn.el:

* contrib/client-side/svn2cl/svn2cl.xsl:

* contrib/hook-scripts/remove-zombie-locks.py:

* contrib/hook-scripts/syntax-check.sh:

* contrib/server-side/svnstsw/configure.ac:

* notes/assurance.txt:

* notes/fs-improvements.txt:

* notes/knobs:

* notes/merge-tracking/func-spec.html:

* notes/merge-tracking/summit-survey.html:

* notes/wc-ng/design:

* notes/wc-ng/locking:

* notes/wc-ng/nodes:

* subversion/bindings/ctypes-python/csvn/core/__init__.py:

* subversion/bindings/ctypes-python/examples/example.py:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java:

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/ConflictResult.java:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/PropertyData.java:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java:

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java:

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java:

* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java:

* subversion/bindings/swig/include/proxy_apr.swg:

* subversion/bindings/swig/perl/native/Client.pm:

* subversion/bindings/swig/perl/native/t/3client.t:

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:

* subversion/include/private/svn_diff_tree.h:

* subversion/include/private/svn_io_private.h:

* subversion/include/private/svn_ra_svn_private.h:

* subversion/include/private/svn_string_private.h:

* subversion/include/svn_io.h:

* subversion/include/svn_iter.h:

* subversion/include/svn_props.h:

* subversion/libsvn_client/copy_foreign.c:

* subversion/libsvn_client/diff.c:

* subversion/libsvn_client/merge.c:

* subversion/libsvn_delta/xdelta.c:

* subversion/libsvn_diff/diff4.c:

* subversion/libsvn_diff/util.c:

* subversion/libsvn_fs/editor.c:

* subversion/libsvn_fs_fs/index.c:

* subversion/libsvn_fs_fs/temp_serializer.c:

* subversion/libsvn_fs_fs/temp_serializer.h:

* subversion/libsvn_fs_fs/transaction.c:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_fs_x/fs.h:

* subversion/libsvn_fs_x/index.c:

* subversion/libsvn_fs_x/reps.c:

* subversion/libsvn_fs_x/temp_serializer.c:

* subversion/libsvn_fs_x/temp_serializer.h:

* subversion/libsvn_fs_x/transaction.c:

* subversion/libsvn_fs_x/tree.c:

* subversion/libsvn_ra_serf/README:

* subversion/libsvn_ra_svn/protocol:

* subversion/libsvn_repos/dump.c:

* subversion/libsvn_repos/hooks.c:

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

* subversion/libsvn_subr/dirent_uri.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/opt.c:

* subversion/libsvn_subr/string.c:

* subversion/libsvn_subr/subst.c:

* subversion/libsvn_wc/entries.c:

* subversion/libsvn_wc/externals.c:

* subversion/libsvn_wc/lock.c:

* subversion/libsvn_wc/update_editor.c:

* subversion/svn/file-merge.c:

* subversion/svn/status-cmd.c:

* subversion/svnlook/svnlook.c:

* subversion/svnrdump/load_editor.c:

* subversion/svnserve/svnserve.c:

* subversion/tests/cmdline/commit_tests.py:

* subversion/tests/cmdline/diff_tests.py:

* subversion/tests/cmdline/merge_reintegrate_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/revert_tests.py:

* subversion/tests/cmdline/svnauthz_tests.py:

* subversion/tests/cmdline/svntest/factory.py:

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

* subversion/tests/libsvn_repos/repos-test.c:

* subversion/tests/libsvn_subr/string-test.c:

* subversion/tests/libsvn_subr/utf-test.c:

* subversion/tests/libsvn_wc/db-test.c:

* subversion/tests/svn_test_main.c:

* tools/dev/trails.py: Fix some typos.

Patch by: Veres Lajos <vlajos{_AT_}gmail.com>

(I removed some changes that were wrong or can't be made due to API breakage)

  1. … 90 more files in changeset.
Introduce '--ignore-dates' option for 'svnadmin load', which causes

the load process to ignore the revision datestamps found in the

dumpstream. This allows folks to more easily use dumpfiles as

repository templates which appear (datestamp-wise) as normal commits

would.

* subversion/include/svn_repos.h

(svn_repos_load_fs5): New version of this API which accepts

'ignore_dates' flag.

* subversion/libsvn_repos/deprecated.c

(svn_repos_load_fs4): Moved here from load-fs-vtable.c, and is now

just a wrapper around svn_repos_load_fs5().

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

(parse_baton): Add 'ignore_dates' member.

(set_revision_property, close_revision): Handle ignore_dates flag.

(svn_repos_load_fs5): New version of this API which accepts

'ignore_dates' flag.

* subversion/svnadmin/svnadmin.c

(svnadmin__ignore_dates): New enum value.

(options_table): Define --ignore-dates option.

(cmd_table): Allow 'load' to accept --ignore-dates.

(svnadmin_opt_state): Add 'ignore_dates' member.

(subcommand_load): Now use svn_repos_load_fs5().

(main): Handle --ignore-dates option.

* subversion/tests/cmdline/svnadmin_tests.py

(load_ignore_dates): New test for 'svnadmin load --ignore-dates'.

(test_list): Add reference to new test.

  1. … 4 more files in changeset.
In preparation for committing over RA with a specified svn:date,

change the FS implementation from a flag in svn_fs_commit_txn2 to

a flag passed to svn_fs_begin_txn2.

* subversion/include/svn_fs.h

(SVN_FS_TXN_CLIENT_DATE): New.

(svn_fs_commit_txn2): Remove.

(svn_fs_commit_txn): Remove deprecation.

* subversion/libsvn_fs/fs-loader.h

(struct txn_vtable_t): Remove set_timestamp parameter from commit.

(SVN_FS__PROP_TXN_CLIENT_DATE): New.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_commit_txn2): Remove.

(svn_fs_change_txn_prop, svn_fs_change_txn_props): Drop changes to the

internal property.

* subversion/libsvn_fs/editor.c

(svn_fs__editor_commit): Use svn_fs_commit_txn.

* subversion/libsvn_fs_fs/transaction.h

(svn_fs_fs__commit): Remove set_timestamp parameter.

* subversion/libsvn_fs_fs/transaction.c

(svn_fs_fs__change_txn_props): Record svn:date change.

(write_final_revprop): Remove set_timestamp parameter.

(struct commit_baton): Remove set_timestamp member.

(commit_body): Update call.

(svn_fs_fs__commit): Remove set_timestamp parameter.

(svn_fs_fs__begin_txn): Set new temporary property.

* subversion/libsvn_fs_fs/tree.h

(svn_fs_fs__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_fs/tree.c

(svn_fs_fs__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_base/dag.h

(svn_fs_base__dag_commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__dag_commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_base/revs-txns.c

(svn_fs_base__set_txn_prop): Record svn:date change.

(txn_body_begin_txn): Set new temporary property.

* subversion/libsvn_fs_base/tree.h

(svn_fs_base__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_base/tree.c

(struct commit_args): Remove set_timestamp member.

(txn_body_commit): Update call.

(svn_fs_base__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_x/transaction.h

(svn_fs_x__commit): Remove set_timestamp parameter.

* subversion/libsvn_fs_x/transaction.c

(change_txn_props): Record svn:date change.

(write_final_revprop): Remove set_timestamp parameter.

(struct commit_baton): Remove set_timestamp member.

(commit_body): Update call.

(svn_fs_x__commit): Remove set_timestamp parameter.

(svn_fs_x__begin_txn): Set new temporary property.

* subversion/libsvn_fs_x/tree.h

(svn_fs_x__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_fs_x/tree.c

(svn_fs_x__commit_txn): Remove set_timestamp parameter.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_commit_txn): Use svn_fs_commit_txn.

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

(new_revision_record): Set SVN_FS_TXN_CLIENT_DATE.

(close_revision): Use svn_fs_commit_txn.

* subversion/tests/libsvn_fs/fs-test.c

(commit_timestamp): Set SVN_FS_TXN_CLIENT_DATE, use svn_fs_commit_txn,

test setting internal property.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

(upgrade_txns_to_log_addressing): Use svn_fs_commit_txn.

* subversion/tests/libsvn_repos/repos-test.c

(test_config_pool): Use svn_fs_commit_txn.

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

baton.

* 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

svn_fs_fs__commit().

* 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_start_commit,

svn_repos__hooks_pre_commit,

svn_repos__hooks_post_commit,

svn_repos__hooks_pre_revprop_change,

svn_repos__hooks_post_revprop_change,

svn_repos__hooks_pre_lock,

svn_repos__hooks_post_lock,

svn_repos__hooks_pre_unlock,

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

functions.

* 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

functions.

* 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

svn_merge_range_t

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,

subversion/bindings/javahl/native/CreateJ.h,

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

subversion/bindings/swig/core.i,

subversion/bindings/swig/include/svn_containers.swg,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

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

subversion/libsvn_client/diff.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/mergeinfo.h,

subversion/libsvn_client/ra.c,

subversion/libsvn_fs_util/fs-util.c,

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

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/svndumpfilter/main.c,

subversion/svnrdump/load_editor.c,

subversion/tests/libsvn_subr/mergeinfo-test.c

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

far).

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

them. TRUE for svndumpfilter only.

* subversion/tests/cmdline/svndumpfilter_tests.py

(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

first.

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

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

anymore.

* 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_parse_fns2_t,

svn_repos_parse_dumpstream2,

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

(filtering_vtable,

do_filter): Use the new API.

* subversion/svnrdump/load_editor.c

(svn_rdump__load_dumpstream): Use the new API.

* subversion/libsvn_repos/deprecated.c

(fns2_from_fns3,

fns3_from_fns2): New functions.

(svn_repos_get_fs_build_parser3): Use the new API.

* subversion/libsvn_repos/load.c

(parse_property_block,

parse_text_block,

svn_repos_parse_dumpstream3): Use the new API.

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

(svn_repos_get_fs_build_parser4,

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

*result*.

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 <trent@snakebite.org>

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