Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
When following an HTTP redirect, use the Location header URL exactly.

Previously we canonicalized the redirect URL, which could lead to a redirect

loop. Then Subversion would report a redirect loop as the error, potentially

hiding a more interesting error such as when the target is not in fact a

Subversion repository.

A manual test case (on a non-repository):

before:

$ svn ls https://archive.apache.org/dist

Redirecting to URL 'https://archive.apache.org/dist':

Redirecting to URL 'https://archive.apache.org/dist':

svn: E195019: Redirect cycle detected for URL 'https://archive.apache.org/dist'

after:

$ svn ls https://archive.apache.org/dist

Redirecting to URL 'https://archive.apache.org/dist/':

svn: E170013: Unable to connect to a repository at URL 'https://archive.apache.org/dist/'

svn: E175003: The server at 'https://archive.apache.org/dist/' does not support the HTTP/DAV protocol

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Don't canonicalize the redirect URL.

* subversion/libsvn_ra_serf/util.c

(response_get_location): Don't canonicalize the redirect URL.

  1. … 1 more file in changeset.
Return a better error message when connecting to an URL on a server

that does not implement the DAV protocol.

* subversion/libsvn_ra_serf/options.c

(options_context_t): New member received_dav_header.

(capabilities_headers_iterator_callback):

Set it if the HTTP response contains the DAV: header.

(options_response_handler):

Bail out early with a specific message if the server doesn't support DAV.

* subversion/tests/cmdline/dav_tests.py: New test fixture.

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

(other_dav_root_dir, non_dav_root_dir): New global variable.

(execute_tests): Initialize other_dav_root_dir and non_dav_root_dir.

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

(setup_pristine_greek_repository):

Create the directories for other_dav_root_dir and non_dav_root_dir.

* subversion/tests/cmdline/davautocheck.sh:

Load mod_dav_fs and configure httpd for dav_tests.py.

  1. … 4 more files in changeset.
Add the client-side implementation for the 'svn/list' report.

* subversion/libsvn_ra_serf/list.c

(): New file implementing the client-side handling of the new report.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback,

options_response_handler): Use the new capability when advertized by

the server

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__list): Declare new vtable function implementaton.

* subversion/libsvn_ra_serf/serf.c

(serf_vtable): Enable the new report on the client-side.

  1. … 3 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.
Lay the groundwork that would allow ra_serf to stream svndiff deltas

without creating temporary files when working against new servers.

This patch adds a new delta editor callback, apply_textdelta_stream()

that we'll use to stream the deltas, fully implements in the ra_serf's

commit editor, but doesn't yet change the behavior of existing editor

drivers, such as svn_client_import5() or svn_client_commit6().

This requires a minor tweak to the Subversion's HTTP protocol, and

it's the reason why streaming would only work against new servers.

Currently, all PUT requests include a special header that contains the

result checksum, which is used by the server to validate the integrity

of the result after it applies the delta received over the wire. While

this approach works fine if the client first creates a temporary file with

the delta and only then starts sending it to the server (the result checksum

is calculated while preparing the temporary file), it can't be used in the

stream approach, as with it we'd need to know the result checksum _before_

we start sending data.

So we turn the existing scheme inside out, and teach mod_dav_svn to send the

result checksum in the responses to PUT requests. Then, the client would

check if the received checksum matches what it calculated, and, possibly,

return a checksum mismatch error (thus aborting the edit and the transaction).

* subversion/include/svn_delta.h

(svn_txdelta_stream_open_func_t): New callback type.

(svn_delta_editor_t): Add a forward declaration for this type.

(svn_delta_editor_t.apply_textdelta_stream): New vtable member.

* subversion/libsvn_delta/default_editor.c

(apply_textdelta_stream): Provide default implementation for this callback

that performs a fallback to apply_textdelta().

(default_editor): Extend the default instance of an svn_delta_editor_t.

* subversion/libsvn_delta/cancel.c

(apply_textdelta_stream): Implement this forwarding callback, and ...

(svn_delta_get_cancellation_editor): ...install it here.

* subversion/include/svn_dav.h

(SVN_DAV_NS_DAV_SVN_PUT_RESULT_CHECKSUM): New.

* subversion/mod_dav_svn/repos.c

(close_stream): Send the "X-SVN-Result-Fulltext-MD5" header when responding

to successful PUT requests.

* subversion/mod_dav_svn/version.c

(get_vsn_options): Advertise new capability.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t.supports_put_result_checksum): New field.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Remember if the server sends

the result checksum in the response to a successful PUT request.

* subversion/libsvn_ra_serf/commit.c

(file_context_t.svndiff_sent): New field.

(file_context_t.remote_result_checksum): New field.

(apply_textdelta): Update the comment stating that it would be nice to

get rid of temporary files for svndiff delta. Factor out the svndiff

format selection logic ...

(negotiate_put_encoding): ...into this new helper function.

(open_txdelta_baton_t): New.

(txdelta_stream_errfunc): New error function for the stream bucket.

(create_body_from_txdelta_stream): New svn_ra_serf__request_body_delegate_t

that creates the request body by opening an svn_txdelta_stream_t, turning

it into svn_stream_t and giving away a bucket wrapping around that stream.

Use it in ...

(apply_textdelta_stream): ...this new function that performs a PUT, and

streams the request body.

(put_response_ctx_t): New.

(put_response_handler): New, remembers the result checksum we received

from the server.

(close_file): Don't do a PUT if we did it in apply_textdelta_stream().

Check for a checksum mismatch using the checksum returned from the server.

(svn_ra_serf__get_commit_editor): Install the new apply_textdelta_stream()

callback when working against new servers.

  1. … 8 more files in changeset.
Negotiate the use of the svndiff2 format over http://.

On the server-side, start sending svndiff2 deltas to clients that can read

them, but only when SVNCompressionLevel is set to 1. On the client-side,

keep sending svndiff1. Currently we use svndiff1 with default compression

ratio (5), and svndiff2 is not a substitute for it, as that would result

in worse compression.

* subversion/include/svn_dav.h

(SVN_DAV_NS_DAV_SVN_SVNDIFF2): New.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t): Add 'supports_svndiff2' field.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Remember if the server supports

svndiff2.

* subversion/libsvn_ra_serf/commit.c

(apply_textdelta): Add the fallback code for a theoretically possible

situation where the server has advertised _only_ svndiff2 support.

Note why we still use svndiff1 when client-side http compression is

enabled. Adjust a couple of comments.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__setup_svndiff_accept_encoding): Advertise support for both

svndiff2 and svndiff1 with identical (q=) values. We'll let the server

decide between svndiff2 and svndiff1.

* subversion/mod_dav_svn/repos.c

(negotiate_encoding_prefs): Select the svndiff2 format if the client

supports it and if the server's SVNCompressionLevel is set to 1.

* subversion/mod_dav_svn/version.c

(get_vsn_options): Advertise svndiff2 support.

  1. … 6 more files in changeset.
ra_serf: Revert part of r1704317 that enabled sending compressed svndiff1

deltas (during commit) to servers that don't properly advertise that they

support it.

This change introduced an assumption that every HTTPv2-speaking server

knows how to parse svndiff1. After giving it a fresh look, I think that

the ability to send compressed deltas to existing servers is not worth

circumventing the capability negotiation scheme and possibly sending data

that cannot be interpreted by a server. While the added heuristics works

for existing versions of mod_dav_svn, it might not hold for other (third-

party) server implementations, and is basically a hack.

So, keep it safe and only send compressed svndiff1 deltas to Subversion

1.10 servers that properly advertise they know how to deal with svndiff1.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Stop assuming that every

HTTPv2-capable server knows how to interpret incoming svndiff1

deltas.

Following up on r1704317, advertise svndiff1 support in mod_dav_svn servers.

When parsing OPTIONS responses in ra_serf, record that we can use svndiff1

upon seeing the new DAV header. If there is no such header, use the current

approach of sending svndiff1 to servers that support Subversion's HTTPv2

protocol.

Related discussion is in http://svn.haxx.se/dev/archive-2015-09/0278.shtml

(Subject: "Re: svn commit: r1704317 - ...").

* subversion/include/svn_dav.h

(SVN_DAV_NS_DAV_SVN_SVNDIFF1): New.

* subversion/mod_dav_svn/version.c

(get_vsn_options): Advertise that svndiff1 is supported by the server.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Record svndiff1 support if the

server advertises it with the new header. Update the related comment.

Suggested by: danielsh

  1. … 2 more files in changeset.
[ Note from the future:

The "HTTPv2 == svndiff1" detection was reverted in r1791290.

And see r1704891 that adds a proper server-side capability for svndiff1. ]

Use compressed svndiff1 format for deltas when committing changes over

http:// and https://.

Something I learned while working on the ra_serf-stream-commit branch is

that ra_serf doesn't use compression when sending deltas over http(s)://

— as opposed to, for instance, ra_svn, where compression is turned on by

default. Enabling compression has a positive impact on commits that happen

over the WAN, especially, with slow connections, where the network speed is

the bottleneck.

Benchmarks over http:// with the repository located on a remote server,

before and after this patch:

1) Committing a Windows application build (.exe, .dll, resources),

35 files, 55 MiB total size:

51.901 s → 22.404 s

2) Committing a random bunch of compressible and incompressible files,

135 files, 161 MiB total size:

156.072 s → 115.445 s

3) Importing a subtree of TortoiseSVN's trunk, 1742 files, 81 MiB total size:

186.548 s → 167.285 s

4) Importing Windows Installer log files, 23 files, 15 MiB total size:

15.130 s → 6.030 s

So, we begin using compressed svndiff1 format in ra_serf, if that's possible.

This is done for servers that advertise Subversion's HTTP v2 protocol, unless

compression is disabled by the 'http-compression = no' client configuration

option. Existing Apache HTTPd + mod_dav_svn servers know how to deal with

svndiff1, starting from Subversion 1.4, but the reasoning behind enabling

it with HTTP v2 is that if the user is stuck with the old protocol version,

she probably does not really care about the performance. I tested existing

custom implementations of Subversion's HTTP v2 protocol that are not based

on mod_dav_svn, and they as well now how to deal with svndiff1 format.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__session_t.using_compression): Update comment.

(svn_ra_serf__session_t.supports_svndiff1): New field.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Remember that we can use svndiff1

upon witnessing a Subversion's HTTPv2 protocol header. Document the

reasoning behind this.

* subversion/libsvn_ra_serf/commit.c

(apply_textdelta): Use svndiff1 when calling svn_txdelta_to_svndiff3(), if

possible.

* subversion/libsvn_ra_serf/serf.c

(ra_serf_dup_session): Duplicating a session begins with apr_pmemdup(), and

automatically covers all primitive fields, e.g., the new supports_svndiff1

field or already existing supports_rev_rsrc_replay field. So, just update

the comment block.

  1. … 3 more files in changeset.
Distingush between permanent and temporary redirections to match the

1.8 behaviour.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Permanent or temporary error.

* subversion/tests/cmdline/redirect_tests.py

(redirected_copy): Extend with temporary redirect.

  1. … 1 more file in changeset.
Make svn_ra_open_session4() behave as documented during 1.7 development

(but as it was never implemented before), by returning the documented

error when a repository should be opened in a different location.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open4): Don't wrap SVN_ERR_RA_SESSION_URL_MISMATCH errors.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Always handle HTTP 3XX status values

here.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__error_on_status): Remove bad advice.

* subversion/tests/cmdline/redirect_tests.py

(redirected_copy): Update expected result.

  1. … 3 more files in changeset.
In the implementation of svn_ra_open4(), properly pass corrected_url as NULL

to the ra implementations, to allow them to error out early when users don't

want to support redirects.

Before this patch we sometimes returned an RA session pointing to a location

that would only respond with redirect errors on individual ra operations.

(We would also assume that the repository was using our http 1.0 protocol)

* subversion/libsvn_ra/ra_loader.c

(svn_ra_open4): Directly pass corrected_url_p to the implementations and

move the code to fixup bad urls into serf. (Which should follow the

Subversion API rules of always passing good urls anyway)

* subversion/libsvn_ra_serf/options.c

(includes): Add svn_path.h.

(svn_ra_serf__exchange_capabilities): Guarantee a proper redirect url.

  1. … 1 more file in changeset.
In ra_serf: Make the standard http status handling by default handle redirect

status value as an error, instead of as a success result. In most cases this

was already caught properly but the xml body parser already explicitly ignores

this status range (assuming they will result in an error)

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Set flag in handler to declare that we

are interested in specialized handling of redirects, when requested.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__handler_t): Add no_fail_on_http_redirect_status flag. Update

documentation to note that we no longer 'fail directly' (as that breaks

pipelining).

* subversion/libsvn_ra_serf/util.c

(response_done): Handle http status 300-399 unless

no_fail_on_http_redirect_status is set.

* subversion/tests/cmdline/redirect_tests.py

(redirected_copy): Remove XFail marker.

Found by: philip

  1. … 3 more files in changeset.
Following up on r1654668, always pass a session to the function that creates

a new handler instance.

* subversion/libsvn_ra_serf/commit.c

(checkout_node): Update caller.

(proppatch_resource): Remove argument. Update caller.

(open_root,

delete_entry,

add_directory,

close_directory,

add_file,

close_file,

close_edit,

abort_edit,

svn_ra_serf__change_rev_prop): Update caller.

* subversion/libsvn_ra_serf/get_file.c

(svn_ra_serf__get_file): Update caller. Reduce variable scope.

* subversion/libsvn_ra_serf/lock.c

(svn_ra_serf__unlock): Update caller.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__probe_proxy): Update caller.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__create_handler): Add session argument.

* subversion/libsvn_ra_serf/update.c

(fetch_for_file): Update caller.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__create_handler): Add argument. Setup session and connection.

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__create_expat_handler): Update caller.

  1. … 7 more files in changeset.
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.
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.
* subversion/libsvn_ra_serf/options.c: Followup to r1650481, add necessary

include.

HTTP header names are case-insensitive and serf needs to work when

a proxy or server sends mixed or lower case "SVN".

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Do case-insensitive comparison.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): Allocate values in

pool used by hash to fix a problem identified by valgrind.

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.
* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__probe_proxy): Following up on r1575319, update caller.

Introduce a subpool in the ra_serf open session handling, to reduce memory

usage in the session pool and to work around a bug in ra serf, where it

doesn't remember to tell us that a request failed/was cancelled.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__exchange_capabilities): Use result, scratch pool.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__exchange_capabilities): Use result, scratch pool.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Introduce a subpool. Update caller.

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

* CHANGES:

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

* contrib/client-side/svn-merge-vendor.py:

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

* contrib/server-side/svnmirror.sh:

* contrib/server-side/svnmirror-test.sh:

* notes/meetings/berlin-11-agenda:

* notes/unicode-composition-for-filenames:

* notes/wc-ng/conflict-storage:

* notes/wc-ng/conflict-storage-2.0:

* subversion/bindings/ctypes-python/test/wc.py:

* subversion/bindings/cxxhl/src/aprwrap/hash.hpp:

* subversion/bindings/cxxhl/tests/test_aprwrap.cpp:

* subversion/bindings/javahl/native/JNICriticalSection.h:

* subversion/bindings/javahl/native/JNIUtil.cpp:

* subversion/bindings/javahl/native/jniwrapper/jni_env.hpp:

* subversion/bindings/javahl/native/NativeStream.hpp:

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

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

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

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

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

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

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

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

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

* subversion/include/private/svn_sqlite.h:

* subversion/include/private/svn_subr_private.h:

* subversion/include/svn_client.h:

* subversion/include/svn_client_mtcc.h:

* subversion/include/svn_diff.h:

* subversion/libsvn_fs_fs/rep-cache.c:

* subversion/libsvn_fs_x/rep-cache.c:

* subversion/libsvn_ra_serf/options.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/string.c:

* subversion/libsvn_subr/utf8proc.c:

* subversion/libsvn_wc/adm_crawler.c:

* subversion/libsvn_wc/diff_local.c:

* subversion/libsvn_wc/wc_db_update_move.c:

* subversion/libsvn_wc/wc-metadata.sql:

* subversion/svn/status-cmd.c:

* subversion/tests/cmdline/diff_tests.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/README:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/svnauthz_tests.py:

* subversion/tests/cmdline/svndumpfilter_tests.py:

* subversion/tests/cmdline/svnrdump_tests.py:

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

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

* tools/dev/build-svn-deps-win.pl: Fix some typos.

  1. … 51 more files in changeset.
Remove some unneeded baton variables in serf. No functional changes.

* subversion/libsvn_ra_serf/options.c

(options_context_t): Remove unneeded variable.

(create_options_req): Update setter.

* subversion/libsvn_ra_serf/update.c

(fetch_ctx_t): Keep boolean instead of two baton pointers.

(report_context_t): Remove connection variable.

(headers_fetch): Update user.

(fetch_for_file): Update setter.

(make_update_reporter): Update setter.

  1. … 1 more file 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.
Cleanup a bit more response checks found when doing the r1554019

handler cleanup.

* subversion/libsvn_ra_serf/commit.c

(close_edit): Replace assertion by proper error. Clear

activity url before/on delete to avoid trying another delete

on failure of the delete.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Expect strict result code.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__v2_get_youngest_revnum): Replace assertion by proper

error by moving a bit of code from get_baseline_info here.

* subversion/libsvn_ra_serf/property.c

(retrieve_baseline_info): Check if we really get a revision.

(get_baseline_info): Remove check that is now in

svn_ra_serf__v2_get_youngest_revnum.

  1. … 3 more files in changeset.
In libsvn_ra_serf: Construct all svn_ra_serf__handler_t instances

via one constructor function.

* subversion/libsvn_ra_serf/commit.c

(checkout_node): Allocate handler in scratch pool.

(proppatch_resource,

open_root,

delete_entry,

add_directory,

add_file,

close_file,

close_edit): Use constructor.

* subversion/libsvn_ra_serf/inherited_props.c

(svn_ra_serf__get_inherited_props): Remove unneeded set.

* subversion/libsvn_ra_serf/lock.c

(svn_ra_serf__unlock): Use constructor.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__probe_proxy): Use constructor.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__handler_t): Extend comment.

(svn_ra_serf__create_handler): New function.

* subversion/libsvn_ra_serf/update.c

(fetch_file): Use constructor.

(finish_report): Use constructor.

(svn_ra_serf__get_file): Use constructor.

(handle_response): Add comment.

(svn_ra_serf__create_handler): New function.

(svn_ra_serf__create_expat_handler): Use svn_ra_serf__create_handler.

* subversion/libsvn_ra_serf/util.c

  1. … 6 more files in changeset.
Add more http status verifications in libsvn_ra_serf.

* subversion/libsvn_ra_serf/options.c

(svn_ra_serf__v2_get_youngest_revnum,

svn_ra_serf__v1_get_activity_collection,

svn_ra_serf__exchange_capabilities): Report anything but 200 as unexpected.

(svn_ra_serf__probe_proxy): Expect either 200 or 411.

(svn_ra_serf__has_capability): Add error tracing.

* subversion/libsvn_ra_serf/property.c

(svn_ra_serf__wait_for_props): Expect 207 status.

  1. … 1 more file in changeset.