Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use more of the new _safe variants of canonicalization functions.

This commit converts all relevant function calls in libsvn_repos.

* subversion/libsvn_repos/commit.c

(add_file_or_directory, delete_entry, open_directory, open_file): Use

svn_relpath_canonicalize_safe() instead of svn_relpath_canonicalize().

* subversion/libsvn_repos/delta.c

(svn_repos_dir_delta2): Use svn_relpath_canonicalize_safe() instead of

svn_relpath_canonicalize().

* subversion/libsvn_repos/dump.c

(make_dir_baton): Convert to return an svn_error_t and use

svn_relpath_canonicalize_safe() instead of svn_relpath_canonicalize().

(open_root, add_directory, open_directory): Update callers.

(dump_node): Use svn_relpath_canonicalize_safe() instead of

svn_relpath_canonicalize().

* subversion/libsvn_repos/dump_editor.c

(make_dir_baton): Convert to return an svn_error_t and use

svn_relpath_canonicalize_safe() instead of svn_relpath_canonicalize().

(open_root, add_directory, open_directory): Update callers.

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

(prefix_mergeinfo_paths, make_node_baton, svn_repos_get_fs_build_parser6):

Use svn_relpath_canonicalize_safe() instead of svn_relpath_canonicalize().

  1. … 4 more files in changeset.
Fix #4760 "Missing children when svnadmin dump --include/exclude converts

copy-dir to add-dir".

Follow-up to r1811992: Canonicalize PATH before passing it to the FILTER_FUNC.

In some cases (e.g. for nodes under copied directories) PATH passed by

repos layer to AUTHZ_FUNC may be non-canonical (missing leading '/'). This

causes FILTER_FUNC implemented in svnadmin to wrongly report PATH as "not

included".

* subversion/libsvn_repos/dump.c

(dump_filter_authz_func): Canonicalize PATH before passing it

to the FILTER_FUNC. Add comment.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_include_copied_directory): New.

(test_list): Add new test to table.

Patch by: sergey.raevskiy{_AT_}visualsvn.com

  1. … 1 more file in changeset.
Factor out the dump-stream header writing functions.

Although these are small functions, consistency is nice.

* subversion/include/private/svn_repos_private.h,

subversion/libsvn_repos/dump.c

(svn_repos__dump_magic_header_record,

svn_repos__dump_uuid_header_record): New.

(svn_repos_dump_fs4): Use them.

* subversion/svndumpfilter/svndumpfilter.c

(magic_header_record,

uuid_record): Use them.

* subversion/svnrdump/svnrdump.c

(replay_revisions): Use them.

  1. … 3 more files in changeset.
Fix issue SVN-4767: svnadmin dump shouldn't canonicalize svn:date.

* subversion/libsvn_repos/dump.c

(write_revision_record): Don't canonicalize svn:date.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_no_canonicalize_svndate): New test.

(test_list): Run it.

  1. … 1 more file in changeset.
Issue SVN-4729: Add '--include' and '--exclude' options to 'svnadmin dump'.

* include/svn_repos.h

(svn_repos_dump_filter_func_t): New.

(svn_repos_dump_fs4): Update function signature and comment.

(svn_repos_dump_fs3): Update comment.

* libsvn_repos/deprecated.c

(svn_repos_dump_fs3): Update caller.

* libsvn_repos/dump.c

(write_revision_record): Call to svn_repos_fs_revision_proplist() (with

AUTHZ_FUNC) instead of svn_fs_revision_proplist2() to filter revision

properties as well as revisions. Update comment.

(dump_filter_baton_t,

dump_filter_authz_func): New.

(svn_repos_dump_fs4): Initialize and pass AUTHZ_FUNC and AUTHZ_BATON to

the repos layer API if FILTER_FUNC is specified by caller.

* subversion/svnadmin/svnadmin.c

(svnadmin__cmdline_options_t): Add enum values for new options.

(options_table): Add new options.

(cmd_table): Add new options to 'dump' subcommand.

(svnadmin_opt_state): Add new fields to represent new options.

(ary_prefix_match): New. Copied from svndumpfilter.

(dump_filter_baton_t,

dump_filter_func): New.

(subcommand_dump): Initialize FILTER_BATON. Pass DUMP_FILTER_FUNC and a

pointer to FILTER_BATON to svn_repos_dump_fs() if any filtering prefixes

specified.

(sub_main): Handle new options.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_exclude,

dump_exclude_copysource,

dump_include,

dump_not_include_copysource,

dump_exclude_by_pattern,

dump_include_by_pattern,

dump_exclude_all_rev_changes,

dump_invalid_filtering_option): New.

(test_list): Add new tests to table.

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

(test_dump_bad_props): Update caller.

Patch by: sergey.raevskiy{_AT_}visualsvn.com

  1. … 5 more files in changeset.
Revert r1796399.

This was accidentally committed by a faulty script.

  1. … 4 more files in changeset.
[Accidental commit, reverted in 1796402]
  1. … 4 more files in changeset.
Fix a NULL deref in libsvn_repos which makes svndumpfilter crash.

* subversion/libsvn_repos/dump.c

(svn_repos__dump_revision_record): Don't try to print a Content-length

header if propstring is NULL.

Reported by: Steven Barbaglia

https://svn.haxx.se/users/archive-2017-02/0012.shtml

Expose the ability to normalize and case fold UTF-8 strings in a new

private API, svn_utf__casefold().

That's better than having an additional flag for the svn_utf__normalize()

function. Internally, the case folding is still implemented by passing an

extra flag to the static helper, but now we have a distinction at the API

boundary.

* subversion\include\private\svn_utf_private.h

(svn_utf__normalize): Drop 'casefold' argument.

(svn_utf__casefold): Declare new function.

* subversion\libsvn_subr\utf8proc.c

(svn_utf__normalize): Adjust the call to normalize_string().

(svn_utf__casefold): New function. Normalize and fold the case of the

string by issuing an appropriate call to normalize_string().

* subversion/libsvn_repos/dump.c

(extract_mergeinfo_paths, verify_mergeinfo_normalization,

check_name_collision): Update callers of svn_utf__normalize().

* subversion\svn\log-cmd.c

(match): Call svn_utf__casefold().

* subversion\svn\svn.c

(sub_main): Call svn_utf__casefold().

* subversion\tests\libsvn_subr\utf-test.c

(test_utf_normalize): Split into separate tests for svn_utf__normalize()

and svn_utf__casefold().

(test_utf_casefold): New test.

(test_funcs): Add new test.

  1. … 5 more files in changeset.
Make svn log --search case-insensitive.

Use utf8proc to do the normalization and locale-independent case folding

(UTF8PROC_CASEFOLD) for both the search pattern and the input strings.

Related discussion is in http://svn.haxx.se/dev/archive-2013-04/0374.shtml

(Subject: "log --search test failures on trunk and 1.8.x").

* subversion/include/private/svn_utf_private.h

(svn_utf__normalize): Add new boolean argument to perform case folding.

* subversion/libsvn_subr/utf8proc.c

(normalize_cstring): Add new boolean argument to perform case folding.

In case it is non-zero, set the flags to UTF8PROC_CASEFOLD when

doing the Unicode decomposition.

(svn_utf__normalize): Pass new argument to normalize_cstring().

(svn_utf__is_normalized): Adjust call to normalize_cstring().

* subversion/libsvn_repos/dump.c

(extract_mergeinfo_paths, verify_mergeinfo_normalization,

check_name_collision): Update callers of svn_utf__normalize().

* subversion/svn/cl-log.h

(): Include svn_string_private for svn_membuf_t.

(svn_cl__log_receiver_baton): Add an svn_membuf_t for the case folding

and normalization purposes.

* subversion/svn/log-cmd.c

(): Include svn_utf_private.h.

(match): New helper that normalizes, folds case of the input, and matches

it against the specified pattern.

(match_search_pattern): Now accepts an svn_membuf_t. Call the new helper

function to perform the pattern matching.

(svn_cl__log_entry_receiver, svn_cl__log_entry_receiver_xml): Pass the

svn_membuf_t from the baton when calling match_search_pattern().

(svn_cl__log): Initialize the svn_membuf_t in the log receiver baton.

* subversion/svn/svn.c

(): Include svn_utf_private.h.

(sub_main): Normalize and fold case of --search and --search-and arguments.

* subversion/tests/cmdline/log_tests.py

(log_search): Adjust expectations, since --search is now case-insensitive.

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

(test_utf_normalize): New test for svn_utf__normalize().

(test_funcs): Add new test.

  1. … 7 more files in changeset.
Use svn_io_file_get_offset() instead of svn_io_file_seek(APR_CUR) where it

makes sense.

* subversion/libsvn_client/patch.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/stream.c

* subversion/tests/libsvn_subr/io-test.c

(tell_file, read_handler_base85, hunk_readline_original_or_modified,

svn_diff_hunk_readline_diff_text, parse_next_hunk, parse_binary_patch,

svn_diff_parse_next_patch, store_delta, svn_io_file_readline,

mark_handler_apr, test_file_readline, aligned_seek): Use

svn_io_file_get_offset() instead of svn_io_file_seek(0, APR_CUR).

  1. … 5 more files in changeset.
Restore the 1.8 behavior of svn_fs_contents_changed() and _props_changed()

API. Switch all calling sites of the new API, svn_fs_contents_different()

and _props_different(), back to using the old functions.

There are no user-visible problems associated with the old code. The new

API doesn't improve any real use cases in the current code, but is causing

problems:

- We had a problem with misbehaving svn blame -g

(http://svn.haxx.se/dev/archive-2015-06/0069.shtml, "Blame behaviour

change in 1.9").

- We have an issue with repositories behaving differently in client-side

operations like 'svn log' after dump/load

(http://svn.haxx.se/dev/archive-2015-09/0269.shtml, "No-op changes no

longer dumped by 'svnadmin dump' in 1.9"; also see issue #4598 in

https://issues.apache.org/jira/browse/SVN-4598).

- We could experience same problems originating from other callers of the

new API, because the low level behavior change associated with switching

to it propagates up to higher levels like svn_repos or svn_ra and alters

the behavior of many different callers like svn_ra_get_file_revs2() or

the update reporter. Third-party API callers could not be ready for it

as well, because public API functions like svn_ra_get_file_revs2() didn't

receive an erratum or a bump.

See the discussion in http://svn.haxx.se/dev/archive-2015-10/0022.shtml

("Re: No-op changes no longer dumped by 'svnadmin dump' in 1.9").

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__things_different): Compare the uniquifiers, as we did in 1.8.

* subversion/libsvn_fs_base/fs.h

(node_revision_t.data_key_uniquifier): Remove the comment about not using

this field.

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__noderev_same_rep_key): Reintroduce this helper function.

(svn_fs_fs__file_text_rep_equal, svn_fs_fs__prop_rep_equal): Always

assume the strict mode in these helpers.

* subversion/libsvn_fs_fs/fs_fs.h

(svn_fs_fs__noderev_same_rep_key): Declare this re-added helper.

(svn_fs_fs__file_text_rep_equal, svn_fs_fs__prop_rep_equal): Update the

docstrings for these helper functions.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_things_different): Preserve the current comparison behavior

in strict mode. Restore the 1.8 way of comparing the representation keys

in non-strict mode.

* subversion/libsvn_fs_fs/tree.c

(merge): Restore the 1.8 way of comparing property lists.

* subversion/libsvn_fs_fs/fs.h

(representation_t.uniquifier): Remove the comment about not using this

field.

* subversion/libsvn_repos/delta.c

(delta_proplists): Switch back to using svn_fs_props_changed().

(svn_repos__compare_files): Restore this function to its 1.8 state.

(delta_files): Restore the 1.8 way of comparing files.

* subversion/libsvn_repos/dump.c

(dump_node): Switch back to using svn_fs_contents_changed() and

svn_fs_props_changed().

* subversion/libsvn_repos/reporter.c

(delta_proplists): Switch back to using svn_fs_props_changed().

* subversion/libsvn_repos/rev_hunt.c

(send_path_revision): Switch back to using svn_fs_contents_changed().

Remove the no longer necessary hack for svn blame -g with older clients.

* subversion/include/svn_ra.h

(svn_ra_get_file_revs2): Update @note in the docstring.

* subversion/include/svn_repos.h

(svn_repos_get_file_revs2): Update @note in the docstring.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_no_op_change): No longer fails with fsfs and bdb.

  1. … 13 more files in changeset.
Follow-up to r1708001: Did not really change the behavior ...

* subversion/libsvn_repos/dump.c

(verify_one_revision): Actually disable the refresh.

Speed up revprop access in svn_repos_verify_fs3() by using the latest FS API.

* subversion/libsvn_repos/dump.c

(verify_one_revision): Read revprops from the FS cache if we can.

(svn_repos_verify_fs3): Refresh the revprops only once, at the start of the

operation. This is the only public function that

calls the above. Therefore, we still fulfill the

visibility guarantees for revprop changes.

Speed up revprop access in svn_repos_dump_fs4() by using the latest FS API.

* subversion/libsvn_repos/dump.c

(write_revision_record): Read revprops from the FS cache if we can.

(svn_repos_dump_fs4): Refresh the revprops only once, at the start of the

operation. This is the only public function that

calls the above. Therefore, we still fulfill the

visibility guarantees for revprop changes.

Code cleanup. No functional change intended.

* subversion/libsvn_repos/dump.c

(svn_repos_dump_fs4): The SUBPOOL is actually an ITERPOOL.

Implement the new 'svnadmin dump-revprops' sub-command.

The implementation uses a bumped version of svn_repos_dump_fs that can now

be told what kind of information to include in the dump. These new flags

are "positive" and non-restrictive, e.g. INCLUDE_REVPROPS instead of

REVPROPS_ONLY. That way, future revisions may easily extend this scheme.

* subversion/include/svn_repos.h

(svn_repos_dump_fs4): Declared API revision.

(svn_repos_dump_fs3): Deprecate the old one.

* subversion/libsvn_repos/dump.c

(write_revision_record): Make dumping revprops an option.

(svn_repos_dump_fs3): Replaced by ...

(svn_repos_dump_fs4): ... the new API revision. Dump contents depending on

the two new flag parameters.

* subversion/libsvn_repos/deprecated.c

(svn_repos_dump_fs3): Implement here now as forwarding to the latest API.

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

(dump): Call latest API version.

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

(test_dump_bad_props): Same.

* subversion/svnadmin/svnadmin.c

(svn_opt_subcommand_t): Declare new sub-command.

(cmd_table): Define its UI.

(get_dump_range): Factored out from ...

(subcommand_dump): ... this.

(subcommand_dump_revprops): Implement new sub-command. Code taken from

subcommand_dump.

  1. … 5 more files in changeset.
Reimplement svn_repos_verify_fs3() to support an arbitrary callback that

receives the information about an encountered problem and lets the caller

decide on what happens next. This supersedes the keep_going argument for

this API. A callback is optional; the behavior of this API if the callback

is not provided is equivalent to how svn_repos_verify_fs2() deals with

encountered errors. This allows seamless migration to the new API, if the

callback is not necessary. The idea is partly taken from how our existing

svn_fs_lock_many() API works with a svn_fs_lock_callback_t and passes error

information to the caller.

Immediately use the new API to provide an alternative solution for the

encountered problem with 'svnadmin verify --keep-going -q' (see r1684940)

being useless in terms that it was only giving an indication of whether a

particular repository passes the verification or not, without providing a

root cause (details) of what's wrong.

Discussion can be found in http://svn.haxx.se/dev/archive-2015-05/0141.shtml

(Subject: "Possible incompatibility of svn_repos_verify_fs2() in 1.9.0-rc1")

* subversion/include/svn_error_codes.h

(SVN_ERR_REPOS_VERIFY_FAILED): Remove this error code, as we no longer

need to send a specific error from within svn_repos_verify_fs3().

(SVN_ERR_CL_REPOS_VERIFY_FAILED): New.

* subversion/include/svn_repos.h

(svn_repos_notify_action_t): Remove svn_repos_notify_failure.

(svn_repos_notify_t): Remove 'err' field, as it is no longer needed.

(svn_repos_verify_callback_t): New optional callback type to be used with

svn_repos_verify_fs3().

(svn_repos_verify_fs3): Drop 'keep_going' argument in favor of accepting a

svn_repos_verify_callback_t. Update the docstring accordingly.

(svn_repos_verify_fs2): Update the docstring for this deprecated function.

* subversion/libsvn_repos/deprecated.c

(svn_repos_verify_fs2): Update the call to svn_repos_verify_fs3() in this

compatibility wrapper. Don't pass the verify callback.

* subversion/libsvn_repos/dump.c

(notify_verification_error): Remove; this function is no longer required.

(report_error): New helper function.

(svn_repos_verify_fs3): In case we've got a svn_repos_verify_callback_t,

call it upon receiving an FS-specific structure failure or a revision

verification failure. Delegate this action to the new report_error()

helper function. Doing so makes the caller responsible for what's going

to happen with the error. The caller can choose to store the error,

ignore it or use it in any other necessary way. If a callback returns an

error, stop the verification process and immediately return that error.

If no callback is provided, mimic the behavior of svn_repos_verify_fs2()

and return the first encountered error. Drop the logic related to error

formatting, as we no longer need it at this layer. We are going to make

a simpler replacement for it is the UI code (svnadmin.c), where it is

supposed to live.

* subversion/svnadmin/svnadmin.c

(struct repos_verify_callback_baton): New. Contains the fields that are

required to track the --keep-going errors taken from ...

(struct repos_notify_handler_baton): ...this baton. After the previous

step, this baton only contains the 'feedback_stream' field, so inline it

into every calling site.

(repos_notify_handler): Baton is now simply an svn_stream_t. Remove the

boolean-based filtering logic from this handler and drop the handling of

svn_repos_notify_failure. The latter is moved, with a bit of tweaking,

into ...

(repos_verify_callback): ...this new function, that implements a callback

for svn_repos_verify_fs3(). Depending on whether we are in --keep-going

mode or not, either dump the failure details to stderr and track them to

produce a summary, or immediately return it through the callback, thus

ending the verification process. Remember all errors in the --keep-going

mode, not only those that are associated with a particular revision.

Prior to handling the error itself, tell that we failed to verify the

revision or metadata by writing corresponding messages to stderr.

(subcommand_dump, subcommand_load, subcommand_recover, subcommand_upgrade,

subcommand_hotcopy, subcommand_pack): Inline repos_notify_handler_baton

here, as it now contains a single svn_stream_t field.

(subcommand_verify): Inline repos_notify_handler_baton here, as it now

contains a single svn_stream_t field. Avoid manipulations with boolean

fields like b->silent_errors and b->silent_running, because we no longer

need them, and the fields themselves are gone. Create a feedback stream

only in non-quiet mode, as we do in other subcommand implementations.

Create a baton for repos_verify_callback() and adjust the calling site of

svn_repos_verify_fs3(), that now needs a callback. Adjust --keep-going

summary printing to the new approach with the verification callback.

Finally, provide a simple error if we encountered at least one failure

in the --keep-going mode.

* subversion/tests/cmdline/svnadmin_tests.py

(verify_keep_going, verify_keep_going_quiet, verify_invalid_path_changes):

Adjust the expectations, because now errors go straight to stderr in both

--keep-going and ordinary modes. Where possible, make the expectations a

bit stricter by extending the lines that we check with RegexListOutput().

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

(load_index, load_index_keep_going): Squash two tests into one; basically,

undo the corresponding hunk from r1683311. As we no longer have separate

keep_going mode in svn_repos_verify_fs3(), and the caller decides if the

verification continues or not, we don't have to check two different

scenarios.

(test_funcs): Track the test changes.

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

(fuzzing_1_byte_1_rev): Adjust the call to svn_repos_verify_fs3().

[in subversion/bindings]

* javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java

(ReposNotifyInformation.Action): Remove value that used to correspond

to svn_repos_notify_failure.

* javahl/src/org/apache/subversion/javahl/ISVNRepos.java

(ISVNRepos.verify): Remove 'keepGoing' argument from the newest overload

of this method and update the docstring. This patch does not expose

the ability to have control over verification failures through a custom

callback in JavaHL bindings, but we're going to address this separately.

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

(SVNRepos.verify): Adjust two overloads of this method in the ISVNRepos

interface implementation.

* javahl/native/SVNRepos.h

(SVNRepos::verify): Remove 'keepGoing' argument from declaration.

* javahl/native/SVNRepos.cpp

(SVNRepos::verify): Remove 'keepGoing' argument. Do not pass a verify

callback when calling svn_repos_verify_fs3().

* javahl/native/org_apache_subversion_javahl_SVNRepos.cpp

(Java_org_apache_subversion_javahl_SVNRepos_verify): Remove 'jkeepGoing'

argument from this JNI wrapper.

  1. … 13 more files in changeset.
Follow up to r1684325: Move the "fix" from libsvn_repos to svnadmin,

because it was responsible for the double error notification.

* subversion/libsvn_repos/dump.c: Revert r1684325.

(svn_repos_verify_fs3): Revert to always sending error notifications.

* subversion/svnadmin/svnadmin.c

(repos_notify_handler_baton): New member silent_errors.

(repos_notify_handler): I the svn_repos_notify_failure case,

always print the notification but print the error itself

only if the baton's silent_errors member is FALSE.

(subcommand_verify): Silence errors in the notificaiton handler

if --keep-going was not used.

  1. … 1 more file in changeset.
Follow up to r1683311: Fix an unintended doubling of error messages

in 'svnadmin verify' without the --keep-going flag.

* subversion/libsvn_subr/dump.c

(svn_repos_verify_fs3): If keep_going is false, do not send notifications

about errors but just return the error instead.

Fix the behaviour of 'svnadmin verify' alias svn_repos_verify_fs3.

Without --keep-going, 'svnadmin verify' must not obscure the error

returned by the FS implementation. With --keep-going, it should not

assume that a reported error implies repository corruption, only

that the verificaton process failed.

See: http://s.apache.org/j9Z

Patch by: kotkov

me

* subversion/include/svn_error_codes.h

(SVN_ERR_REPOS_VERIFY_FAILED): Replaces SVN_ERR_REPOS_CORRUPTED.

* subversion/libsvn_fs_fs/cached_data.c (svn_fs_fs__check_rep),

subversion/libsvn_fs_x/cached_data.c (svn_fs_x__check_rep):

Return SVN_ERR_FS_CORRUPT instead of the incorrect and

obsolete SVN_ERR_REPOS_CORRUPTED.

* subversion/libsvn_repos/dump.c

(verify_fs_notify_func_baton_t): Renamed from verify_fs2_notify_func_baton_t.

There's no need to 'version' file-local symbols. All uses updated.

(verify_fs_notify_func): Renamed from verify_fs2_notify_func; see above.

(svn_repos_verify_fs3): Track metadata and revision verification failures

separately and, in keep-going mode, summarize them separately, too.

Do not obscure FS backend errors in normal mode and do not ignore

cancellations in keep-going mode.

* subversion/tests/cmdline/svnadmin_tests.py

(verify_keep_going, verify_invalid_path_changes, verify_quickly):

Adjust test case expectations.

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

(load_index_test): Renamed from load_index.

Parametrize the test to check both normal and keep-going verification

and adjust test case expectations.

(load_index, load_index_keep_going): New test cases.

(test_funcs): Add load_index_keep_going.

  1. … 5 more files in changeset.
Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

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

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

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

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

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_client/client-test.c

* subversion/tests/libsvn_client/mtcc-test.c

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

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

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

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

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

* subversion/tests/libsvn_ra/ra-test.c

* subversion/tests/libsvn_subr/cache-test.c

* subversion/tests/libsvn_subr/checksum-test.c

* subversion/tests/libsvn_subr/config-test.c

* subversion/tests/libsvn_subr/io-test.c

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

* subversion/tests/libsvn_subr/sqlite-test.c

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

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_subr/x509-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Make some private dumpfile APIs more opaque.

* subversion/include/private/svn_repos_private.h,

subversion/libsvn_repos/dump.c

(svn_repos__dumpfile_header_entry_t): Move from the header to the

implementation.

(svn_repos__dumpfile_headers_t): New.

(svn_repos__dumpfile_header_push,

svn_repos__dumpfile_header_pushf,

svn_repos__dump_headers,

svn_repos__dump_node_record): Use svn_repos__dumpfile_headers_t instead

of apr_array_header_t. Remove the redundant 'terminate' parameter from

svn_repos__dump_headers. Update callers.

* subversion/svndumpfilter/svndumpfilter.c

(node_baton_t): Update to use svn_repos__dumpfile_headers_t instead

of apr_array_header_t.

* subversion/svnrdump/dump_editor.c

(dir_baton,

get_props_content,

dump_node_delete,

dump_node,

dump_mkdir,

close_file): Update to use svn_repos__dumpfile_headers_t instead

of apr_array_header_t.

  1. … 3 more files in changeset.
Factor out writing a dumpfile node record, from 'svnadmin dump', 'svnrdump

dump' and 'svndumpfilter'.

[Note from the future: this changed the order of headers in a node record.

Prop-content-length and Text-content-length now come last, just before

Content-length. The test suite was adjusted to accommodate this in r1655064.]

* subversion/include/private/svn_repos_private.h

(svn_repos__dump_node_record): New function.

* subversion/libsvn_repos/dump.c

(svn_repos__dump_node_record): New, moved from output_node_record in

svndumpfilter.c. Make the content-length header optional when there are

no properties or text, so we can preserve exact behaviour.

(dump_node): Use it.

* subversion/svndumpfilter/svndumpfilter.c

(output_node_record): Delete; move to svn_repos__dump_node_record.

(set_fulltext,

close_node): Adjust callers.

* subversion/svnrdump/dump_editor.c

(dir_baton): Add a 'headers' field in which to accumulate headers.

(make_dir_baton): Initialize the 'headers' field.

(get_props_content): Don't add a Prop-content-length header here.

(dump_node): Return headers instead of writing them.

(dump_mkdir,

dump_pending_dir): Simplify by using svn_repos__dump_node_record().

(open_root,

add_directory): Adjust a call to dump_node() to store the headers in the

node baton instead of writing them out straight away.

(close_directory): The same, and instead of adjusting the second dump_node

call and then dumping the resulting headers, use dump_node_delete().

(close_file): Adjust the call to dump_node() and use the headers returned

from it as the starting point for creating the rest of the headers.

  1. … 3 more files in changeset.
Fix issue #4553 "dumpfile has wrong node kind in delete record", by omitting

the node kind from the 'delete' record in this case just like we omit it

from the 'delete' record in non-replace cases. This applies to 'svnadmin

dump' and 'svnrdump dump'.

* subversion/libsvn_repos/dump.c,

subversion/svnrdump/dump_editor.c

(dump_node_delete): Remove support for the node kind.

(dump_node): Don't pass the node kind to dump_node_delete().

  1. … 1 more file in changeset.
Change the way a 'replace' is converted to delete-and-add in 'svnadmin load'

and 'svnrdump load', in preparation for fixing issue #4553 "dumpfile has wrong

node kind in delete record".

No functional change.

* subversion/libsvn_repos/dump.c

(dump_node_delete): New function.

(dump_node): Handle a replace-with-history by calling dump_node_delete

for the delete part and falling through to the 'add' case for the add part.

Convert a multiple 'if' statement to a 'switch' statement to facilitate

falling through, and for consistency with the svnrdump version of it.

* subversion/svnrdump/dump_editor.c

(dump_node_delete): New function.

(dump_node): Handle a replace-with-history by calling dump_node_delete

for the delete part and falling through to the 'add' case for the add part.

  1. … 1 more file in changeset.
* subversion/libsvn_repos/dump.c

(change_dir_prop): Add comments.

* subversion/libsvn_repos/dump.c,

subversion/svnrdump/dump_editor.c

(add_directory,

add_file): Rename 'val' to 'was_deleted' for clarity.

  1. … 1 more file in changeset.
Removed unused structure fields.

* subversion/libsvn_repos/dump.c

(dir_baton): Remove 'parent_dir_baton' and 'added' fields.

(make_dir_baton): Remove initializations.

Adjust callers.

* subversion/svnrdump/dump_editor.c

(dir_baton): Remove 'parent_dir_baton' and 'added' fields.

(file_baton): Remove 'parent_dir_baton' field.

(make_dir_baton,

make_file_baton): Remove initializations.

Adjust callers.

  1. … 1 more file in changeset.
More work on deduplicating dump/load code. This time, the target is the

functionality of formatting and writing headers, rather than significant

amounts of code. Factor this out of svnadmin, svnrdump and svndumpfilter.

This starts to make the writing of headers a batch action rather than a

series of sporadic writes to the stream from various code paths. In turn,

this paves the way for further refactoring.

No functional change.

* subversion/include/private/svn_repos_private.h,

subversion/libsvn_repos/dump.c

(svn_repos__dumpfile_headers_create,

svn_repos__dumpfile_header_push,

svn_repos__dumpfile_header_pushf,

svn_repos__dump_headers): New functions.

(dump_node): Use them instead of writing directly to the stream.

* subversion/svndumpfilter/svndumpfilter.c

(node_baton_t): Change the type of the headers accumulator. Add a per-node

pool.

(new_node_record): Initialize the new fields. Use the new functions

instead of writing directly to the stream. Don't write the headers to

the stream here; instead leave them in the node baton for writing later.

(output_node_record): Rename from 'output_node'. Take separate parameters

instead of the node baton. Use the new functions instead of writing

directly to the stream.

(set_fulltext,

close_node): Track the changes to output_node.

* subversion/svnrdump/dump_editor.c

(get_props_content

dump_node

dump_mkdir

dump_pending

close_file): Use the new style for writing headers.

  1. … 3 more files in changeset.