You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/13 03:45:33 UTC

svn commit: r1531612 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/ra.c

Author: brane
Date: Sun Oct 13 01:45:33 2013
New Revision: 1531612

URL: http://svn.apache.org/r1531612
Log:
Expose the RA tunnel callbacks in the svn_client API.

* subversion/include/svn_client.h (svn_client_ctx_t):
   New members open_tunnel_func and close_tunnel_func.
* subversion/libsvn_client/ra.c (svn_client__open_ra_session_internal):
   Set the tunnel callbacks in the RA callbacks table.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/ra.c

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1531612&r1=1531611&r2=1531612&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Sun Oct 13 01:45:33 2013
@@ -1018,6 +1018,24 @@ typedef struct svn_client_ctx_t
    *
    * @Since New in 1.9. */
   apr_off_t progress;
+
+  /** Open-tunnel callback
+   * If not @c null, this callback will be invoked to create an ra_svn
+   * connection that needs a tunnel, overriding any tunnel definitions
+   * in the client config file. This callback is used only for ra_svn
+   * and ignored by the other RA modules.
+   * @since New in 1.9.
+   */
+  svn_ra_open_tunnel_func_t open_tunnel_func;
+
+  /** Close-tunnel callback
+   * If not @c null, this callback will be invoked when the pool that
+   * owns the connection created by the open_tunnel callback is
+   * cleared or destroyed. This callback is used only for ra_svn and
+   * ignored by the other RA modules.
+   * @since New in 1.9.
+   */
+  svn_ra_close_tunnel_func_t close_tunnel_func;
 } svn_client_ctx_t;
 
 /** Initialize a client context.

Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=1531612&r1=1531611&r2=1531612&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Sun Oct 13 01:45:33 2013
@@ -350,6 +350,8 @@ svn_client__open_ra_session_internal(svn
   cbtable->get_client_string = get_client_string;
   if (base_dir_abspath)
     cbtable->get_wc_contents = get_wc_contents;
+  cbtable->open_tunnel = ctx->open_tunnel_func;
+  cbtable->close_tunnel = ctx->close_tunnel_func;
 
   cb->commit_items = commit_items;
   cb->ctx = ctx;