Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Update issue tracker links in comments, from Tigris (issuezilla) to Apache (Jira).

URL fragment identifiers like '#desc5' are left in place, not yet updated.

This is a merge of r1828508 from the 'shelve-checkpoint' branch where I

committed it by mistake.

  1. … 43 more files in changeset.
Add 'http-compression=auto' mode on the client, now used by default.

Following up on the recently added support for LZ4 compression, this patch

introduces the new possible 'auto' mode for our client 'http-compression'

configuration option, and starts using it by default.

The previously used default was 'http-compression=yes', and the new 'auto'

mode is a small, but an important tweak to its behavior. In the new mode,

the HTTP compression is still being used, but the negotiating is tweaked

to favor svndiff2 with LZ4 compression when working over local networks.

The reasoning behind this is that for local networks it probably makes sense

to favor compression speed of LZ4 instead of the better compression ratio

from zlib-5, which has been used previously.

To separate local and wide area networks, we use the connection latency of

the initial OPTIONS request obtained with serf_connection_get_latency().

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Document the new default and possible values of

the http-compression option.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t.using_compression): Turn into a tristate field.

(svn_ra_serf__session_t.conn_latency): New field.

(svn_ra_serf__is_local_network): Declare new helper function.

(svn_ra_serf__setup_svndiff_accept_encoding): Accept a session instead

of the 'using_compression' boolean argument.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__is_local_network): Implement this new function.

(svn_ra_serf__setup_svndiff_accept_encoding): Tweak the Accept-Encoding

to indicate that we'd like to see svndiff2 with http-compression=auto

and when working over a local network. Otherwise, when using compression,

indicate both svndiff2 and svndiff1 support, but tell the server that we

favor svndiff1.

(setup_request): Properly handle the 'using_compression' field, which

is now a tristate.

* subversion/libsvn_ra_serf/serf.c

(load_config): Get the compression setting as a tristate.

(svn_ra_serf__open): Initialize the connection latency to default

value before we make the initial OPTIONS request.

(ra_serf_dup_session): Add placeholder comment for the new field.

* subversion/libsvn_ra_serf/options.c

(options_response_handler): Remember the connection latency in the

session.

* subversion/libsvn_ra_serf/commit.c

(negotiate_put_encoding): Rework to support new http-compression=auto

mode. Update or rewrite the related comments.

* subversion/libsvn_ra_serf/blame.c

(blame_context_t): Store session instead of the 'using_compression' field.

(setup_headers): Update call to svn_ra_serf__setup_svndiff_accept_encoding().

(svn_ra_serf__get_file_revs): Remember the used session in context.

* subversion/libsvn_ra_serf/replay.c

(revision_report_t): Store session instead of the 'using_compression' field.

(setup_headers): Update call to svn_ra_serf__setup_svndiff_accept_encoding().

(svn_ra_serf__replay_range): Remember the used session in context.

* subversion/libsvn_ra_serf/update.c

(fetch_ctx_t): Store session instead of the 'using_compression' field.

(headers_fetch): Update call to svn_ra_serf__setup_svndiff_accept_encoding().

Properly handle the 'using_compression' field, which is now a tristate.

(fetch_for_file): Remember the used session in the fetch context.

(setup_update_report_headers): Update call to

svn_ra_serf__setup_svndiff_accept_encoding().

* subversion/mod_dav_svn/repos.c

(get_svndiff_version): New helper function.

(negotiate_encoding_prefs): Tweak the negotiation logic. Only override

the client's preference if it supports svndiff2 and SVNCompressionLevel

is set to 1. In all other cases, select the svndiff format that the

client prefers to see (the one with the largest ;q= value in the Accept-

Encoding header).

  1. … 10 more files in changeset.
ra_serf: Advertise support for compressed svndiff1 format in the

Accept-Encoding header for file-revs and replay REPORT requests.

This makes "svn blame" and "svnsync sync" receive compressed deltas

when HTTP compression is enabled on both the server and the client.

The new behavior is equivalent to how "svn checkout" currently works

over HTTP.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__setup_svndiff_accept_encoding): Declare new helper.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__setup_svndiff_accept_encoding): New helper function,

factored out from ...

* subversion/libsvn_ra_serf/update.c

(setup_update_report_headers): ...this function.

* subversion/libsvn_ra_serf/blame.c

(struct blame_context_t): Remember if we are interested in compression

using the new 'using_compression' field.

(setup_headers): New function that sets the Accept-Encoding header.

(svn_ra_serf__get_file_revs): Advertise svndiff1 support in the

REPORT request headers.

* subversion/libsvn_ra_serf/replay.c

(struct revision_report_t): Remember if we are interested in compression

using the new 'using_compression' field.

(setup_headers): New function that sets the Accept-Encoding header.

(svn_ra_serf__replay_range): Advertise svndiff1 support in the

REPORT request headers.

  1. … 4 more files in changeset.
Apply some minor tweaks to libsvn_ra_serf to handle some http/2 cases.

This reduces the number of testfailures to 3 or 5 for me when running

the tests over http/2 with a slightly patched serf trunk.

(2 tests that rely on the http reason text.

2 tests that somehow hit an httpd limit

And one segfault/abort in serf triggered by a svnmover test)

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t): Add boolean.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Implement api for http/2.0 by not implementing

it. See comment.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Initialize new var.

(ra_serf_dup_session): Document that we dup a variable.

* subversion/libsvn_ra_serf/util.c

(conn_negotiate_protocol): Tweak a few more vars.

(handle_response): Also detect 2.0

  1. … 3 more files in changeset.
* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Set Content-Type on report request, just like

in svn_ra_serf__replay().

In ra-serf: make all our custom 'REPORT' requests expect only HTTP status 200

as OK (instead of just >= 200 && < 299), and switch them to a helper function

that may provide more detailed error messages if they fail, but with less

specific arguments.

Note that unlike in <= 1.8.x real error reports will never reach this code,

as server error reports are already handled in the request callbacks, so

this most likely only affects non-subversion responses.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Expect 200.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_locations): Expect 200.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Expect 200.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Expect 200.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay): Expect 200.

  1. … 4 more files in changeset.
In ra-serf and ra-svn: Make svn_ra_replay_range properly handle errors to

make the ra layers behave in the same way, and to allow re-using the ra

session after a failure without seeing spurious errors caused by previous

requests.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_replay_range): Add assertions here that already apply to some

ra layers.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Use subpool to allow unregistering requests.

* subversion/libsvn_ra_svn/client.c

(ra_svn_replay_range): Properly handle errors reported during replay,

instead of just noting a protocol error.

  1. … 2 more files in changeset.
In ra_serf: Don't report that the xml is malformed during replay if the

callback just decided that it doesn't need the actual data.

* subversion/libsvn_ra_serf/replay.c

(replay_closed): Fix assumption that there is always a stream, because

in a specific case we don't create one.

Make the session an argument of svn_ra_serf__create_expat_handler.

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs): Update caller.

* subversion/libsvn_ra_serf/getdate.c

(svn_ra_serf__get_dated_revision): Update caller.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Update caller.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments): Update caller.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Update caller.

* subversion/libsvn_ra_serf/get_deleted_rev.c

(svn_ra_serf__get_deleted_rev): Update caller.

* subversion/libsvn_ra_serf/get_lock.c

(svn_ra_serf__get_lock): Update caller.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Update caller.

* subversion/libsvn_ra_serf/lock.c

(svn_ra_serf__lock): Update caller.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Update caller.

* subversion/libsvn_ra_serf/merge.c

(svn_ra_serf__run_merge): Remove argument. Update caller.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Update caller.

* subversion/libsvn_ra_serf/multistatus.c

(svn_ra_serf__setup_error_parsing): Update caller.

* subversion/libsvn_ra_serf/options.c

(create_options_req): Update caller.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__create_propfind_handler): Update caller.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__create_expat_handler): Add argument.

(svn_ra_serf__run_merge): Remove argument.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay,

svn_ra_serf__replay_range): Update caller.

* subversion/libsvn_ra_serf/update.c

(finish_report): Update caller.

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__create_expat_handler): Set session and conn from new argument.

  1. … 19 more files in changeset.
In ra_serf: Stop passing around explicit session, session->conn[0] pairs in the

propfind/options handling where using anything other than the primary connection

doesn't really make sense.

This simplifies a lot of code, and allows further refactoring later on.

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs): Update caller.

* subversion/libsvn_ra_serf/commit.c

(get_version_url): Update caller.

(open_root): Update caller. Move a bit of code to the property handling.

(add_directory,

add_file,

svn_ra_serf__get_commit_editor): Update caller.

* subversion/libsvn_ra_serf/getdate.c

(svn_ra_serf__get_dated_revision): Update caller.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Update caller.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments): Update caller.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Update caller.

* subversion/libsvn_ra_serf/get_deleted_rev.c

(svn_ra_serf__get_deleted_rev): Update caller.

* subversion/libsvn_ra_serf/get_file.c

(svn_ra_serf__get_file): Update caller.

* subversion/libsvn_ra_serf/inherited_props.c

(get_iprops_via_more_requests,

svn_ra_serf__get_inherited_props): Update caller.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Update caller.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Update caller.

* subversion/libsvn_ra_serf/options.c

(create_options_req): Update caller.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__deliver_props2): Rename to...

(svn_ra_serf__create_propfind_handler): ... this and remove conn argument.

Update caller.

(svn_ra_serf__wait_for_props): Remove function. Fold into two callers.

(svn_ra_serf__fetch_node_props): Update caller.

(retrieve_baseline_info,

v1_get_youngest_revnum,

svn_ra_serf__get_youngest_revnum,

get_baseline_info,

svn_ra_serf__get_stable_url): Use session instead of connection.

(svn_ra_serf__fetch_dav_prop): Update caller.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__deliver_props2): Rename to...

(svn_ra_serf__create_propfind_handler): ... this. Update arguments and docs.

(svn_ra_serf__fetch_node_props,

svn_ra_serf__fetch_dav_prop,

svn_ra_serf__v2_get_youngest_revnum,

svn_ra_serf__v1_get_activity_collection,

svn_ra_serf__discover_vcc,

svn_ra_serf__report_resource,

svn_ra_serf__get_relative_path,

svn_ra_serf__get_stable_url): Use just a session as argument.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay,

svn_ra_serf__replay_range): Update caller.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__reparent,

serf__rev_proplist,

svn_ra_serf__get_repos_root): Update caller.

* subversion/libsvn_ra_serf/stat.c

(fetch_path_props,

svn_ra_serf__get_dir): Update caller.

* subversion/libsvn_ra_serf/update.c

(fetch_for_file): Update caller.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__discover_vcc,

svn_ra_serf__get_relative_path,

svn_ra_serf__report_resource): Update argument handling.

  1. … 18 more files in changeset.
In ra_serf's replay code: avoid some unneeded complexity for code that

can just be called from the done delegate.

* subversion/libsvn_ra_serf/replay.c

(ra_serf_list_t): Remove struct/typedef.

(revision_report_t): Remove linked list.

(replay_done): Move function to its only user.

(svn_ra_serf__replay): Remove unneeded initialization.

(replay_done): Move function here. Handle done logic from here.

(svn_ra_serf__replay_range): Rename pool to scratch pool and move more

data to per revision pools.

Resolve an old ra_serf TODO: Add scratch_pool arguments to

svn_ra_serf__request_body_delegate_t and

svn_ra_serf__request_header_delegate_t.

No functional changes.

* subversion/libsvn_ra_serf/blame.c

(create_file_revs_body): Add argument.

* subversion/libsvn_ra_serf/commit.c

(create_checkout_body,

setup_proppatch_headers): Add argument.

(create_proppatch_body): Add argument. Set scratch pool to pool :(

(create_put_body,

create_empty_put_body,

setup_put_headers,

setup_copy_file_headers,

setup_add_dir_common_headers,

setup_copy_dir_headers,

setup_delete_headers,

create_txn_post_body,

setup_post_headers): Add argument.

* subversion/libsvn_ra_serf/getdate.c

(create_getdate_body): Add argument.

* subversion/libsvn_ra_serf/getlocations.c

(create_get_locations_body): Add argument.

* subversion/libsvn_ra_serf/getlocationsegments.c

(create_gls_body): Add argument.

* subversion/libsvn_ra_serf/getlocks.c

(create_getlocks_body): Add argument.

* subversion/libsvn_ra_serf/get_deleted_rev.c

(create_getdrev_body): Add argument.

* subversion/libsvn_ra_serf/get_file.c

(headers_fetch): Add argument.

* subversion/libsvn_ra_serf/get_lock.c

(create_getlock_body,

setup_getlock_headers): Add argument.

* subversion/libsvn_ra_serf/inherited_props.c

(create_iprops_body): Add argument.

* subversion/libsvn_ra_serf/lock.c

(set_lock_headers,

create_lock_body,

set_unlock_headers): Add argument.

* subversion/libsvn_ra_serf/log.c

(create_log_body): Add argument.

* subversion/libsvn_ra_serf/merge.c

(setup_merge_headers,

create_merge_body): Add argument.

* subversion/libsvn_ra_serf/mergeinfo.c

(create_mergeinfo_body): Add argument.

* subversion/libsvn_ra_serf/options.c

(create_options_body,

create_simple_options_body): Add argument.

* subversion/libsvn_ra_serf/property.c

(setup_propfind_headers,

create_propfind_body): Add argument.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__request_body_delegate_t,

svn_ra_serf__request_header_delegate_t): Add argument. Remove old TODO.

* subversion/libsvn_ra_serf/replay.c

(create_replay_body): Add argument.

* subversion/libsvn_ra_serf/update.c

(headers_fetch,

create_update_report_body,

setup_update_report_headers): Add argument.

* subversion/libsvn_ra_serf/util.c

(setup_request): Update caller.

  1. … 19 more files in changeset.
In ra serf: Use the streamy results of the propfind result parser where

possible, instead of using walkers over the three way nested hash. Introduce

two standard collectors.

* subversion/libsvn_ra_serf/inherited_props.c

(keep_only_regular_props): Move to property.c.

(get_iprops_via_more_requests): Use direct hash delivery, to avoid hacky

lookup. Provide server error when available.

(svn_ra_serf__get_inherited_props): Remove obsolete comment.

* subversion/libsvn_ra_serf/property.c

(deliver_prop_baton_t): Remove baton.

(deliver_prop,

deliver_prop): Remove functions.

(svn_ra_serf__deliver_svn_props,

svn_ra_serf__deliver_node_props): New functions.

(svn_ra_serf__retrieve_props): Remove function.

(svn_ra_serf__fetch_node_props): Fetch node props without intermediate step.

(svn_ra_serf__keep_only_regular_props):

New function (copied from inherited_props.c).

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__keep_only_regular_props): New function.

(svn_ra_serf__deliver_props): Remove function.

(svn_ra_serf__deliver_svn_props,

svn_ra_serf__deliver_node_props): New function.

* subversion/libsvn_ra_serf/replay.c

(revision_report_t): Use single hash revs_props for revision props.

(replay_opened): Filter revision props.

(replay_closed): Update caller.

(svn_ra_serf__replay): Update init.

(svn_ra_serf__replay_range): Properly name per revision context to document

lifetime. Update init.

* subversion/libsvn_ra_serf/serf.c

(serf__rev_proplist): Resolve old todo.

  1. … 4 more files in changeset.
* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Set variable earlier in loop to avoid

uninitialized memory read identified by valgrind.

* subversion/include/svn_fs.h

(enum svn_fs_path_change_kind_t): Remove trailing comma.

* subversion/libsvn_client/mtcc.c

(enum mtcc_kind_t): Remove trailing comma.

* subversion/libsvn_fs_x/tree.c

(enum copy_type_t): Remove trailing comma.

* subversion/libsvn_ra_serf/replay.c

(enum replay_state_e): Remove trailing comma.

  1. … 3 more files in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

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

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

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

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.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

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

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

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

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

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

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

* subversion/tests/libsvn_wc/conflict-data-test.c

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

* subversion/tests/libsvn_wc/wc-test.c

* subversion/tests/svn_test_fs.c

* tools/server-side/fsfs-stats.c

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Following up on r1557207, remove the old style xml parser from the ra_serf

internal api.

* subversion/libsvn_ra_serf/inherited_props.c

(get_iprops_via_more_requests): Update caller.

* subversion/libsvn_ra_serf/property.c

(propfind_context_t): Remove done list support.

(propfind_closed): Don't add to done list.

(svn_ra_serf__deliver_props): Remove unused argument.

* subversion/libsvn_ra_serf/ra_serf.h

(ns_t): Move to xml.c

(ra_serf_list_t): Move to replay.c

(svn_ra_serf__xml_state_t,

svn_ra_serf__xml_parser_t,

svn_ra_serf__xml_start_element_t,

svn_ra_serf__xml_end_element_t,

svn_ra_serf__xml_cdata_chunk_handler_t,

svn_ra_serf__xml_parser_t): Remove.

(svn_ra_serf__handle_xml_parser,

svn_ra_serf__xml_push_state,

svn_ra_serf__xml_pop_state,

svn_ra_serf__define_ns): Remove unused functions.

(svn_ra_serf__expand_ns): Hide from internal api.

(svn_ra_serf__deliver_props): Remove unused argument.

* subversion/libsvn_ra_serf/replay.c

(ra_serf_list_t): Move definition here.

(svn_ra_serf__replay_range): Update caller.

* subversion/libsvn_ra_serf/update.c

(fetch_for_file,

fetch_for_dir): Update caller.

* subversion/libsvn_ra_serf/util.c

(start_xml,

end_xml,

cdata_xml,

add_done_item): Remove functions.

(svn_ra_serf__handle_xml_parser): Remove function.

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__ns_t): Move definition here.

(svn_ra_serf__define_ns): Remove function.

(svn_ra_serf__expand_ns): Rename to ...

(expand_ns): ... this and make static.

(svn_ra_serf__xml_push_state,

svn_ra_serf__xml_pop_state): Remove functions.

(svn_ra_serf__xml_cb_start): Update caller.

  1. … 6 more files in changeset.
Add some comments explaining what interface a function implements.

No functional changes.

* subversion/libsvn_ra_serf/log.c

(create_log_body): Add comment.

* subversion/libsvn_ra_serf/merge.c

(create_merge_body): Add comment.

* subversion/libsvn_ra_serf/mergeinfo.c

(create_mergeinfo_body): Add comment.

* subversion/libsvn_ra_serf/options.c

(create_options_body,

create_simple_options_body): Add comment.

* subversion/libsvn_ra_serf/property.c

(create_propfind_body): Add comment.

* subversion/libsvn_ra_serf/replay.c

(create_replay_body): Add comment.

  1. … 5 more files in changeset.
Consolidate http status and server error reporting in a new handler

callback to avoid leaking server errors (which causes an error leak)

and to simplify usage. This patch also removes the xml handling done

handler that was a workaround for this plumbing for a few specific

handlers.

This finally makes it possible to make progress towards converting

the update implementation to the transition based xml parser.

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs): Update caller.

* subversion/libsvn_ra_serf/getdate.c

(svn_ra_serf__get_dated_revision): Update caller.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Update caller.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments): Update caller.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Update caller.

* subversion/libsvn_ra_serf/get_deleted_rev.c

(svn_ra_serf__get_deleted_rev): Update caller.

* subversion/libsvn_ra_serf/get_lock.c

(svn_ra_serf__get_lock): Update caller.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Update caller.

* subversion/libsvn_ra_serf/lock.c

(run_locks): Update caller. Handle server errors the new way.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Update caller.

* subversion/libsvn_ra_serf/merge.c

(svn_ra_serf__run_merge): Update caller.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Update caller.

* subversion/libsvn_ra_serf/multistatus.c

(multistatus_opened): Document a bit of history.

(multistatus_closed): Update for baton changes.

(multistatus_done): Rename to...

(svn_ra_serf__server_error_create): ... this and update usage

pattern to avoid error leaks. Add some comments.

(svn_ra_serf__setup_error_parsing): Update caller.

(svn_ra_serf__handle_server_error): Handle eof for 207 responses.

* subversion/libsvn_ra_serf/options.c

(create_options_req): Update caller. Use standard error handling.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__deliver_props): Update caller.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__response_done_delegate_t): New type.

(svn_ra_serf__handler_t): Add done handler.

(svn_ra_serf__xml_done_t): Remove type.

(svn_ra_serf__xml_context_create): Remove argument.

(svn_ra_serf__server_error_t): Remove error and keep track of original

handler instead of just the status line to allow clearing server error.

(svn_ra_serf__server_error_create): New function.

* subversion/libsvn_ra_serf/replay.c

(replay_done): Convert from svn_ra_serf__xml_done_t to

svn_ra_serf__response_done_delegate_t.

(svn_ra_serf__replay): Update caller.

(svn_ra_serf__replay_range): Update caller.

* subversion/libsvn_ra_serf/update.c

(finish_report): Check server error when the response is done.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__context_run_one): Remove server error handling.

(handle_response): Remove unexpected status handling from here.

(handle_response_cb): Call done handler (when done).

(response_done): New function.

(svn_ra_serf__create_handler): Setup response_done as default done handler.

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__xml_context_t): Remove done callback.

(svn_ra_serf__xml_context_done): Stop calling done callback.

(svn_ra_serf__xml_context_create): Remove done setup.

  1. … 19 more files in changeset.
Following up on r1553274, revert an libsvn_ra_serf internal api change as

the 'return status errors at the end of the request' fix made this change

unnecessary.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__deliver_props): Don't set no_fail_on_http_failure_status.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__deliver_props): Revert documentation change.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Don't set flag to default value.

* subversion/libsvn_ra_serf/update.c

(fetch_file): Don't set flag to default value.

  1. … 3 more files in changeset.
In libsvn_ra_serf: Delay the http status based failure creation until the

response is completely read. This allows reading further responses from the

same connection, which would fail before this patch. This finally allows

handling HTTP 404 errors like other http status failures.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Don't fail on 404 errors.

* subversion/libsvn_ra_serf/options.c

(create_options_req): Don't fail via status code as we probe for repositories

here.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__deliver_props): Allow unexpected status codes.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__deliver_props): Document status behavior.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): Request default error behavior for propfind.

* subversion/libsvn_ra_serf/update.c

(fetch_file,

end_report): Request default error behavior.

* subversion/libsvn_ra_serf/util.c

(handle_server_error): Remove function.

(svn_ra_serf__handle_xml_parser): Remove 404 code.

(handle_response): Remove 404 specialization. Delay status based error

creation until the request is completed, like how we handle server

errors.

(handle_response_cb): Return APR_EOF when serf reported EOF for the request.

  1. … 6 more files in changeset.
Following up on r1552043, handle http status 404 as an http failure. Use the

new non-fatal handle mode (see r1551993) in the few places where a 404 error

is not a failure.

Remove duplicated http status based error messages from the error chains.

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs): Avoid duplicated errors.

* subversion/libsvn_ra_serf/commit.c

(open_root): Use standard error when possible.

* subversion/libsvn_ra_serf/getdate.c

(svn_ra_serf__get_dated_revision): Avoid duplicated errors.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Avoid duplicated errors.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments): Avoid duplicated errors.

* subversion/libsvn_ra_serf/get_lock.c

(svn_ra_serf__get_lock): Avoid duplicated errors.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Avoid duplicated errors.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Avoid duplicated errors.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Avoid duplicated errors.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Avoid duplicated errors.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__wait_for_props): Avoid duplicated errors.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay): Avoid duplicated errors.

* subversion/libsvn_ra_serf/update.c

(finish_report): Avoid duplicated errors.

  1. … 12 more files in changeset.
Use SVN_VA_NULL instead of plain NULL in variable-arguments lists in all

remaining cases, as far as I can discover, following r1536307 (introducing

SVN_VA_NULL) and r1543394 (warning about missing or inappropriate sentinels for

some Subersion functions).

[Lots of implementation files]: Replace NULL with SVN_VA_NULL in function

calls with variable argument lists.

  1. … 37 more files in changeset.
Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

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

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

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

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

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.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,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

subversion/libsvn_wc/old-and-busted.c,

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

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

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

subversion/tests/libsvn_subr/hashdump-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

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

subversion/tests/libsvn_wc/conflict-data-test.c,

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

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Convert ra_serfs 'svn_ra_replay' support to the transition based xml parser.

Also improve the memory usage of the driven editor by passing per-node scoped

pools to the editor's 'add_*' and 'open_*' methods.

* subversion/libsvn_ra_serf/replay.c

(includes): Add svn_hash.h.

(replay_state_e): Add new states. Use common prefix.

(replay_ttable): New transition table.

(replay_node_t): New struct, containing per file/dir state.

(replay_context_t): Renamed to...

(revision_report_t): ... this. Remove per item state and now unused vars.

(push_state): Remove function.

(start_replay,

end_replay,

cdata_replay): Remove functions fold functionality in these...

(replay_opened,

replay_closed,

replay_cdata): New functions. Add more error checking based on the node

stack.

(replay_done): New function. Handles magic that was part of the old xml parser.

(create_replay_body): Use passed pool for tempvars instead of long lived ctx.

(svn_ra_serf__replay): Store context on the stack. Use handler->done.

Use new parser.

(svn_ra_serf__replay_range): Move variables referenced from contexts to the outer

scope, to show they are used out of scope. Use new parser. Reduce scope of

done handling variables.

Improve http status checking in ra_serf, by providing a default error for

unexpected server error, unexpected client error and unexpected moved status

values instead of handling all of the unexpected values as SVN_NO_ERROR.

This turns the

[[

In file

'D:\Development\SVN\Releases\TortoiseSVN-1.8.0\ext\subversion\subversion\libsvn_client\ra.c'

line 647: assertion failed (peg_revnum != SVN_INVALID_REVNUM)

]]

into the http error that is causing this problem.

Something like:

[[

svn: E175002: DAV request failed: Content length required

]]

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs): Update caller.

* subversion/libsvn_ra_serf/commit.c

(return_response_err): Update caller.

* subversion/libsvn_ra_serf/getdate.c

(svn_ra_serf__get_dated_revision): Add status check and verify result to

make sense.

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations): Update caller.

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments): Update caller.

* subversion/libsvn_ra_serf/getlocks.c

(svn_ra_serf__get_locks): Update caller.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Update caller.

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log): Update caller.

* subversion/libsvn_ra_serf/mergeinfo.c

(svn_ra_serf__get_mergeinfo): Update caller. Don't drop detailed errors.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__v2_get_youngest_revnum): Update caller. Verify if result

makes sense.

(svn_ra_serf__v1_get_activity_collection): Update caller.

(svn_ra_serf__exchange_capabilities): Update caller.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__wait_for_props): Update caller.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__error_on_status): Update argument to pass the entire status to

allow creating better messages for unknown errors.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay): Update caller.

(svn_ra_serf__replay_range): Update caller.

* subversion/libsvn_ra_serf/update.c

(handle_stream): Update caller.

(finish_report): Update caller.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__error_on_status): Extend arguments. Provide specialized error

for http status 411 and a generic error for all currently unexpected

errors.

  1. … 14 more files in changeset.
Fix a problem in the ra_serf replay implementation which caused 404

responses to the REPORT requests to go unnoticed.

* subversion/libsvn_ra_serf/replay.c

(replay_context_t): Add 'report_hander' member.

(svn_ra_serf__replay, svn_ra_serf__replay_range): Initialize new

'report_handler' replay context baton member, and use it to check

for errors (based on status code) in the completed REPORT

response(s).

Fix issue #4287 ("svn_ra_replay (and related APIs) HTTP wire protocol

design flaw").

Teach mod_dav_svn to also accept "replay-report" REPORT requests

against a baselined version resource (practically speaking, a revision

resource), which is the correct resource to query about "changes which

occured in this revision". When the REPORT is aimed at a revision

resource, it should *not* include an embedded revision (that's

redundant at a minimum, and could be conflicting), and it *should*

carry an embedded "include path" (since that path is not represented

in the resource URL).

Teach ra_serf to send such REPORT requests against a revision resource

URL, only falling back to the use of the public session URL when the

server doesn't support the new approach.

* subversion/include/svn_dav.h

(SVN_DAV_NS_DAV_SVN_REPLAY_REV_RESOURCE): New header #define.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t): Add 'supports_rev_rsrc_replay' flag.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): If we see the

SVN_DAV_NS_DAV_SVN_REPLAY_REV_RESOURCE header, set the session

baton's 'supports_rev_rsrc_replay' flag.

* subversion/libsvn_ra_serf/replay.c

(replay_context_t): Add 'include_path' member.

(create_replay_body): If an include path is provided, drop it into

the REPORT request body, and don't add the revision; otherwise, do

the reverse for compatibility with old servers.

(svn_ra_serf__replay_range): Consult the session baton's new flag to

see if we need to aim the REPORT at a revision resource (which is

the best option) or fall back to hitting the public resource URL

of the include path itself (the session URL).

* subversion/mod_dav_svn/reports/replay.c

(dav_svn__replay_report): Also handle the flavor of this REPORT

which occurs when it is submitted against a revision resource.

* subversion/mod_dav_svn/version.c

(get_option): When HTTP0-v2-enabled, include the new

SVN_DAV_NS_DAV_SVN_REPLAY_REV_RESOURCE header.

* notes/http-and-webdav/webdav-protocol

Document the existence of, and request syntax of, the

"replay-report" REPORT.

  1. … 6 more files in changeset.
Cruft removal.

* subversion/libsvn_ra_serf/replay.c

(replay_context_t): Lose not-really-used 'report_target' member.

(svn_ra_serf__replay, svn_re_serf__replay_range): Stop messing with

the now-removed structure member.

Use an existing API(svn_ra_serf__context_run_wait()) instead of

in-line code for processing connections defined by the serf context.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): As above.

Patch by: Vijayaguru G <vijay{_AT_}collab.net>

(Tweaked by me.)