Remove false protocol limit checks from the ra_svn marshaller.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__read_data_log_changed_entry): Remove upper limit
   check for variable length elements as they may be extended by
   later releases.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561570 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1561387, which was (temporarily) reverted in r1561424 extend
the existing stream api with an optional incomplete read function to allow
using the stream api as was intended by r1561387.

After discussion on irc we came with the idea of revving svn_stream_read()
to two separate functions: one with full read semantics (like before) and one
with the new possibly incomplete read support.

This patch currently provides a default implementation of the incomplete read
with a forced complete read. Brane suggests that it might be better to just
return an error for requested incomplete reads. I commit this version under
the assumption that it is very easy to change this later in a separate patch.

* subversion/include/svn_io.h
  (svn_stream_t): Tweak documentation.
  (svn_stream_set_read2): New function.
  (svn_stream_set_read): Deprecate function.
  (svn_stream_read_full): New function.
  (svn_stream_read2): New function.
  (svn_stream_read): Deprecate function.

* subversion/libsvn_subr/deprecated.c
  (svn_stream_set_read): New function.
  (svn_stream_read): New function.
  (md5_stream_baton,
   read_handler_md5): Move here from stream.c. Update caller.
  (read_full_handler_md5): New function.
  (skip_handler_md5,
   write_handler_md5,
   close_handler_md5): Move here from stream.c.
  (svn_stream_checksummed): Move here. Update caller.


* subversion/libsvn_subr/stream.c
  (svn_stream_t): Add callback.
  (skip_default_handler): Update prototype.
  (svn_stream_set_read): Rename to...
  (svn_stream_set_read2): ... this and set both callbacks.

  (svn_stream_read2): New function.
  (svn_stream_read): Rename to...
  (svn_stream_read_full): ... this. Update used callback.

  (svn_stream_skip): Pass full read callback.

  (stream_readline_bytewise,
   stream_readline_chunky,
   svn_stream_copy3,
   svn_stream_contents_same2): Update caller.

  (skip_default_handler): Rename argument to auto-document behavior.
  (svn_stream_empty): Pass same read handler for both apis.

  (read_handler_disown): Update caller.
  (read_full_handler_disown): New function.
  (svn_stream_disown): Update caller.

  (read_handler_apr): New function. Rename the old function
     with this name to ...
  (read_full_handler_apr): ... this.
  (svn_stream_from_aprfile2): Update caller.

  (read_handler_checksum): New function. Rename the old function
     with this name to ...
  (read_full_handler_checksum): ... this.
  (close_handler_checksum): Update caller.
  (svn_stream_checksummed2): Update caller.

  (md5_stream_baton,
   read_handler_md5,
   skip_handler_md5,
   write_handler_md5,
   close_handler_md5,
   svn_stream_checksummed): Move to deprecated.c

  (svn_stringbuf_from_stream,
   svn_stream_from_stringbuf,
   svn_stream_from_string,
   svn_string_from_stream): Update caller.

  (read_handler_lazyopen): Update caller.
  (read_full_handler_lazyopen): New function.
  (svn_stream_lazyopen_create): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561688 13f79535-47bb-0310-9956-ffa450edef68
Try to fix a test failure on the unix buildbots.

* subversion/tests/cmdline/svntest/main.py
  (create_repos): Don't install a passed fsfs.conf file for repository formats
    that don't have an fsfs.conf as this file would be unused and hotcopy tests
    will fail.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561703 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/node.c
  (svn_wc__internal_get_repos_info): Remove unused variable.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561870 13f79535-47bb-0310-9956-ffa450edef68
Fix indentation, no functional change.

* subversion/libsvn_wc/wc_db.c
  (scan_addition): Indent the while block.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561873 13f79535-47bb-0310-9956-ffa450edef68
Remove two more WC-NG transient api functions that should have been removed
a long time ago.

* subversion/include/private/svn_wc_private.h
  (svn_wc__node_get_depth): Remove function with single caller.
  (svn_wc__node_get_origin): Add depth output argument.
  (svn_wc__node_is_status_deleted): Remove function without public caller.

* subversion/libsvn_client/commit.c
  (get_ra_editor): Update commented out caller.

* subversion/libsvn_client/commit_util.c
  (harvest_not_present_for_copy,
   harvest_status_callback): Update caller.

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy,
   try_copy): Update caller.

* subversion/libsvn_client/diff.c
  (diff_repos_wc): Update caller.

* subversion/libsvn_client/merge.c
  (filter_self_referential_mergeinfo): Update caller.

* subversion/libsvn_client/mergeinfo.c
  (svn_client__get_wc_or_repos_mergeinfo_catalog): Update caller.

* subversion/libsvn_client/prop_commands.c
  (svn_client_propget5,
   get_remote_props): Update caller. Remove unneeded output arguments.

* subversion/libsvn_client/ra.c
  (svn_client__repos_locations): Update caller.
  (svn_client__ra_provide_base,
   svn_client__ra_provide_props): Update callers that should probably look
     at BASE instead of the copy origin.

* subversion/libsvn_client/revisions.c
  (svn_client__get_revision_number): Update caller.

* subversion/libsvn_client/util.c
  (svn_client__wc_node_get_origin): Update caller.

* subversion/libsvn_wc/node.c
  (svn_wc__node_is_status_deleted): Remove function, fold into caller.
  (svn_wc__internal_get_origin): Add output argument handling.
  (svn_wc__node_get_origin): Add output argument.
  (svn_wc__node_was_moved_away): Add local implementation of
    svn_wc__node_is_status_deleted.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_get_origin): Add argument.

* subversion/tests/libsvn_wc/wc-test.c
  (test_node_get_origin): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561897 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1561688, switch almost every caller of svn_stream_read() to
its successor svn_stream_read_full(). Do this to resolve many deprecation
warnings (and to avoid somebody else accidentally doing the invalid conversion
to svn_stream_read2()).

There are no functional changes as svn_stream_read() is a direct call to
svn_stream_read_full().

* subversion/libsvn_delta/svndiff.c
  (read_one_byte): Update caller.

* subversion/libsvn_delta/text_delta.c
  (txdelta_next_window,
   tpush_write_handler,
   apply_window,
   svn_txdelta_send_stream): Update caller.

* subversion/libsvn_fs_base/lock.c
  (svn_fs_base__get_locks): Update caller.

* subversion/libsvn_fs_fs/recovery.c
  (read_handler_recover): Update caller.

* subversion/libsvn_fs_x/cached_data.c
  (get_dir_contents): Update caller.

* subversion/libsvn_fs_x/pack.c
  (write_reps_containers): Update caller.

* subversion/libsvn_repos/load.c
  (read_key_or_val,
   parse_text_block,
   svn_repos_parse_dumpstream3): Update caller.

* subversion/libsvn_subr/config_file.c
  (parser_getc): Update caller.

* subversion/libsvn_subr/hash.c
  (svn_hash__read_entry):

* subversion/libsvn_subr/packed_data.c
  (read_stream_uint,
   read_stream_data,
   svn_packed__data_read): Update caller.

* subversion/libsvn_subr/subst.c
  (translated_stream_read,
   read_handler_special): Update caller.

* subversion/libsvn_wc/adm_crawler.c
  (read_handler_copy): Update caller.

* subversion/mod_dav_svn/repos.c
  (deliver): Update caller.

* subversion/svnserve/serve.c
  (get_file): Update caller.

* subversion/tests/libsvn_subr/spillbuf-test.c
  (test_spillbuf_stream): Update caller.

* subversion/tests/libsvn_subr/stream-test.c
  (test_stream_from_string,
   test_stream_compressed,
   test_stream_seek_stringbuf,
   test_stream_seek_translated,
   test_stream_compressed_empty_file): Update caller.

* subversion/tests/libsvn_wc/pristine-store-test.c
  (pristine_delete_while_open): Update caller.

* subversion/tests/svn_test_fs.c
  (svn_test__stream_to_string): Update caller.

* tools/server-side/fsfs-stats.c
  (read_windows): Update caller.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561903 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1561897, remove unused function.

* subversion/libsvn_wc/node.c
  (svn_wc__node_get_depth): Remove function.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1561904 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1561688, extend the stream api with a data available
callback. This allows converting the ra-svn api which currently doesn't
follow the svn_stream_t contract and to switch to using it correctly.

* subversion/include/svn_error_codes.h
  (SVN_ERR_STREAM_DATA_AVAILABLE_NOT_SUPPORTED): New value.

* subversion/include/svn_io.h
  (svn_stream_seek_fn_t): Fix indentation.
  (svn_stream_data_available_fn_t): New typedef.
  (svn_stream_set_data_available): New function.
  (svn_stream_data_available): New function.

* subversion/libsvn_subr/stream.c
  (includes): Add apr_poll.h.
  (svn_stream_t): Add value.
  (svn_stream_create): Update caller.
  (svn_stream_set_data_available): New function.
  (svn_stream_data_available): New function.

  (data_available_disown): New function.
  (svn_stream_disown): Install callback.

  (data_available_handler_apr): New function, based on ra_svn code.
  (svn_stream_from_aprfile2): Install callback.

  (data_available_handler_checksum): New function.
  (svn_stream_checksummed2): Install callback.

  (data_available_handler_stringbuf): New function.
  (svn_stream_from_stringbuf): Install callback.

  (data_available_handler_string): New function.
  (svn_stream_from_string): Install callback.

  (data_available_handler_lazyopen): New function.
  (svn_stream_lazyopen_create): Install callback.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562043 13f79535-47bb-0310-9956-ffa450edef68
* subversion/include/svn_io.h
  (svn_stream_data_available_fn_t): Tweak layout of declaration as the line
   break appears to confuse the SWIG build.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562044 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/mtcc.h
  Tweak comment to make it a bit more obvious that it is an internal header.
  Tweak #define to match check.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562047 13f79535-47bb-0310-9956-ffa450edef68
Extract the mtcc public api to its own header.

* build.conf
  (libsvn_client): Export functions in svn_client_mtcc.h.

* subversion/include/svn_client.h
  (svn_client_mtcc_t,
   svn_client_mtcc_create,
   svn_client_mtcc_add_add_file,
   svn_client_mtcc_add_copy,
   svn_client_mtcc_add_delete,
   svn_client_mtcc_add_mkdir,
   svn_client_mtcc_add_move,
   svn_client_mtcc_add_propset,
   svn_client_mtcc_add_update_file,
   svn_client_mtcc_check_path,
   svn_client_mtcc_commit): Move to svn_client_mtcc.h

* subversion/include/svn_client_mtcc.h
  New header.

* subversion/libsvn_client/mtcc.c
  (includes): Add svn_client_mtcc.h.

* subversion/svnmucc/svnmucc.c
  (includes): Add svn_client_mtcc.h. Remove a few unused headers.

* subversion/tests/libsvn_client/mtcc-test.c
  (SVN_DEPRECATED): Remove unneeded define.
  (includes): Add svn_client_mtcc.h and remove a few unused headers.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562052 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/libsvn_client/client-test.c
  (includes): Following up on r1562052, add missing include.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562053 13f79535-47bb-0310-9956-ffa450edef68
Remove an unneeded interlibrary header, to avoid unneeded discussion over it.
No functional changes.

* subversion/libsvn_client/mtcc.c
  (includes): Remove mtcc.h.
  (svn_client_mtcc_kind_t,
   svn_client_mtcc_op_t,
   MTCC_UNMODIFIED,
   svn_client_mtcc_t): Move here from mtcc.h

* subversion/libsvn_client/mtcc.h
  Delete unused file.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562068 13f79535-47bb-0310-9956-ffa450edef68
Make libsvn_ra_svn use proper svn_stream_t based streams for its
communication channels.

* subversion/bindings/javahl/native/OperationContext.cpp
  (OperationContext::openTunnel): Use stream around apr file.
* subversion/bindings/javahl/native/OperationContext.h
  (OperationContext::openTunnel): Use stream around apr file.

* subversion/include/svn_ra.h
  (svn_ra_open_tunnel_func_t): Update callback to use svn_stream_t.

* subversion/include/svn_ra_svn.h
  (svn_ra_svn_create_conn4): New function.
  (svn_ra_svn_create_conn3): Deprecate function.

* subversion/libsvn_ra_svn/client.c
  (handle_child_process_error,
   make_tunnel,
   open_session): Update caller.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_read_full_cb): New function.
  (sasl_pending_cb): Implement svn_stream_data_available_fn_t.
  (svn_ra_svn__enable_sasl_encryption): Provide streams instead of callbacks.

* subversion/libsvn_ra_svn/deprecated.c
  (header): Declare SVN_DEPRECATED to avoid deprecation warnings in
    this file.
  (svn_ra_svn_create_conn3): New function.

* subversion/libsvn_ra_svn/editorp.c
  (check_for_error_internal): Update caller.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn3): Rename to...
  (svn_ra_svn_create_conn4): ... this and pass streams.

* subversion/libsvn_ra_svn/ra_svn.h
  (svn_ra_svn__has_item): Update caller.
  (svn_ra_svn__input_waiting): Update prototype to match
    svn_stream_data_waiting().

  (svn_ra_svn__stream_from_files): Rename to...
  (svn_ra_svn__stream_from_streams): ... this.
  (svn_ra_svn__stream_create): Update arguments to accept two streams instead
    of callbacks to install on a new stream.

  (svn_ra_svn__stream_pending): Update prototype to match
    svn_stream_data_waiting().

* subversion/libsvn_ra_svn/streams.c
  (includes): Add private/svn_io_private.h.
  (svn_ra_svn__stream_st): Store two streams instead of one, to allow directly
    calling into existing callbacks.

  (file_baton_t,
   file_read_cb,
   file_write_cb): Remove functions. We can use the new short read stream api
     for this if the single caller handles the non-standard error behavior.
  (file_timeout_cb): Use file as baton and allow NULL file.
  (file_pending_cb): Remove function.

  (svn_ra_svn__stream_from_files): Rename to...
  (svn_ra_svn__stream_from_streams): ... this and check if the output stream
    is an apr_file_t for the timeout callback.

  (sock_read_cb): Remove nonstandard error behavior, which belongs in the
    caller.
  (sock_read_full_cb): Add unused stub.
  (sock_pending_cb): Implement svn_stream_data_available_fn_t.
  (svn_ra_svn__stream_from_sock): Create a stream here and pass that.

  (svn_ra_svn__stream_create): Stop creating a stream and store the passed
    streams instead.

  (svn_ra_svn__stream_write): Use out_stream.
  (svn_ra_svn__stream_read): Use in_stream and check for 0 byte reads as was
    done in the internal stream before.

  (svn_ra_svn__stream_timeout,
   svn_ra_svn__stream_pending): Update caller.

* subversion/svnserve/serve.c
  (serve_interruptable): Update caller.

* subversion/svnserve/svnserve.c
  (sub_main): Update caller.

* subversion/tests/libsvn_ra/ra-test.c
  (open_tunnel): Return streams.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562072 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1561688, remove the automatic use of a full read as default
implementation for a possibly partial read. Provide a default full read
implementation for code that only implements partial reads.

* subversion/include/svn_error_codes.h
  (SVN_ERR_STREAM_DATA_AVAILABLE_NOT_SUPPORTED): Rename to...
  (SVN_ERR_STREAM_NOT_SUPPORTED): ... this instead of adding yet another error.

* subversion/include/svn_io.h
  (svn_stream_set_read2,
   svn_stream_set_read): Tweak comments.
  (svn_stream_read2): Document not implemented behavior.
  (svn_stream_data_available): Update error code.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_read_full_cb): Remove function.
  (svn_ra_svn__enable_sasl_encryption): Pass null instead of stub.

* subversion/libsvn_ra_svn/streams.c
  (sock_read_full_cb): Remove function.
  (svn_ra_svn__stream_from_sock): Pass NULL instead of stub.

* subversion/libsvn_subr/deprecated.c
  (svn_stream_set_read): Update caller with new rules.

* subversion/libsvn_subr/stream.c
  (full_read_fallback): New function.
  (svn_stream_read2): Return documented error instead of assert when not set.
  (svn_stream_read_full): Fall back to multiple calls to svn_stream_read2
    not set.
  (data_available_handler_apr): Update error code.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562077 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1562072, rename some internal functions and argument names
to match the stream api and to avoid some warnings on shadowing names. No
functional changes.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_pending_cb): Rename to...
  (sasl_data_available_cb): ... and rename argument.
  (svn_ra_svn__enable_sasl_encryption): Update reference.

* subversion/libsvn_ra_svn/editorp.c
  (check_for_error_internal): Rename variable. Update caller.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__input_waiting): Rename to...
  (svn_ra_svn__data_available): ... this. Update caller.
  (svn_ra_svn__has_item): Update caller.

* subversion/libsvn_ra_svn/ra_svn.h
  (svn_ra_svn__input_waiting): Rename to...
  (svn_ra_svn__data_available): ... this.

  (svn_ra_svn__stream_pending): Rename to...
  (svn_ra_svn__stream_data_available): ... this.

* subversion/libsvn_ra_svn/streams.c
  (svn_ra_svn__stream_pending): Rename to...
  (svn_ra_svn__stream_data_available): ... this.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562088 13f79535-47bb-0310-9956-ffa450edef68
* build/generator/gen_win_dependencies.py
  (_find_apr,
   _find_apr_util_and_expat): Fix detection for complete static builds of
     apr and apr-util.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562108 13f79535-47bb-0310-9956-ffa450edef68
Reduce the lifetime of open proto index files when building log-to-phys and
phys-to-log indices in FSX.  These files are only required locally, so there is
no reason not to close them as soon as possible.  This changeset fixes the
ENOTEMPTY error when committing things (purging transactions, actually) to FSX
repositories on Windows and unbreaks every non-trivial --fs-type=fsx test.

* subversion/libsvn_fs_x/index.c
  (svn_fs_x__l2p_index_create, svn_fs_x__p2l_index_create):
    For consistency, open the proto index files in LOCAL_POOL.  Explicitly call
    svn_io_file_close() for these files when they are no longer required.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1562222 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/nls.c
  (svn_nls_init): Following up on r1534083, add missing ';'.


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