Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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/blame.c

(svn_ra_serf__get_file_revs): Expect 200 status.

* subversion/libsvn_ra_serf/getdate.c

(date_closed): Verify number format.

(svn_ra_serf__get_dated_revision): Expect 200 status. Replace assertion

with proper error.

  1. … 1 more file 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 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.
Extend the transition based xml parser in ra_serf with two features:

- explicit http status value checking

- an optional done callback

In multi-request operations as update and replay a success callback

is needed to mark a request as done, and to signal the context loop that

cleanup work is needed.

This commit adds the necessary plumbing to provide better error handling

and to support the conversion of the replay handling, which I will add as

separate patches.

* 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/inherited_props.c

(svn_ra_serf__get_inherited_props): Update caller.

* subversion/libsvn_ra_serf/locks.c

(locks_expected_status): New variable.

(svn_ra_serf__get_lock): Update caller. Expect status 207.

(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): 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

(propfind_expected_status): New variable.

(svn_ra_serf__deliver_props): Update caller. Expect 207.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__xml_done_t): New type.

(svn_ra_serf__xml_context_create): Add done_cb argument.

(svn_ra_serf__create_expat_handler): Add expected status argument.

* subversion/libsvn_ra_serf/util.c

(expat_ctx_t): Add expected status.

(expat_response_handler): Handle expected status. Use slightly safer

check for parser failures.

(svn_ra_serf__create_expat_handler): Store expected_status.

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__xml_context_t): Add callback.

(svn_ra_serf__xml_context_done): Call done callback if available.

(svn_ra_serf__xml_context_create): Store done callback.

  1. … 15 more files in changeset.
Use macro for the initial state in serf's transition based xml parser,

instead of just 0.

Suggested by: gstein

* subversion/libsvn_ra_serf/ra_serf.h

(XML_STATE_INITIAL): New macro.

(svn_ra_serf__xml_transition_t): Update documentation.

* subversion/libsvn_ra_serf/blame.c

(blame_state_e):

* subversion/libsvn_ra_serf/getdate.c

(date_state_e):

* subversion/libsvn_ra_serf/getlocations.c

(loc_state_e):

* subversion/libsvn_ra_serf/getlocationsegments.c

(locseg_state_e):

* subversion/libsvn_ra_serf/getlocks.c

(getlocks_state_e):

* subversion/libsvn_ra_serf/get_deleted_rev.c

(drev_state_e):

* subversion/libsvn_ra_serf/inherited_props.c

(iprops_state_e):

* subversion/libsvn_ra_serf/log.c

(log_state_e):

* subversion/libsvn_ra_serf/merge.c

(merge_state_e):

* subversion/libsvn_ra_serf/mergeinfo.c

(mergeinfo_state_e):

* subversion/libsvn_ra_serf/options.c

(options_state_e):

* subversion/libsvn_ra_serf/property.c

(prop_state_e):

* subversion/libsvn_ra_serf/update.c

(report_state_e):

* subversion/libsvn_ra_serf/xml.c

(svn_ra_serf__xml_cb_start): Replace usage 0 with XML_STATE_INITIAL.

Name enums when not already named.

  1. … 14 more files in changeset.
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.
Remove the CUSTOM_OPEN flag from the transition table, since the

opened callback is invoked for all transitions. Add the new (tbd)

callback to the xml_context_create() function.

No real functional change.

* subversion/libsvn_ra_serf/ra_serf.h:

(svn_ra_serf__xml_transition_t): remove CUSTOM_OPEN. not needed.

(svn_ra_serf__xml_context_create): add CDATA_CB callback

* subversion/libsvn_ra_serf/blame.c:

(blame_ttable): remove CUSTOM_OPEN flag. table still not used.

* subversion/libsvn_ra_serf/get_deleted_rev.c:

(getdrev_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_deleted_rev): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/getdate.c:

(date_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_dated_revision): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/getlocations.c:

(getloc_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_locations): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/getlocationsegments.c:

(gls_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_location_segments): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/getlocks.c:

(getlocks_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_locks): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/locks.c:

(locks_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_lock): add CDATA_CB to ctx creation

(svn_ra_serf__lock): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/log.c:

(log_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_log): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/merge.c:

(merge_ttable): remove CUSTOM_OPEN flag. table still not used.

* subversion/libsvn_ra_serf/mergeinfo.c:

(mergeinfo_ttable): remove CUSTOM_OPEN flag.

(svn_ra_serf__get_mergeinfo): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/options.c:

(options_ttable): remove CUSTOM_OPEN flag.

(create_options_req): add CDATA_CB to ctx creation

* subversion/libsvn_ra_serf/xml.c:

(svn_ra_serf__xml_context_create): add CDATA_CB param and store into

the context.

  1. … 12 more files in changeset.
Switch getdate over to the new xml parsing system.

* subversion/libsvn_ra_serf/getdate.c:

(date_state_e): drop the typedef. rename NONE to INITIAL. add the

REPORT state.

(date_context_t): drop the DONE member

(date_ttable): new transition table

(start_getdate, end_getdata, cdata_getdate): removed. obsolete.

(svn_ra_serf__get_dated_revision): drop old parsing stuff. switch to

the new parser. use run_one().

Remove expat.h from most .c flies. They aren't using it.

* subversion/libsvn_ra_serf/commit.c:

* subversion/libsvn_ra_serf/locks.c:

* subversion/libsvn_ra_serf/log.c:

* subversion/libsvn_ra_serf/serf.c:

* subversion/libsvn_ra_serf/xml.c:

* subversion/libsvn_ra_serf/replay.c:

* subversion/libsvn_ra_serf/blame.c:

* subversion/libsvn_ra_serf/getdate.c:

* subversion/libsvn_ra_serf/getlocationsegments.c:

(...): remove unused expat.h include

* subversion/libsvn_ra_serf/ra_serf.h:

(...): add comment on why we need expat.h

  1. … 9 more files in changeset.
Yup... we *do* need the HANDLER_POOL to always be set. When the base

response handler detects an error, then it may start multistatus

processing to parse out an svn_error reported by the server. The

server_error located in the handler needs to be allocated from the

HANDLER_POOL.

* subversion/libsvn_ra_serf/util.c:

(svn_ra_esrf__handle_server_error): remove stale comment

(handle_response): add explanatory comment

(svn_ra_serf__request_create): assert we have the pool. all requests

start here, so we should be safe.

* subversion/libsvn_ra_serf/replay.c:

(svn_ra_serf__replay, svn_ra_serf__replay_range): initialize HANDLER_POOL

* subversion/libsvn_ra_serf/getlocks.c:

(svn_ra_serf__get_locks): initialize HANDLER_POOL

* subversion/libsvn_ra_serf/locks.c:

(svn_ra_serf__lock): initialize HANDLER_POOL

* subversion/libsvn_ra_serf/getdate.c:

(svn_ra_serf__get_dated_revision): initialize HANDLER_POOL

* subversion/libsvn_ra_serf/update.c:

(fetch_file, finish_report, svn_ra_serf__get_file): initialize

HANDLER_POOL

  1. … 5 more files in changeset.
Leave markers where we have not set HANDLER_POOL. We may want to make

it mandatory in the future.

* subversion/libsvn_ra_serf/replay.c:

* subversion/libsvn_ra_serf/getlocks.c:

* subversion/libsvn_ra_serf/getdate.c:

* subversion/libsvn_ra_serf/locks.c:

* subversion/libsvn_ra_serf/update.c:

(...): leave markers where we do not initialize HANDLER_POOL

  1. … 4 more files in changeset.
Switch many request handlers to use HANDLER->SLINE.CODE rather than

the STATUS_CODE produced by the XML parsing (which was the wrong level

of abstraction).

Some handlers just don't use the status code, so it was removed. Those

that need it fill in a HANDLER_POOL to get the correct data from the

response header.

* subversion/libsvn_ra_serf/ra_serf.h:

(svn_ra_serf__handler_t): clarify that HANDLER_POOL must be non-NULL

to get SLINE and LOCATION filled in.

* subversion/libsvn_ra_serf/getlocationsegments.c:

(gls_context_t): remove STATUS_CODE

(svn_ra_serf__get_location_segments): switch to SLINE.CODE

* subversion/libsvn_ra_serf/blame.c:

(svn_ra_serf__get_file_revs): switch to SLINE.CODE

* subversion/libsvn_ra_serf/log.c:

(log_context_t): remove STATUS_CODE

(svn_ra_serf__get_log): switch to SLINE.CODE

* subversion/libsvn_ra_serf/get_deleted_rev.c:

(svn_ra_serf__get_deleted_rev): switch to SLINE.CODE

* subversion/libsvn_ra_serf/getlocations.c:

(loc_context_t): remove STATUS_CODE

(svn_ra_serf__get_locations): switch to SLINE.CODE

* subversion/libsvn_ra_serf/locks.c:

(handle_lock): leave a todo for switch to HANDLER->SLINE

(svn_ra_serf__get_lock): switch to SLINE.CODE

* subversion/libsvn_ra_serf/update.c:

(finish_report): remove unused STATUS_CODE handling

* subversion/libsvn_ra_serf/replay.c:

(svn_ra_serf__replya): remove unused STATUS_CODE handling

* subversion/libsvn_ra_serf/mergeinfo.c:

(svn_ra_serf__get_mergeinfo): remove unused STATUS_CODE handling

* subversion/libsvn_ra_serf/getlocks.c:

(svn_ra_serf__get_locks): remove unused STATUS_CODE handling

* subversion/libsvn_ra_serf/getdate.c:

(svn_ra_serf__get_dated_revision): remove unused STATUS_CODE handling

* subversion/libsvn_ra_serf/util.c:

(svn_ra_serf__handle_xml_parser): use #if to remove an assertion.

further work to switch to HANDLER->SLINE.

  1. … 12 more files in changeset.
Adjust parameters to the serf-xml callback functions: remove the

userData param (in favor of parser->user_data), and add scratch_pool.

* subversion/libsvn_ra_serf/ra_serf.h:

(svn_ra_serf__xml_start_element_t, svn_ra_serf__xml_end_element_t,

svn_ra_serf__xml_cdata_chunk_handler_t): adjust params

* subversion/libsvn_ra_serf/util.c:

(start_error, end_error, cdata_error, start_207, end_207,

cdata_207): adjust parameters

(start_xml, end_xml, cdata_xml): use state->pool (for now) as a

scratch_pool. adjust params to the callback

* subversion/libsvn_ra_serf/merge.c:

* subversion/libsvn_ra_serf/getlocks.c:

* subversion/libsvn_ra_serf/mergeinfo.c:

* subversion/libsvn_ra_serf/locks.c:

* subversion/libsvn_ra_serf/getdate.c:

* subversion/libsvn_ra_serf/getlocationsegments.c:

* subversion/libsvn_ra_serf/blame.c:

* subversion/libsvn_ra_serf/log.c:

* subversion/libsvn_ra_serf/get_deleted_rev.c:

* subversion/libsvn_ra_serf/update.c:

* subversion/libsvn_ra_serf/property.c:

* subversion/libsvn_ra_serf/options.c:

* subversion/libsvn_ra_serf/getlocations.c:

* subversion/libsvn_ra_serf/replay.c:

(start_*, end_*, cdata_*): adjust parameters for new signature

  1. … 15 more files in changeset.
Start getting rid of svn_ra_serf__expand_string() by using stringbufs.

* subversion/libsvn_ra_serf/getdate.c:

(date_info_t): no longer needed

(date_context_t): no need to save a pool

(push_state): removed. folded into start_getdate()

(start_getdate): initialize a stringbuf to collect cdata

(end_getdate): get the contents from the stringbuf

(cdata_getdate): append the cdata to the stringbuf

(svn_ra_serf__get_dated_revision): no need to save the pool into the

context, and we can skip the calloc.

* subversion/libsvn_ra_serf/property.c:

(prop_info_t): use a stringbuf rather than val/val_len.

(push_state): initialize an empty stringbuf for contents

(start_propfind): no need to copy "href" (which has permanent life)

(end_propfind): fetch the value out of the stringbuf

(cdata_propfind): append the cdata to the stringbuf

* subversion/libsvn_ra_serf/blame.c:

(blame_info_t): use a stringbuf rather than prop_attr/_len.

(push_state): use calloc to zero out the info. allocate an empty

stringbuf for accumulating cdata

(create_propval): return the appropriate (decoded) value

(start_blame): reset the stringbuf to empty for accumulation

(cdata_blame): append the cdata to the stringbuf

* subversion/libsvn_ra_serf/options.c:

(svn_ra_serf__options_context_t): use a stringbuf to accumulate the

activity-collection value

(end_options): use the value saved in the stringbuf

(cdata_options): append the cdata to the stringbuf

(svn_ra_serf__create_options_req): initialize the stringbuf

  1. … 3 more files in changeset.
Unbreak the build on C89 platforms.

* subversion/svn/main.c,

subversion/include/svn_wc.h,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/locks.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/getdate.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/get_deleted_rev.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/replay.c,

subversion/svnsync/main.c,

subversion/svnrdump/svnrdump.c:

Remove trailing comma after the last member in enumator lists.

Found by: Peter Johansson <peterandrejohansson{_AT_}gmail.com>

Patch by: Prabhu Gnana Sundar <prabhugs{_AT_}collab.net>

(log message adjusted by me)

  1. … 15 more files in changeset.
Following up on r1133032, remove a bunch on unused includes from

libsvn_ra_serf.

* subversion/libsvn_ra_serf/getdate.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocks.c

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

Remove several unused includes.

  1. … 8 more files in changeset.
Add a missing #include of svn_version.h, following r1132966, and remove it

where it is unused.

* subversion/libsvn_subr/auth.c

Add a missing #include of svn_version.h (needed when compiled with support

for Gnome keyring or KDE Wallet).

* subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getdate.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/locks.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_subr/cmdline.c,

subversion/tests/libsvn_subr/checksum-test.c

Remove unused #include of svn_version.h.

  1. … 14 more files in changeset.
Once and for all, name all our anonymous struct/enum typedefs.

Follows up on r1040058, and with thanks to Danny Trebbien.

* everywhere:

Change 'typedef struct {} foo_t;' to 'typedef struct foo_t {} foo_t;'.

* subversion/libsvn_ra_serf/fake_sspi.h

(PSecurityFunctionTable, SecurityFunctionTable):

Manually effect the same change in the single pointer-to-struct typedef.

  1. … 95 more files in changeset.
Allow many more code paths in serf to return proper error codes by making

the request_body and request_header delegates return an svn_error_t *.

Except for this callback change this patch should not introduce functional

changes.

* subversion/libsvn_ra_serf/blame.c

(create_file_revs_body): Update arguments and return value.

* subversion/libsvn_ra_serf/commit.c

(create_checkout_body

setup_proppatch_headers,

create_proppatch_body,

create_put_body,

create_empty_put_body,

setup_copy_file_headers,

setup_delete_headers,

create_delete_body): Update return type and/or arguments.

* subversion/libsvn_ra_serf/getdate.c

(create_getdate_body): Update arguments and return type.

* subversion/libsvn_ra_serf/getlocations.c

(get_locations_body): Update callback prototype.

* subversion/libsvn_ra_serf/getlocationsegments.c

(create_gls_body): Update callback prototype.

* subversion/libsvn_ra_serf/getlocks.c

(create_getlocks_body): Update callback prototype.

* subversion/libsvn_ra_serf/get_deleted_rev.c

(create_getdrev_body): Update callback prototype.

* subversion/libsvn_ra_serf/locks.c

(set_lock_headers,

create_getlock_body

setup_getlock_headers

create_lock_body,

set_unlock_headers): Update callback prototype.

* subversion/libsvn_ra_serf/log.c

(create_log_body):

* subversion/libsvn_ra_serf/merge.c

(setup_merge_headers,

create_merge_body): Update callback prototype.

* subversion/libsvn_ra_serf/mergeinfo.c

(create_mergeinfo_body): Update callback prototype.

* subversion/libsvn_ra_serf/options.c

(create_options_body):

* subversion/libsvn_ra_serf/property.c

(setup_propfind_headers,

create_propfind_body): Update callback prototype.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__request_body_delegate_t,

svn_ra_serf__request_header_delegate_t): Return an svn_error_t *.

* subversion/libsvn_ra_serf/replay.c

(create_replay_body): Update callback prototype.

* subversion/libsvn_ra_serf/update.c

(headers_fetch,

create_update_report_body): Update callback prototype.

* subversion/libsvn_ra_serf/util.c

(setup_request_cb): Handle errors from the delegates

  1. … 16 more files in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.
Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.

* LICENSE: New.

* COPYING,

subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 882 more files in changeset.
Reintegrate the http-protocol-v2 branch.

(Merged /branches/http-protocol-v2:r34321-35967)

  1. … 28 more files in changeset.
ra_serf: Introduce internal functions for creating XML serf buckets.

* subversion/libsvn_ra_serf/xml.c:

* subversion/libsvn_ra_serf/ra_serf.h:

(svn_ra_serf__add_xml_header_buckets, svn_ra_serf__add_open_tag_buckets,

svn_ra_serf__add_close_tag_buckets, svn_ra_serf__add_cdata_len_buckets):

New functions for creating XML serf buckets.

(svn_ra_serf__add_tag_buckets): Use new functions to generate XML.

* subversion/libsvn_ra_serf/blame.c

(svn_ra_serf__get_file_revs),

* subversion/libsvn_ra_serf/commit.c

(create_checkout_body, proppatch_walker, create_proppatch_body,

create_delete_body),

* subversion/libsvn_ra_serf/getdate.c

(create_getdate_body),

* subversion/libsvn_ra_serf/getlocations.c

(svn_ra_serf__get_locations),

* subversion/libsvn_ra_serf/getlocationsegments.c

(svn_ra_serf__get_location_segments)

* subversion/libsvn_ra_serf/getlocks.c

(create_getlocks_body),

* subversion/libsvn_ra_serf/locks.c

(create_getlock_body, create_lock_body),

* subversion/libsvn_ra_serf/log.c

(svn_ra_serf__get_log)

* subversion/libsvn_ra_serf/merge.c

(svn_ra_serf__merge_lock_token_list, create_merge_body),

* subversion/libsvn_ra_serf/mergeinfo.c

(create_mergeinfo_body),

* subversion/libsvn_ra_serf/options.c

(create_options_body),

* subversion/libsvn_ra_serf/replay.c

(create_replay_body),

* subversion/libsvn_ra_serf/update.c

(set_path, delete_path, link_path, finish_report, make_update_reporter): Use

svn_ra_serf__add_* to generate XML buckets. Don't xml-escape parameters

since svn_ra_serf__add_* will care about xml-escaping.

  1. … 14 more files in changeset.
Directly return some errors, removing superfluous invocations of SVN_ERR().

This only handles libsvn_ra_local and libsvn_ra_serf. See r33043 for more

discussion about the general idea.

* subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/getdate.c,

subversion/libsvn_ra_serf/update.c:

Directly return errors from some called functions.

  1. … 3 more files in changeset.
Move DAV protocol constant into a header file.

* subversion/include/private/svn_dav_protocol.h

(SVN_DAV__VERSION_NAME): Add new macro constant.

[ in subversion/libsvn_ra_neon/ ]

* ra_neon.h

(SVN_RA_NEON__PROP_VERSION_NAME): Use new macro instead of magic string.

* props.c

(baseline_props, propfind_elements): Ditto.

* merge.c

(merge_elements): Ditto.

* log.c

(log_report_elements): Ditto.

[ in subversion/libsvn_ra_serf/ ]

* ra_serf.h

(baseline_props): Ditto.

* getdate.c

(start_getdate, end_getdate): Use new macro instead of magic string.

* log.c

(start_log, end_log): Ditto.

* merge.c

(end_merge, MERGE_BODY): Ditto.

* property.c

(svn_ra_serf__set_baton_props): Ditto.

* serf.c

(svn_ra_serf__get_latest_revnum, dirent_walker): Ditto.

[ in subversion/mod_dav_svn/ ]

* reports/dated-rev.c

(dav_svn__dated_rev_report): Use SVN_DAV__CREATIONDATE macro instead of

magic string.

  1. … 11 more files in changeset.
Move DAV protocol constant into a header file.

Note: This commit contains all but the svn_dav_protocol.h portion of

the changes listed below (subsequently committed in r26525).

* subversion/include/private/svn_dav_protocol.h

(SVN_DAV__CREATIONDATE): Add new macro constant.

[ in subversion/libsvn_ra_neon/ ]

* fetch.c

(report_elements, getlocks_report_elements, svn_ra_neon__get_dir,

svn_ra_neon__get_dated_revision): Use SVN_DAV__CREATIONDATE macro

instead of magic string.

* merge.c

(merge_elements, svn_ra_neon__merge_activity): Ditto.

* props.c

(propfind_elements): Ditto.

[ in subversion/libsvn_ra_serf/ ]

* getdate.c

(create_getdate_body): Use SVN_DAV__CREATIONDATE macro instead of

magic string.

* getlocks.c

(start_getlocks, end_getlocks): Ditto.

* merge.c

(end_merge, MERGE_BODY): Ditto.

* property.c

(svn_ra_serf__set_baton_props): Ditto.

* serf.c

(dirent_walker): Ditto.

[ in subversion/mod_dav_svn/ ]

* reports/dated-rev.c

(dav_svn__dated_rev_report): Use SVN_DAV__CREATIONDATE macro instead of

magic string.

  1. … 9 more files in changeset.