Apache Cordova

Apache Cordova

Source changes - FishEye

Shows the 20 most recent commits for Apache Cordova.

Philip Zeyliger committed 1605826 (1 file)
Reviews: none

Add a new test for multi-path lock/unlock callback returning an error.

* subversion/tests/libsvn_fs/locks-test.c
  (struct lock_many_baton_t): Add count.
  (lock_many_cb): Return error.
  (lock_cb_error): New test.
  (test_funcs): Add new test.

Branko Čibej committed 1600854 (3 files)
Reviews: none

Implement the new native wrapper for the AuthnCallback and
deprecated UserPasswordCallback in JavaHL.

[in subversion/bindings/javahl]
* native/AuthnCallback.cpp:
   Implement all native wrappers.
* native/jniwrapper/jni_object.hpp
  (ClassCache::user_passwd_cb): Declare new cache member.
* native/jniwrapper/jni_class_cache.cpp
  (ClassCache::user_passwd_cb): Initialize.

Stefan Sperling committed 1596616 (2 files)
Reviews: none

Re-apply a fixed version of the changes from r1596591 which were
reverted in r1596592. This version handles locally modified files
properly, rather than overwriting local changes as r1596591 did.
The regression test has also been expanded to cover local mods.

Fix issue #1975, "svn switch does not update keywords".

* subversion/libsvn_wc/update_editor.c
  (update_keywords_after_switch_cb): New helper function
   which checks for the presence of an svn:keywords property
   and queues an install_file work queue item if present.
   Thus, when the work queue is run to complete the switch
   operation, all files with keywords will go through the
   translation process.
  (close_edit): If this is a switch operation, run a recursive
   proplist with the specified depth (infinity by default),
   invocing update_keywords_after_switch_cb() for each node
   with properties.

* subversion/tests/cmdline/switch_tests.py
  (switch_keywords, test_list): New test. Fails without
   the above change and passes with it.

Stefan Sperling committed 1596591 (2 files)
Reviews: none

Fix issue #1975, "svn switch does not update keywords".

* subversion/libsvn_wc/update_editor.c
  (update_keywords_after_switch_cb): New helper function
   which checks for the presence of an svn:keywords property
   and queues an install_file work queue item if present.
   Thus, when the work queue is run to complete the switch
   operation, all files with keywords will go through the
   translation process.
  (close_edit): If this is a switch operation, run a recursive
   proplist with the specified depth (infinity by default),
   invoking update_keywords_after_switch_cb() for each node
   with properties.

* subversion/tests/cmdline/switch_tests.py
  (switch_keywords, test_list): New test. Fails without
   the above change and passes with it.

Stefan Fuhrmann committed 1591919 (19 files)
Reviews: none

APR mutexes don't support recursive locking on all platforms.
As a result, trying to take out the same lock twice in the
same thread will cause a lock up under e.g. Linux. This patch
adds an option to svn_mutex__t that detects recursive locking
attempts in most cases and returns a proper error.

The idea is simply to store the thread ID of the lock OWNER
along the actual mutex object. If that matches the current
thread's ID, there is a violation. As the current thread
cannot race with itself and because any other thread uses a
different thread ID, setting and comparing this aux. info can
be done safely.

Also, we may allow for false negatives here since we only try
to detect code sequences that are already illegal in the first
place. We also don't make that check mandatory as access to
thread IDs and their comparison may be somewhat expensive on
some systems - which would impair the futex-like behavior that
we assume in some places like the caches.

A more detailed description has been added to the source code.
A FSFS-based test is added as that has been the origin of the
feature request.

Current users will be updated as follows. FS level locks and
library / module initialization will enable recursion detection.
Potentially runtime critical, internal use disables it.

* subversion/include/svn_error_codes.h
  (SVN_ERR_RECURSIVE_LOCK): Define a new error code for invalid
                            locking schemes.

* subversion/include/private/svn_mutex.h
  (svn_mutex__t): Our mutex is now a struct as we add aux.
                  data to it.
  (svn_mutex__init): Add the CHECKED option.

* subversion/libsvn_subr/mutex.c
  (svn_mutex__t): Define the mutex structure and and document
                  the aux. data extensively.
  (svn_mutex__init): Update constructor.
  (svn_mutex__lock): Optionally, check for recursive locking attempts
                     and update the associtated aux. data.
  (svn_mutex__unlock): Optionally, update the aux. data for recursive
                       lock detection.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (never_reached,
   lock_again): Callback functions required by the new test.
  (recursive_locking): New test expecting an SVN_ERR_RECURSIVE_LOCK.
  (test_funcs): Register the new test.

* subversion/libsvn_fs_base/bdb/env.c
  (bdb_init_cb): Initialization code should detect recursions.

* subversion/libsvn_fs/fs-loader.c
  (synchronized_initialize): Same.

* subversion/libsvn_subr/dso.c
  (svn_dso_initialize2): Same.

* subversion/libsvn_fs_fs/fs.c
  (fs_serialized_init): FS-level locks shall detect recursion do aid
                        API users.

* subversion/libsvn_fs_x/fs.c
  (x_serialized_init): Same.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_mutex_alloc_cb_internal,
   svn_ra_svn__sasl_common_init): Internal, potentially tightly used
                                  mutexes shall not suffer the overhead.

* subversion/libsvn_subr/cache-inprocess.c
  (svn_cache__create_inprocess): Same.

* subversion/libsvn_subr/cache-membuffer.c
  (svn_cache__membuffer_cache_create,
   svn_cache__create_membuffer_cache): Same.

* subversion/libsvn_subr/file.c
  (init_handle_pool): Same.

* subversion/libsvn_subr/named_atomic.c
  (init_thread_mutex): Same.

* subversion/libsvn_subr/object_pool.c
  (svn_object_pool__create): Same.

* subversion/libsvn_subr/root_pools.c
  (svn_root_pools__create): Same.

* subversion/libsvn_subr/utf.c
  (svn_utf_initialize2): Same.

* subversion/svnserve/logger.c
  (logger__create_for_stderr,
   logger__create): Same.

* subversion/tests/svn_test_main.c
  (svn_test_main): For best test coverage, we enable recursion detection
                   in our test suite main app.

Philip Zeyliger committed 1585566 (1 file)
Reviews: none

Remove an unnecessary callback wrapper.

* subversion/libsvn_fs/fs-loader.c
  (struct lock_many_baton_t, lock_many_cb): Remove.
  (svn_fs_lock_many): Pass callers callback.

Found by: julianfoad

Philip Zeyliger committed 1584114 (16 files)
Reviews: none

Convert the new multi-path lock and unlock functions to a callback API,
rename from _lock2 and _unlock2 to _lock_many and _unlock_many.


* subversion/include/svn_fs.h
  (svn_fs_lock_result_t): Remove.
  (svn_fs_lock_callback_t):
  (svn_fs_lock2): Rename to...
  (svn_fs_lock_many): ...this, change to callback API.
  (svn_fs_unlock2): Rename to...
  (svn_fs_unlock_many): ...this, change to callback API.

* subversion/include/svn_repos.h
  (svn_repos_fs_lock2): Rename to...
  (svn_repos_fs_lock_many): ...this, change to callback API.
  (svn_repos_fs_unlock2): Rename to...
  (svn_repos_fs_unlock_many): ...this, change to callback API.

* subversion/libsvn_fs/fs-loader.h
  (struct fs_vtable_t): Change lock and unlock to callback API.

* subversion/libsvn_fs/fs-loader.c
  (struct lock_many_baton_t, lock_many_cb): New.
  (svn_fs_lock2): Rename to...
  (svn_fs_lock_many): ...this, change to callback API.
  (struct lock_baton_t, lock_cb): New.
  (svn_fs_lock): Adapt to callback API.
  (svn_fs_unlock2): Rename to...
  (svn_fs_unlock_many): ...this, change to callback API.
  (svn_fs_unlock): Adapt to callback API.

* subversion/libsvn_fs_fs/lock.h
* subversion/libsvn_fs_fs/lock.c
  (svn_fs_fs__lock, svn_fs_fs__unlock): Change to callback API.

* subversion/libsvn_fs_base/lock.h
* subversion/libsvn_fs_base/lock.c
  (svn_fs_base__lock, svn_fs_base__unlock): Change to callback API.

* subversion/libsvn_fs_x/lock.h
* subversion/libsvn_fs_x/lock.c
  (svn_fs_x__lock, svn_fs_x__unlock): Change to callback API.

* subversion/libsvn_ra_local/ra_plugin.c
  (deltify_etc): Adapt to callback API.
  (struct lock_baton_t, lock_cb): New.
  (svn_ra_local__lock, svn_ra_local__unlock): Adapt to callback API.

* subversion/libsvn_repos/fs-wrap.c
  (struct lock_many_baton_t, lock_many_cb): New.
  (svn_repos_fs_lock2): Rename to...
  (svn_repos_fs_lock_many): ...this, change to callback API.
  (struct lock_baton_t, lock_cb): New.
  (svn_repos_fs_lock): Adapt to callback API.
  (svn_repos_fs_unlock2): Rename to...
  (svn_repos_fs_unlock_many): ...this, change to callback API.
  (svn_repos_fs_unlock): Adapt to callback API.

* subversion/mod_dav_svn/version.c
  (unlock_many_cb): New.
  (release_locks): Adapt to callback API.

* subversion/svnserve/serve.c
  (write_lock): Make parameter const.
  (lock_cb): New.
  (unlock_paths): Adapt to callback API.
  (struct lock_result_t, struct lock_many_baton_t, lock_many_cb): New.
  (clear_lock_result_hash): New.
  (lock_many, unlock_many): Adapt to callback API.

* subversion/tests/libsvn_fs/locks-test.c
  (struct lock_result_t): New.
  (expect_lock, expect_error, expect_unlock, expect_unlock_error): Change
   to struct lock_result_t.
  (struct lock_many_baton_t, lock_many_cb): New.
  (lock_multiple_paths): Adapt to callback API.

* subversion/tests/libsvn_ra/ra-test.c
  (struct lock_result_t): New.
  (lock_cb, expect_lock, expect_error, expect_unlock, expect_unlock_error,
   lock_test): Change to struct lock_result_t.

Bert Huijben committed 1582229 (5 files)
Reviews: none

Add several svn_error_trace() wrappings in libsvn_ra_svn to improver error
traces while debugging in maintainer mode.

* subversion/libsvn_ra_svn/client.c
  (svn_ra_svn__auth_response,
   ra_svn_get_locations,
   ra_svn_replay,
   ra_svn_replay_range,
   ra_svn_get_deleted_rev):

* subversion/libsvn_ra_svn/cram.c
  (fail):

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_data_available_cb,
   svn_ra_svn__do_cyrus_auth):

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__read_cmd_response):

* subversion/libsvn_ra_svn/streams.c
  (svn_ra_svn__stream_write): Add svn_error_trace().

Philip Zeyliger committed 1579199 (1 file)
Reviews: none

* subversion/libsvn_wc/wc_db.c
  (wclock_obtain_cb): Tweak error message. The old message may have
   been intended to mean "already locked" but that error is now raised
   earlier in function.

Branko Čibej committed 1576329 (1 file)
Reviews: none

Follow up to r1576277 and r1576283: Avoid creating empty temporary files with
file contents in the Ev2 shims by introducing an internal flag that indicates
that contents have changed.

* subversion/libsvn_delta/compat.c
  (struct change_node): Added boolean member 'contents_changed'.
  (process_actions): If we were notified about a contents change, but did
   not receive a delta (for example, during a status drive), return an empty
   in-memory stream and related empty checksum.
  (ev2_apply_textdelta): Flag that the contents have changed, and turn off
   the open-on-close flag on the lazy open of the text delta target stream.
   This avoids creating a temporary file on disk if no delta was received.
  (add_file_cb, alter_file_cb): Set the contents_changed flag along with
   the contents file path.
  (apply_change): Check both contents_changed and contents_abspath.

James Ferguson committed 1573360 (15 files)
Reviews: none

Merge r1546804, r1553824, r1554192, r1555463, r1555467, r1563417, r1564760, r1565081 from trunk:

Throw away the myCtxVar{Set,Get} abomination and introduce
a pphrase_cb_arg_t struct instead, for passing stuff between
ssl_pphrase_Handle and ssl_pphrase_Handle_CB. Prefer struct
members instead of using additional local variables, to make
the data flow more transparent. (Doesn't "vastly simplify"
the code yet, but hopefully we'll get there when further
stripping down ssl_pphrase_Handle.)


Remove the hardcoded algorithm-type dependency for the SSLCertificateFile
and SSLCertificateKeyFile directives, and deprecate SSLCertificateChainFile

Splitting the patch into smaller pieces turned out to be infeasible,
unfortunately, due to the heavily intertwined code in ssl_engine_config.c,
ssl_engine_init.c and ssl_engine_pphrase.c, which all depends on the
modssl_pk_server_t data structure. For better comprehensibility,
a detailed listing of the changes follows:

ssl_private.h
- drop the X509 certs and EVP_PKEY keys arrays from modssl_pk_server_t
- use apr_array_header_t for cert_files and key_files
- drop tPublicCert from SSLModConfigRec
- drop the ssl_algo_t struct and the SSL_ALGO_* and SSL_AIDX_* constants

ssl_engine_config.c
- change to apr_array_header_t for SSLCertificate[Key]File
- drop ssl_cmd_check_aidx_max, i.e. allow an arbitrary number of certs
  and keys (in theory; currently OpenSSL does not support more than
  one cert/key per algorithm type)
- add deprecation warning for SSLCertificateChainFile

ssl_engine_init.c
- configure server certs/keys in ssl_init_server_certs (no longer via
  ssl_pphrase_Handle in ssl_init_Module)
- in ssl_init_server_certs, read in certificates and keys with standard
  OpenSSL API functions (SSL_CTX_use_*_file), and only fall back to
  ssl_load_encrypted_pkey when encountering an encrypted private key
- drop ssl_server_import_cert, ssl_server_import_key, ssl_init_server_check,
  and ssl_init_ctx_cleanup_server
- move the "problematic re-initialization" check to ssl_init_server_ctx

ssl_engine_pphrase.c
- use servername:port:index as the key identifier, instead of the
  previously used servername:port:algorithm
- ssl_pphrase_Handle overhaul: remove all cert/public-key handling,
  make it only load a single (encrypted) private key, and rename
  to ssl_load_encrypted_pkey
- in the passphrase prompt message, show the private key file name
  instead of the vhost id and the algorithm name
- do no longer supply the algorithm name as an argument to "exec"-type
  passphrase prompting programs

ssl_util.c
- drop ssl_util_algotypeof, ssl_util_algotypestr, ssl_asn1_keystr,
  and ssl_asn1_table_keyfmt

ssl_util_ssl.{c,h}
- drop SSL_read_X509
- constify the filename arg for SSL_read_PrivateKey


CodeWarrior compiler doesnt allow vars as struct inits.


Remove per-certificate chain handling code (obsoleted by
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=b9fa413a08d436d6b522749b5e808fcd931fd943)


make the ppcb_arg initialization a bit more uniform and easier to read

Followup fix for r1553824:

also pass the file name to ssl_load_encrypted_pkey, to make sure that we
retry with the same filename we used for SSL_CTX_use_PrivateKey_file first


With OpenSSL 1.0.2 or later, enable OCSP stapling in a loop based on
SSL_CTX_set_current_cert(), near the end of ssl_init_server_ctx.


update APLOGNO for r1564760
Submitted by: kbrand, fuankg, kbrand, kbrand, kbrand, kbrand, kbrand
Reviewed/backported by: jim

Philip Zeyliger committed 1571812 (12 files)
Reviews: none

On fsfs-lock-many branch: implement the multiple path functions
svn_fs_lock2 and svn_fs_unlock2 for FSFS along with the the
corresponding repos wrappers. All the locking now goes via the
multiple path functions but only passing a single path at a time.
Add some low-level regression tests to exercise the code with
multiple paths. This also fixes issue 4472, digest/lock written
in wrong order.

Notes:
 - BDB just loops calling the single path function at a low-level.
 - FSX is currently non-working but will eventually be a duplicate
   of FSFS.

* subversion/include/svn_fs.h
  (svn_fs_lock_target_t,
   svn_fs_lock_result_t,
   svn_fs_lock2,
   svn_fs_unlock2): New.

* subversion/include/svn_repos.h
  (svn_repos_fs_lock2,
   svn_repos_fs_unlock2): New.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_lock2): New.
  (svn_fs_lock): Call svn_fs_lock2.
  (svn_fs_unlock2): New.
  (svn_fs_unlock): Call svn_fs_unlock2.

* subversion/libsvn_fs/fs-loader.h
  (lock, unlock): Change parameters.

* subversion/libsvn_fs_fs/lock.h
  (svn_fs_fs__lock,
   svn_fs_fs__unlock): Change parameters.

* subversion/libsvn_fs_fs/lock.c
  (set_lock,
   delete_lock): Just act on one file.
  (add_to_digest,
   delete_from_digest): New.
  (struct lock_baton): Change members.
  (check_lock,
   struct lock_info_t): New.
  (lock_body): Handle multiple paths.
  (struct unlock_baton): Change members.
  (check_unlock): New.
  (unlock_body): Handle multiple paths.
  (unlock_single): New.
  (svn_fs_fs__lock,
   svn_fs_fs__unlock): Change parameters.
 
* subversion/libsvn_fs_base/lock.c
  (svn_fs_base__lock,
   svn_fs_base__unlock): Change parameters.

* subversion/libsvn_fs_base/lock.h
  (svn_fs_base__lock,
   svn_fs_base__unlock): Change parameters.

* subversion/libsvn_repos/fs-wrap.c
  (svn_repos_fs_lock2): New.
  (svn_repos_fs_lock): Call svn_repos_fs_lock2.
  (svn_repos_fs_unlock2): New.
  (svn_repos_fs_unlock): Call svn_repos_fs_unlock2.

* subversion/libsvn_repos/repos.c
  (SVN_REPOS__HOOK_POST_LOCK): Tweak comments in prototype file.
  (SVN_REPOS__HOOK_POST_UNLOCK): Tweak comments in prototype file.

* subversion/tests/libsvn_fs/locks-test.c
  (lock_multiple_paths): New test.
  (test_funcs): Add new test.

* subversion/tests/libsvn_ra/ra-test.c
  (make_and_open_local_repos): Create auth baton.
  (commit_tree): New helper.
  (struct lock_baton_t): New.
  (lock_cb): New helper.
  (lock_test): New test.
  (test_funcs): Add new test.

Bert Huijben committed 1569781 (1 file)
Reviews: none

Implement the diff processor directly in libsvn_client diff summarize handler
instead of via the old working copy callbacks.

* subversion/libsvn_client/diff_summarize.c
  (summarize_baton_t): Remove now unneeded hash.
  (props_changed_hash): New function.

  (cb_dir_deleted,
   cb_file_deleted,
   cb_dir_added,
   cb_dir_opened,
   cb_dir_closed,
   cb_file_added,
   cb_file_opened,
   cb_file_changed,
   cb_dir_props_changed): Replace these functions with...

  (diff_dir_opened,
   diff_dir_changed,
   diff_dir_added,
   diff_dir_deleted,
   diff_file_added,
   diff_file_changed,
   diff_file_deleted): ... these functions that implement the new api.

  (svn_client__get_diff_summarize_callbacks): Directly setup a
    svn_diff_tree_processor_t, instead of doing it via the callbacks.

Bert Huijben committed 1569756 (3 files)
Reviews: none

Use the diff tree processor for hooking the diff --summarize handler in
libsvn_client.

* subversion/libsvn_client/client.h
  (svn_client__get_diff_summarize_callbacks): Update api to return a diff
    processor instead of diff callbacks. Remove reverse option as that
    can be applied by the caller by reversing the tree.

* subversion/libsvn_client/diff.c
  (diff_wc_wc): Implement proper result and scratch pool.
  (diff_repos_repos): Calculate anchor path. Use result/scratch pool. Make
    text delta handling optional.
  (diff_repos_wc): Calculate anchor path. Use result/scratch pool.

  (do_diff): Add anchor_path output argument. Add result pool. Update caller.

  (diff_summarize_repos_wc): Wrap diff processor when we need reverse logic
    Update caller. Remove logic that calculates anchor, which is now an
    output argument of called function.

   diff_summarize_wc_wc): Update caller. Remove logic that calculates
    anchor, which is now an output argument of called function.

  (diff_summarize_repos_repos): Remove now unused function.

  (do_diff_summarize): Update diff_repos_repos instead of
    diff_summarize_repos_repos. Remove target calculation for
      svn_client__arbitrary_nodes_diff.

  (svn_client_diff6,
   svn_client_diff_peg6): Update caller.

* subversion/libsvn_client/diff_summarize.c
  (includes): Add svn_path.h and private/svn_wc_private.h.
  (summarize_baton_t): Add variables.
  (ensure_skip_relpath): New function.
  (send_summary): Update caller. Update patch calculation.
  (cb_dir_closed): Update patch calculation.

  (svn_client__get_diff_summarize_callbacks): Fetch a diff tree processor
    here.

Bert Huijben committed 1562088 (5 files)
Reviews: none

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.

Bert Huijben committed 1562077 (6 files)
Reviews: none

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.

Bert Huijben committed 1562072 (14 files)
Reviews: none

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.

Bert Huijben committed 1561425 (4 files)
Reviews: none

Add verification of working copy write lock to some move-update handling to
show a few current lock violations as XFAIL. (These problems exist in 1.8.x).

* subversion/libsvn_wc/wc_db.c
  (wclock_owns_lock): Remove prototype.
  (wclock_obtain_cb): Update caller.
  (wclock_owns_lock): Rename to ...
  (svn_wc__db_wclock_owns_lock_internal): ... this.
  (svn_wc__db_wclock_owns_lock): Update caller.

* subversion/libsvn_wc/wc_db_private.h
  (svn_wc__db_wclock_owns_lock_internal): New function.

* subversion/libsvn_wc/wc_db_update_move.c
  (verify_write_lock): New function.
  (bump_mark_tree_conflict,
   bump_moved_layer): Verify write lock.

* subversion/tests/libsvn_wc/op-depth-test.c
  (test_funcs): Mark 4 tests as XFail. These problems should be resolved for
    1.9.

Bert Huijben committed 1557686 (2 files)
Reviews: none

Make ra_serf use a pool cleanup handler on its request handlers to allow
reusing the ra session in cases that before this patch would cause a segfault
because it wasn't cleaned up.

If the ra session would schedule a new request before timeout, the context
would continue delivering data to old handlers. After this patch that won't
happen again.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__handler_t): Add boolean.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__context_run_one): Remove specialized handling of
    SVN_ERR_CEASE_INVOCATION that was already not required after recent
    error handling cleanups, but is now completely unneeded.
  (handle_response): Unregister on request errors.
  (handle_response_cb): Unregister on EOF and/or errors.
  (svn_ra_serf__request_create): Check for double scheduling. Update comment
    to match current reality.

  (handler_cleanup): New function.
  (svn_ra_serf__create_handler): Register handler_cleanup.

Bert Huijben committed 1557548 (3 files)
Reviews: none

Optimize the latency costs on svn_ra_get_dir() for ra_serf a bit by pipelining
the required requests and avoiding unneeded work and copying. This possively
affects things like 'svn ls --include-externals' and some cases of multi-url
diff, including those that drive merge.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__check_path,
   svn_ra_serf__stat,
   svn_ra_serf__get_dir): Add prototypes.

* subversion/libsvn_ra_serf/serf.c
  (fetch_path_props,
   svn_ra_serf__check_path,
   dirent_walker_baton_t,
   dirent_walker,
   path_dirent_visitor_t,
   path_dirent_walker,
   get_dirent_props,
   svn_ra_serf__stat,
   resource_is_directory,
   svn_ra_serf__get_dir): Move all this to a new stat.c

* subversion/libsvn_ra_serf/stat.c
  New file, copied from serf.c
  (svn_ra_serf__check_path): Remove static.
  (path_dirent_visitor_t): Remove as unused.
  (path_dirent_walker): Remove as unused.
  (get_dir_baton_t): New struct.
  (get_dir_dirents_cb): New function.
  (get_dir_props_cb): New function.
  (svn_ra_serf__get_dir): Reimplement using two property requests that deliver
    to the callback functions. Introduce scratch pool.