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.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556799 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/update.c
  (*): Revert r1555716 and r1556343. This resolves a very hard to reproduce but
    very real issue identified by Ivan. I'll implement a better fix after
    finishing the conversion of the update handling to the transition based
    xml parser.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556933 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1378927, remove some accidentally added dead code.

* subversion/mod_dav_svn/reports/update.c
  (item_baton_t): Remove never set boolean.
  (close_helper): Remove check on always false boolean.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556941 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/xml.c
  (svn_ra_serf__xml_cb_end): Remove unnecessary initialization.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556960 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1554019, pass the right baton value in the pre-http-v2 commit
logic.

* subversion/libsvn_ra_serf/commit.c
  (checkout_node): Pass pointer to handler instead of pointer to pointer.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556974 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1551564, restore access to the dav properties to avoid a
regression against older DAV servers.

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Create and update dav commit items array. Fix pointer
    argument with the right 0.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556989 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/commit.c
  (add_file): Use scratch_pool and remove some unneeded whitespace.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556990 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/util.c
  (handle_response_cb): Allow clearing the handler pool from the done handler.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1556993 13f79535-47bb-0310-9956-ffa450edef68
* subversion/mod_dav_svn/util.c
  (dav_svn__build_uri): Avoid segfault when root_path is "". This case
    should be unreachable after the other change, but this is hard to tell.

* subversion/mod_dav_svn/version.c
  (get_option):
    Don't advertise http-v2 support urls unless there is an actual repository
    These urls won't work anyway, as that would require a working repository
    at this location.

Found by: lgo


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557094 13f79535-47bb-0310-9956-ffa450edef68
Only add our option headers in the mod_dav_svn OPTIONS handler if the client
asks for our option(s). This avoids setting them over and over again if a
client asks for a list of options at once.

* subversion/mod_dav_svn/version.c
  (get_option): Following up on r1557094, only add our option headers when
    asked for our option; not for every (undefined) option.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557103 13f79535-47bb-0310-9956-ffa450edef68
* subversion/mod_dav_svn/reports/update.c
  (dav_svn__update_report): Add comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557150 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/repos_diff.c
  (svn_client__get_diff_editor2): Use proper not-initialized value.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557200 13f79535-47bb-0310-9956-ffa450edef68
Complete the conversion of serf to the transitational xml parser by converting
the update (editor) handling.

As the original xml parser implementation used many different storage methods
for keeping state between different parts of the operations, this patch also
converts the parser to using the usual per file/directory baton handling and
proper subpools.

The linked lists with TODOs that were handled from the update report handler
before this patch are now replaced by callbacks that immediately perform the
necessary work.

The following summary is not a complete list of changes, as that would be
nearly impossible to write given all the interdependencies.

* subversion/libsvn_ra_serf/update.c
  (report_state_e): Update to remove old intermediate states. Add states that
    weren't handled.
  (update_ttable): Move here. Extend to cover the entire feature set in all
    6 modes.
  (SPILLBUF_BLOCKSIZE): Move to the other related macros.

  (report_dir_t): Rename to ...
  (dir_baton_t): ... this and make this conver the entire per directory state.

  (report_info_t): Rename to ...
  (file_baton_t): ... this and handle all file state from here. Attach to
    parent dir baton.

  (report_fetch_t): Rename to ...
  (fetch_ctx_t): ... this to make clear that this is just used for fetching
    resources.

  (report_context_t): Replace the linked lists by pointers to current file and
    directory.

  (create_dir_baton,
   create_file_baton): New functions.

  (open_connection_if_needed): Move here to allow opening additional
    connections while creating requests, instead of only after a batch
    of operations.

  (set_file_props,
   set_dir_props): Update for new batons.

  (ensure_dir_opened): Don't use baton as boolean.
  (close_dir): Rename to ...
  (maybe_close_dir): ... this and handle reference counting here.

  (ensure_file_opened): New function, like ensure_dir_opened.
  (check_lock): Directly sent result.

  (headers_fetch,
   cancel_fetch): Update caller.

  (open_updated_file): Rename to ...
  (open_file_txdelta): ... this and use ensure_file_opened.

  (close_file): Handle all file close tasks here, including releasing
    the directory reference.

  (handle_fetch): Simplify logic, based on earlier error handling improvements.

  (file_props_done,
   file_fetch_done): New functions, handling the completion of file requests.
  (fetch_for_file): New function, initiating requests for files when needed.

  (dir_props_done): New function, handling the completion of a per directory
    PROPFIND.
  (fetch_for_dir): New function, initiating PROPFIND for a directory if needed.

  (update_opened,
   update_closed,
   update_cdata): Implement xml parser callbacks.

  (link_path): When we have an explicit update target, store that path for this
    path instead of checking this later.

  (update_delay_baton_t): Replace network_eof boolean with ctx->report_completed.
  (update_delay_handler): Update caller. Return serferror instead of
    malfunctioning for specific serf cases.
  (process_pending): Update caller.

  (finish_report): Update initialization. Use a single iterpool. Remove TODO list
    handling. Don't close directories on invalid reports as that would break the
    incomplete logic.

  (make_update_reporter): Update caller.
  (svn_ra_serf__do_diff): Add comment.

  (handle_stream): Move function here, to make it obvious that it is just used
    for get_file().

  (svn_ra_serf__get_file): Stop faking a file context. Use standard single
    request infrastructure.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557207 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/update.c
  (update_opened): Fix C89 compatibility by moving variable definition.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557208 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/update.c
  (handle_fetch): Resolve variable shadowing issue by removing a duplicated
    pointer to the file baton.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557209 13f79535-47bb-0310-9956-ffa450edef68
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.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557216 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1557216 and other recent changes move some parts of the
public api of thetransition based xml parser in ra_serf from util.c to xml.c.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__xml_cb_start,
   svn_ra_serf__xml_cb_end,
   svn_ra_serf__xml_cb_cdata): Remove prototypes.

* subversion/libsvn_ra_serf/update.c
  (PARSE_CHUNK_SIZE): Update comment.

* subversion/libsvn_ra_serf/util.c
  (includes): Remove a few unused includes.

  (XML_STATUS_*,
   XML_VERSION_AT_LEAST,
   EXPAT_HAS_STOPPARSER,
   PARSE_CHUNK_SIZE,
   expat_ctx_t): Move to xml.c

  (parse_xml,
   xml_parser_cleanup): Move to xml.c

  (expat_start,
   expat_end,
   expat_cdata,
   expat_response_handler,
   svn_ra_serf__create_expat_handler): Move to xml.c

* subversion/libsvn_ra_serf/xml.c
  (includes): Add expat.h.

  (XML_STATUS_*,
   XML_VERSION_AT_LEAST,
   EXPAT_HAS_STOPPARSER,
   PARSE_CHUNK_SIZE,
   expat_ctx_t): Move here.

  (svn_ra_serf__xml_cb_start,
   svn_ra_serf__xml_cb_end,
   svn_ra_serf__xml_cb_cdata): Make static and rename to...
  (xml_cb_start,
   xml_cb_end,
   xml_cb_cdata): This.

  (parse_xml,
   xml_parser_cleanup): Move here.

  (expat_start,
   expat_end,
   expat_cdata,
   expat_response_handler): Move here. Update caller.

  (svn_ra_serf__create_expat_handler): Move here.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557224 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/update.c
  (update_delay_handler): Resolve a small memory leak within the request
    allocator. Fix indenting level. Add some comments.

Found by: ivan


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557287 13f79535-47bb-0310-9956-ffa450edef68
Revert the change to dav_svn__build_uri from r1557094.



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557308 13f79535-47bb-0310-9956-ffa450edef68
Revert the rest of r1557094.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1557314 13f79535-47bb-0310-9956-ffa450edef68