summaryrefslogtreecommitdiff
path: root/subversion/include/svn_ra.h
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/include/svn_ra.h')
-rw-r--r--subversion/include/svn_ra.h120
1 files changed, 109 insertions, 11 deletions
diff --git a/subversion/include/svn_ra.h b/subversion/include/svn_ra.h
index cf6f612..a3ab672 100644
--- a/subversion/include/svn_ra.h
+++ b/subversion/include/svn_ra.h
@@ -134,7 +134,10 @@ typedef svn_error_t *
apr_pool_t *pool);
-/** A function type for retrieving the youngest revision from a repos. */
+/** A function type for retrieving the youngest revision from a repos.
+ * @deprecated Provided for backward compatibility with the 1.8 API.
+ */
+/* ### It seems this type was never used by the API, since 1.0.0. */
typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)(
void *session_baton,
svn_revnum_t *latest_revnum);
@@ -267,6 +270,64 @@ typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)(
apr_hash_t *rev_props,
apr_pool_t *pool);
+
+/**
+ * Callback function that checks if an ra_svn tunnel called
+ * @a tunnel_name is handled by the callbakcs or the default
+ * implementation.
+ *
+ * @a tunnel_baton is the baton as originally passed to ra_open.
+ *
+ * @since New in 1.9.
+ */
+typedef svn_boolean_t (*svn_ra_check_tunnel_func_t)(
+ void *tunnel_baton, const char *tunnel_name);
+
+/**
+ * Callback function for closing a tunnel in ra_svn.
+ *
+ * This function will be called when the pool that owns the tunnel
+ * connection is cleared or destroyed.
+ *
+ * @a close_baton is the baton as returned from the
+ * svn_ra_open_tunnel_func_t.
+ *
+ * @a tunnel_baton was returned by the open-tunnel callback.
+ *
+ * @since New in 1.9.
+ */
+typedef void (*svn_ra_close_tunnel_func_t)(
+ void *close_baton, void *tunnel_baton);
+
+/**
+ * Callback function for opening a tunnel in ra_svn.
+ *
+ * Given the @a tunnel_name, tunnel @a user and server @a hostname and
+ * @a port, open a tunnel to the server and return its file handles,
+ * which are owned by @a pool, in @a request and @a response.
+ *
+ * @a request and @a response represent the standard input and output,
+ * respectively, of the process on the other end of the tunnel.
+ *
+ * If @a *close_func is set it will be called with @a close_baton when
+ * the tunnel is closed.
+ *
+ * The optional @a cancel_func callback can be invoked as usual to allow
+ * the user to preempt potentially lengthy operations.
+ *
+ * @a tunnel_baton is the baton as set in the callbacks.
+ *
+ * @since New in 1.9.
+ */
+typedef svn_error_t *(*svn_ra_open_tunnel_func_t)(
+ svn_stream_t **request, svn_stream_t **response,
+ svn_ra_close_tunnel_func_t *close_func, void **close_baton,
+ void *tunnel_baton,
+ const char *tunnel_name, const char *user,
+ const char *hostname, int port,
+ svn_cancel_func_t cancel_func, void *cancel_baton,
+ apr_pool_t *pool);
+
/**
* The update Reporter.
@@ -535,6 +596,31 @@ typedef struct svn_ra_callbacks2_t
*/
svn_ra_get_wc_contents_func_t get_wc_contents;
+ /** Check-tunnel callback
+ *
+ * If not @c NULL, and open_tunnel_func is also not @c NULL, this
+ * callback will be invoked to check if open_tunnel_func should be
+ * used to create a specific tunnel, or if the default tunnel
+ * implementation (either built-in or configured in the client
+ * configuration file) should be used instead.
+ * @since New in 1.9.
+ */
+ svn_ra_check_tunnel_func_t check_tunnel_func;
+
+ /** Open-tunnel callback
+ *
+ * If not @c NULL, this callback will be invoked to create a tunnel
+ * for a ra_svn connection that needs one, 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;
+
+ /** A baton used with open_tunnel_func and close_tunnel_func.
+ * @since New in 1.9.
+ */
+ void *tunnel_baton;
} svn_ra_callbacks2_t;
/** Similar to svn_ra_callbacks2_t, except that the progress
@@ -899,6 +985,10 @@ svn_ra_rev_prop(svn_ra_session_t *session,
* Use @a pool for memory allocation.
*
* @since New in 1.5.
+ *
+ * @note Like most commit editors, the returned editor requires that the
+ * @c copyfrom_path parameter passed to its @c add_file and @c add_directory
+ * methods is a URL, not a relative path.
*/
svn_error_t *
svn_ra_get_commit_editor3(svn_ra_session_t *session,
@@ -1004,11 +1094,10 @@ svn_ra_get_file(svn_ra_session_t *session,
* callers want to know, and some don't.)
*
* If @a props is non @c NULL, set @a *props to contain the properties of
- * the directory. This means @em all properties: not just ones controlled by
- * the user and stored in the repository fs, but non-tweakable ones
- * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
- * etc.) The keys are <tt>const char *</tt>, values are
- * <tt>@c svn_string_t *</tt>.
+ * the directory, including properties that are non-tweakable and
+ * generated by the SCM system itself (such as #svn_prop_wc_kind and
+ * #svn_prop_entry_kind properties). The keys are <tt>const char *</tt>,
+ * values are <tt>@c svn_string_t *</tt>.
*
* @since New in 1.4.
*/
@@ -1463,8 +1552,8 @@ svn_ra_do_diff(svn_ra_session_t *session,
* was added or deleted). Each path is an <tt>const char *</tt>, relative
* to the @a session's common parent.
*
- * If @a limit is non-zero only invoke @a receiver on the first @a limit
- * logs.
+ * If @a limit is greater than zero only invoke @a receiver on the first
+ * @a limit logs.
*
* If @a discover_changed_paths, then each call to @a receiver passes a
* <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
@@ -1507,7 +1596,6 @@ svn_ra_do_diff(svn_ra_session_t *session,
*
* @since New in 1.5.
*/
-
svn_error_t *
svn_ra_get_log2(svn_ra_session_t *session,
const apr_array_header_t *paths,
@@ -1708,6 +1796,12 @@ svn_ra_get_location_segments(svn_ra_session_t *session,
* to support reversion of the revision range for @a include_merged_revision
* @c FALSE reporting by switching @a end with @a start.
*
+ * @note Prior to Subversion 1.9, this function may request delta handlers
+ * from @a handler even for empty text deltas. Starting with 1.9, the
+ * delta handler / baton return arguments passed to @a handler will be
+ * #NULL unless there is an actual difference in the file contents between
+ * the current and the previous call.
+ *
* @since New in 1.5.
*/
svn_error_t *
@@ -1811,8 +1905,12 @@ svn_ra_unlock(svn_ra_session_t *session,
/**
* If @a path is locked, set @a *lock to an svn_lock_t which
- * represents the lock, allocated in @a pool. If @a path is not
- * locked, set @a *lock to NULL.
+ * represents the lock, allocated in @a pool.
+ *
+ * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
+ *
+ * @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
+ * when @a path didn't exist in HEAD on specific ra layers.
*
* @since New in 1.2.
*/