svn_ra.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  *    Licensed to the Apache Software Foundation (ASF) under one
00005  *    or more contributor license agreements.  See the NOTICE file
00006  *    distributed with this work for additional information
00007  *    regarding copyright ownership.  The ASF licenses this file
00008  *    to you under the Apache License, Version 2.0 (the
00009  *    "License"); you may not use this file except in compliance
00010  *    with the License.  You may obtain a copy of the License at
00011  *
00012  *      http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  *    Unless required by applicable law or agreed to in writing,
00015  *    software distributed under the License is distributed on an
00016  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00017  *    KIND, either express or implied.  See the License for the
00018  *    specific language governing permissions and limitations
00019  *    under the License.
00020  * ====================================================================
00021  * @endcopyright
00022  *
00023  * @file svn_ra.h
00024  * @brief Repository Access
00025  */
00026 
00027 #ifndef SVN_RA_H
00028 #define SVN_RA_H
00029 
00030 #include <apr.h>
00031 #include <apr_pools.h>
00032 #include <apr_hash.h>
00033 #include <apr_tables.h>
00034 #include <apr_time.h>
00035 #include <apr_file_io.h>  /* for apr_file_t */
00036 
00037 #include "svn_types.h"
00038 #include "svn_string.h"
00039 #include "svn_delta.h"
00040 #include "svn_auth.h"
00041 #include "svn_mergeinfo.h"
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif /* __cplusplus */
00046 
00047 
00048 
00049 /* Misc. declarations */
00050 
00051 /**
00052  * Get libsvn_ra version information.
00053  *
00054  * @since New in 1.1.
00055  */
00056 const svn_version_t *
00057 svn_ra_version(void);
00058 
00059 
00060 /** This is a function type which allows the RA layer to fetch working
00061  * copy (WC) properties.
00062  *
00063  * The @a baton is provided along with the function pointer and should
00064  * be passed back in. This will be the @a callback_baton or the
00065  * @a close_baton as appropriate.
00066  *
00067  * @a path is relative to the "root" of the session, defined by the
00068  * @a repos_URL passed to svn_ra_open4() vtable call.
00069  *
00070  * @a name is the name of the property to fetch. If the property is present,
00071  * then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
00072  */
00073 typedef svn_error_t *(*svn_ra_get_wc_prop_func_t)(void *baton,
00074                                                   const char *path,
00075                                                   const char *name,
00076                                                   const svn_string_t **value,
00077                                                   apr_pool_t *pool);
00078 
00079 /** This is a function type which allows the RA layer to store new
00080  * working copy properties during update-like operations.  See the
00081  * comments for @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and
00082  * @a name. The @a value is the value that will be stored for the property;
00083  * a NULL @a value means the property will be deleted.
00084  */
00085 typedef svn_error_t *(*svn_ra_set_wc_prop_func_t)(void *baton,
00086                                                   const char *path,
00087                                                   const char *name,
00088                                                   const svn_string_t *value,
00089                                                   apr_pool_t *pool);
00090 
00091 /** This is a function type which allows the RA layer to store new
00092  * working copy properties as part of a commit.  See the comments for
00093  * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
00094  * The @a value is the value that will be stored for the property; a
00095  * @c NULL @a value means the property will be deleted.
00096  *
00097  * Note that this might not actually store the new property before
00098  * returning, but instead schedule it to be changed as part of
00099  * post-commit processing (in which case a successful commit means the
00100  * properties got written).  Thus, during the commit, it is possible
00101  * to invoke this function to set a new value for a wc prop, then read
00102  * the wc prop back from the working copy and get the *old* value.
00103  * Callers beware.
00104  */
00105 typedef svn_error_t *(*svn_ra_push_wc_prop_func_t)(void *baton,
00106                                                    const char *path,
00107                                                    const char *name,
00108                                                    const svn_string_t *value,
00109                                                    apr_pool_t *pool);
00110 
00111 /** This is a function type which allows the RA layer to invalidate
00112  * (i.e., remove) wcprops recursively.  See the documentation for
00113  * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
00114  *
00115  * Unlike @c svn_ra_push_wc_prop_func_t, this has immediate effect.  If
00116  * it returns success, the wcprops have been removed.
00117  */
00118 typedef svn_error_t *(*svn_ra_invalidate_wc_props_func_t)(void *baton,
00119                                                           const char *path,
00120                                                           const char *name,
00121                                                           apr_pool_t *pool);
00122 
00123 /** This is a function type which allows the RA layer to fetch the
00124  * cached pristine file contents whose checksum is @a checksum, if
00125  * any.  @a *contents will be a read stream containing those contents
00126  * if they are found; NULL otherwise.
00127  *
00128  * @since New in 1.8.
00129  */
00130 typedef svn_error_t *
00131 (*svn_ra_get_wc_contents_func_t)(void *baton,
00132                                  svn_stream_t **contents,
00133                                  const svn_checksum_t *checksum,
00134                                  apr_pool_t *pool);
00135 
00136 
00137 /** A function type for retrieving the youngest revision from a repos.
00138  * @deprecated Provided for backward compatibility with the 1.8 API.
00139  */
00140 /* ### It seems this type was never used by the API, since 1.0.0. */
00141 typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)(
00142   void *session_baton,
00143   svn_revnum_t *latest_revnum);
00144 
00145 /** A function type which allows the RA layer to ask about any
00146  * customizations to the client name string.  This is primarily used
00147  * by HTTP-based RA layers wishing to extend the string reported to
00148  * Apache/mod_dav_svn via the User-agent HTTP header.
00149  *
00150  * @since New in 1.5.
00151  */
00152 typedef svn_error_t *(*svn_ra_get_client_string_func_t)(void *baton,
00153                                                         const char **name,
00154                                                         apr_pool_t *pool);
00155 
00156 
00157 
00158 /**
00159  * A callback function type for use in @c get_file_revs.
00160  * @a baton is provided by the caller, @a path is the pathname of the file
00161  * in revision @a rev and @a rev_props are the revision properties.
00162  * If @a delta_handler and @a delta_baton are non-NULL, they may be set to a
00163  * handler/baton which will be called with the delta between the previous
00164  * revision and this one after the return of this callback.  They may be
00165  * left as NULL/NULL.
00166  * @a prop_diffs is an array of svn_prop_t elements indicating the property
00167  * delta for this and the previous revision.
00168  * @a pool may be used for temporary allocations, but you can't rely
00169  * on objects allocated to live outside of this particular call and the
00170  * immediately following calls to @a *delta_handler, if any.
00171  *
00172  * @since New in 1.1.
00173  */
00174 typedef svn_error_t *(*svn_ra_file_rev_handler_t)(
00175   void *baton,
00176   const char *path,
00177   svn_revnum_t rev,
00178   apr_hash_t *rev_props,
00179   svn_txdelta_window_handler_t *delta_handler,
00180   void **delta_baton,
00181   apr_array_header_t *prop_diffs,
00182   apr_pool_t *pool);
00183 
00184 /**
00185  * Callback function type for locking and unlocking actions.
00186  *
00187  * @since New in 1.2.
00188  *
00189  * @a do_lock is TRUE when locking @a path, and FALSE
00190  * otherwise.
00191  *
00192  * @a lock is a lock for @a path or NULL if @a do_lock is FALSE or @a ra_err is
00193  * non-NULL.
00194  *
00195  * @a ra_err is NULL unless the ra layer encounters a locking related
00196  * error which it passes back for notification purposes.  The caller
00197  * is responsible for clearing @a ra_err after the callback is run.
00198  *
00199  * @a baton is a closure object; it should be provided by the
00200  * implementation, and passed by the caller.  @a pool may be used for
00201  * temporary allocation.
00202  */
00203 typedef svn_error_t *(*svn_ra_lock_callback_t)(void *baton,
00204                                                const char *path,
00205                                                svn_boolean_t do_lock,
00206                                                const svn_lock_t *lock,
00207                                                svn_error_t *ra_err,
00208                                                apr_pool_t *pool);
00209 
00210 /**
00211  * Callback function type for progress notification.
00212  *
00213  * @a progress is the number of bytes already transferred, @a total is
00214  * the total number of bytes to transfer or -1 if it's not known, @a
00215  * baton is the callback baton.
00216  *
00217  * @since New in 1.3.
00218  */
00219 typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
00220                                               apr_off_t total,
00221                                               void *baton,
00222                                               apr_pool_t *pool);
00223 
00224 /**
00225  * Callback function type for replay_range actions.
00226  *
00227  * This callback function should provide replay_range with an editor which
00228  * will be driven with the received replay reports from the master repository.
00229  *
00230  * @a revision is the target revision number of the received replay report.
00231  *
00232  * @a editor and @a edit_baton should provided by the callback implementation.
00233  *
00234  * @a replay_baton is the baton as originally passed to replay_range.
00235  *
00236  * @a revprops contains key/value pairs for each revision properties for this
00237  * revision.
00238  *
00239  * @since New in 1.5.
00240  */
00241 typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)(
00242   svn_revnum_t revision,
00243   void *replay_baton,
00244   const svn_delta_editor_t **editor,
00245   void **edit_baton,
00246   apr_hash_t *rev_props,
00247   apr_pool_t *pool);
00248 
00249 /**
00250  * Callback function type for replay_range actions.
00251  *
00252  * This callback function should close the editor.
00253  *
00254  * @a revision is the target revision number of the received replay report.
00255  *
00256  * @a editor and @a edit_baton should provided by the callback implementation.
00257  *
00258  * @a replay_baton is the baton as originally passed to replay_range.
00259  *
00260  * @a revprops contains key/value pairs for each revision properties for this
00261  * revision.
00262  *
00263  * @since New in 1.5.
00264  */
00265 typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)(
00266   svn_revnum_t revision,
00267   void *replay_baton,
00268   const svn_delta_editor_t *editor,
00269   void *edit_baton,
00270   apr_hash_t *rev_props,
00271   apr_pool_t *pool);
00272 
00273 
00274 /**
00275  * Callback function that checks if an ra_svn tunnel called
00276  * @a tunnel_name is handled by the callbakcs or the default
00277  * implementation.
00278  *
00279  * @a tunnel_baton is the baton as originally passed to ra_open.
00280  *
00281  * @since New in 1.9.
00282  */
00283 typedef svn_boolean_t (*svn_ra_check_tunnel_func_t)(
00284     void *tunnel_baton, const char *tunnel_name);
00285 
00286 /**
00287  * Callback function for closing a tunnel in ra_svn.
00288  *
00289  * This function will be called when the pool that owns the tunnel
00290  * connection is cleared or destroyed.
00291  *
00292  * @a close_baton is the baton as returned from the
00293  * svn_ra_open_tunnel_func_t.
00294  *
00295  * @a tunnel_baton was returned by the open-tunnel callback.
00296  *
00297  * @since New in 1.9.
00298  */
00299 typedef void (*svn_ra_close_tunnel_func_t)(
00300     void *close_baton, void *tunnel_baton);
00301 
00302 /**
00303  * Callback function for opening a tunnel in ra_svn.
00304  *
00305  * Given the @a tunnel_name, tunnel @a user and server @a hostname and
00306  * @a port, open a tunnel to the server and return its file handles,
00307  * which are owned by @a pool, in @a request and @a response.
00308  *
00309  * @a request and @a response represent the standard input and output,
00310  * respectively, of the process on the other end of the tunnel.
00311  *
00312  * If @a *close_func is set it will be called with @a close_baton when
00313  * the tunnel is closed.
00314  *
00315  * The optional @a cancel_func callback can be invoked as usual to allow
00316  * the user to preempt potentially lengthy operations.
00317  *
00318  * @a tunnel_baton is the baton as set in the callbacks.
00319  *
00320  * @since New in 1.9.
00321  */
00322 typedef svn_error_t *(*svn_ra_open_tunnel_func_t)(
00323     svn_stream_t **request, svn_stream_t **response,
00324     svn_ra_close_tunnel_func_t *close_func, void **close_baton,
00325     void *tunnel_baton,
00326     const char *tunnel_name, const char *user,
00327     const char *hostname, int port,
00328     svn_cancel_func_t cancel_func, void *cancel_baton,
00329     apr_pool_t *pool);
00330 
00331 
00332 /**
00333  * The update Reporter.
00334  *
00335  * A vtable structure which allows a working copy to describe a subset
00336  * (or possibly all) of its working-copy to an RA layer, for the
00337  * purposes of an update, switch, status, or diff operation.
00338  *
00339  * Paths for report calls are relative to the target (not the anchor)
00340  * of the operation.  Report calls must be made in depth-first order:
00341  * parents before children, all children of a parent before any
00342  * siblings of the parent.  The first report call must be a set_path
00343  * with a @a path argument of "" and a valid revision.  (If the target
00344  * of the operation is locally deleted or missing, use the anchor's
00345  * revision.)  If the target of the operation is deleted or switched
00346  * relative to the anchor, follow up the initial set_path call with a
00347  * link_path or delete_path call with a @a path argument of "" to
00348  * indicate that.  In no other case may there be two report
00349  * descriptions for the same path.  If the target of the operation is
00350  * a locally added file or directory (which previously did not exist),
00351  * it may be reported as having revision 0 or as having the parent
00352  * directory's revision.
00353  *
00354  * @since New in 1.5.
00355  */
00356 typedef struct svn_ra_reporter3_t
00357 {
00358   /** Describe a working copy @a path as being at a particular
00359    * @a revision and having depth @a depth.
00360    *
00361    * @a revision may be SVN_INVALID_REVNUM if (for example) @a path
00362    * represents a locally-added path with no revision number, or @a
00363    * depth is @c svn_depth_exclude.
00364    *
00365    * @a path may not be underneath a path on which set_path() was
00366    * previously called with @c svn_depth_exclude in this report.
00367    *
00368    * If @a start_empty is set and @a path is a directory, the
00369    * implementor should assume the directory has no entries or props.
00370    *
00371    * This will *override* any previous set_path() calls made on parent
00372    * paths.  @a path is relative to the URL specified in svn_ra_open4().
00373    *
00374    * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
00375    *
00376    * All temporary allocations are done in @a pool.
00377    */
00378   svn_error_t *(*set_path)(void *report_baton,
00379                            const char *path,
00380                            svn_revnum_t revision,
00381                            svn_depth_t depth,
00382                            svn_boolean_t start_empty,
00383                            const char *lock_token,
00384                            apr_pool_t *pool);
00385 
00386   /** Describing a working copy @a path as missing.
00387    *
00388    * @a path may not be underneath a path on which set_path() was
00389    * previously called with @c svn_depth_exclude in this report.
00390    *
00391    * All temporary allocations are done in @a pool.
00392    */
00393   svn_error_t *(*delete_path)(void *report_baton,
00394                               const char *path,
00395                               apr_pool_t *pool);
00396 
00397   /** Like set_path(), but differs in that @a path in the working copy
00398    * (relative to the root of the report driver) isn't a reflection of
00399    * @a path in the repository (relative to the URL specified when
00400    * opening the RA layer), but is instead a reflection of a different
00401    * repository @a url at @a revision, and has depth @a depth.
00402    *
00403    * @a path may not be underneath a path on which set_path() was
00404    * previously called with @c svn_depth_exclude in this report.
00405    *
00406    * If @a start_empty is set and @a path is a directory,
00407    * the implementor should assume the directory has no entries or props.
00408    *
00409    * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
00410    *
00411    * All temporary allocations are done in @a pool.
00412    */
00413   svn_error_t *(*link_path)(void *report_baton,
00414                             const char *path,
00415                             const char *url,
00416                             svn_revnum_t revision,
00417                             svn_depth_t depth,
00418                             svn_boolean_t start_empty,
00419                             const char *lock_token,
00420                             apr_pool_t *pool);
00421 
00422   /** WC calls this when the state report is finished; any directories
00423    * or files not explicitly `set' are assumed to be at the
00424    * baseline revision originally passed into do_update().  No other
00425    * reporting functions, including abort_report, should be called after
00426    * calling this function.
00427    */
00428   svn_error_t *(*finish_report)(void *report_baton,
00429                                 apr_pool_t *pool);
00430 
00431   /** If an error occurs during a report, this routine should cause the
00432    * filesystem transaction to be aborted & cleaned up.  No other reporting
00433    * functions should be called after calling this function.
00434    */
00435   svn_error_t *(*abort_report)(void *report_baton,
00436                                apr_pool_t *pool);
00437 
00438 } svn_ra_reporter3_t;
00439 
00440 /**
00441  * Similar to @c svn_ra_reporter3_t, but without support for depths.
00442  *
00443  * @deprecated Provided for backward compatibility with the 1.4 API.
00444  */
00445 typedef struct svn_ra_reporter2_t
00446 {
00447   /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
00448    * with @a depth always set to @c svn_depth_infinity. */
00449   svn_error_t *(*set_path)(void *report_baton,
00450                            const char *path,
00451                            svn_revnum_t revision,
00452                            svn_boolean_t start_empty,
00453                            const char *lock_token,
00454                            apr_pool_t *pool);
00455 
00456   /** Same as the corresponding field in @c svn_ra_reporter3_t. */
00457   svn_error_t *(*delete_path)(void *report_baton,
00458                               const char *path,
00459                               apr_pool_t *pool);
00460 
00461   /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
00462    * with @a depth always set to @c svn_depth_infinity. */
00463   svn_error_t *(*link_path)(void *report_baton,
00464                             const char *path,
00465                             const char *url,
00466                             svn_revnum_t revision,
00467                             svn_boolean_t start_empty,
00468                             const char *lock_token,
00469                             apr_pool_t *pool);
00470 
00471   /** Same as the corresponding field in @c svn_ra_reporter3_t. */
00472   svn_error_t *(*finish_report)(void *report_baton,
00473                                 apr_pool_t *pool);
00474 
00475   /** Same as the corresponding field in @c svn_ra_reporter3_t. */
00476   svn_error_t *(*abort_report)(void *report_baton,
00477                                apr_pool_t *pool);
00478 
00479 } svn_ra_reporter2_t;
00480 
00481 /**
00482  * Similar to @c svn_ra_reporter2_t, but without support for lock tokens.
00483  *
00484  * @deprecated Provided for backward compatibility with the 1.1 API.
00485  */
00486 typedef struct svn_ra_reporter_t
00487 {
00488   /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
00489    * with @a lock_token always set to NULL. */
00490   svn_error_t *(*set_path)(void *report_baton,
00491                            const char *path,
00492                            svn_revnum_t revision,
00493                            svn_boolean_t start_empty,
00494                            apr_pool_t *pool);
00495 
00496   /** Same as the corresponding field in @c svn_ra_reporter2_t. */
00497   svn_error_t *(*delete_path)(void *report_baton,
00498                               const char *path,
00499                               apr_pool_t *pool);
00500 
00501   /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
00502    * with @a lock_token always set to NULL. */
00503   svn_error_t *(*link_path)(void *report_baton,
00504                             const char *path,
00505                             const char *url,
00506                             svn_revnum_t revision,
00507                             svn_boolean_t start_empty,
00508                             apr_pool_t *pool);
00509 
00510   /** Same as the corresponding field in @c svn_ra_reporter2_t. */
00511   svn_error_t *(*finish_report)(void *report_baton,
00512                                 apr_pool_t *pool);
00513 
00514   /** Same as the corresponding field in @c svn_ra_reporter2_t. */
00515   svn_error_t *(*abort_report)(void *report_baton,
00516                                apr_pool_t *pool);
00517 } svn_ra_reporter_t;
00518 
00519 
00520 /** A collection of callbacks implemented by libsvn_client which allows
00521  * an RA layer to "pull" information from the client application, or
00522  * possibly store information.  libsvn_client passes this vtable to
00523  * svn_ra_open4().
00524  *
00525  * Each routine takes a @a callback_baton originally provided with the
00526  * vtable.
00527  *
00528  * Clients must use svn_ra_create_callbacks() to allocate and
00529  * initialize this structure.
00530  *
00531  * @since New in 1.3.
00532  */
00533 typedef struct svn_ra_callbacks2_t
00534 {
00535   /** Open a unique temporary file for writing in the working copy.
00536    * This file will be automatically deleted when @a fp is closed.
00537    *
00538    * @deprecated This callback should no longer be used by RA layers.
00539    */
00540   svn_error_t *(*open_tmp_file)(apr_file_t **fp,
00541                                 void *callback_baton,
00542                                 apr_pool_t *pool);
00543 
00544   /** An authentication baton, created by the application, which is
00545    * capable of retrieving all known types of credentials.
00546    */
00547   svn_auth_baton_t *auth_baton;
00548 
00549   /*** The following items may be set to NULL to disallow the RA layer
00550        to perform the respective operations of the vtable functions.
00551        Perhaps WC props are not defined or are in invalid for this
00552        session, or perhaps the commit operation this RA session will
00553        perform is a server-side only one that shouldn't do post-commit
00554        processing on a working copy path.  ***/
00555 
00556   /** Fetch working copy properties.
00557    *
00558    *<pre> ### we might have a problem if the RA layer ever wants a property
00559    * ### that corresponds to a different revision of the file than
00560    * ### what is in the WC. we'll cross that bridge one day...</pre>
00561    */
00562   svn_ra_get_wc_prop_func_t get_wc_prop;
00563 
00564   /** Immediately set new values for working copy properties. */
00565   svn_ra_set_wc_prop_func_t set_wc_prop;
00566 
00567   /** Schedule new values for working copy properties. */
00568   svn_ra_push_wc_prop_func_t push_wc_prop;
00569 
00570   /** Invalidate working copy properties. */
00571   svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
00572 
00573   /** Notification callback used for progress information.
00574    * May be NULL if not used.
00575    */
00576   svn_ra_progress_notify_func_t progress_func;
00577 
00578   /** Notification callback baton, used with progress_func. */
00579   void *progress_baton;
00580 
00581   /** Cancellation function
00582    *
00583    * As its baton, the general callback baton is used
00584    *
00585    * @since New in 1.5
00586    */
00587   svn_cancel_func_t cancel_func;
00588 
00589   /** Client string customization callback function
00590    * @since New in 1.5
00591    */
00592   svn_ra_get_client_string_func_t get_client_string;
00593 
00594   /** Working copy file content fetching function.
00595    * @since New in 1.8.
00596    */
00597   svn_ra_get_wc_contents_func_t get_wc_contents;
00598 
00599   /** Check-tunnel callback
00600    *
00601    * If not @c NULL, and open_tunnel_func is also not @c NULL, this
00602    * callback will be invoked to check if open_tunnel_func should be
00603    * used to create a specific tunnel, or if the default tunnel
00604    * implementation (either built-in or configured in the client
00605    * configuration file) should be used instead.
00606    * @since New in 1.9.
00607    */
00608   svn_ra_check_tunnel_func_t check_tunnel_func;
00609 
00610   /** Open-tunnel callback
00611    *
00612    * If not @c NULL, this callback will be invoked to create a tunnel
00613    * for a ra_svn connection that needs one, overriding any tunnel
00614    * definitions in the client config file. This callback is used only
00615    * for ra_svn and ignored by the other RA modules.
00616    * @since New in 1.9.
00617    */
00618   svn_ra_open_tunnel_func_t open_tunnel_func;
00619 
00620   /** A baton used with open_tunnel_func and close_tunnel_func.
00621    * @since New in 1.9.
00622    */
00623   void *tunnel_baton;
00624 } svn_ra_callbacks2_t;
00625 
00626 /** Similar to svn_ra_callbacks2_t, except that the progress
00627  * notification function and baton is missing.
00628  *
00629  * @deprecated Provided for backward compatibility with the 1.2 API.
00630  */
00631 typedef struct svn_ra_callbacks_t
00632 {
00633   svn_error_t *(*open_tmp_file)(apr_file_t **fp,
00634                                 void *callback_baton,
00635                                 apr_pool_t *pool);
00636 
00637   svn_auth_baton_t *auth_baton;
00638 
00639   svn_ra_get_wc_prop_func_t get_wc_prop;
00640 
00641   svn_ra_set_wc_prop_func_t set_wc_prop;
00642 
00643   svn_ra_push_wc_prop_func_t push_wc_prop;
00644 
00645   svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
00646 
00647 } svn_ra_callbacks_t;
00648 
00649 
00650 
00651 /*----------------------------------------------------------------------*/
00652 
00653 /* Public Interfaces. */
00654 
00655 /**
00656  * Initialize the RA library.  This function must be called before using
00657  * any function in this header, except the deprecated APIs based on
00658  * @c svn_ra_plugin_t, or svn_ra_version().  This function must not be called
00659  * simultaneously in multiple threads.  @a pool must live
00660  * longer than any open RA sessions.
00661  *
00662  * @since New in 1.2.
00663  */
00664 svn_error_t *
00665 svn_ra_initialize(apr_pool_t *pool);
00666 
00667 /** Initialize a callback structure.
00668 * Set @a *callbacks to a ra callbacks object, allocated in @a pool.
00669 *
00670 * Clients must use this function to allocate and initialize @c
00671 * svn_ra_callbacks2_t structures.
00672 *
00673 * @since New in 1.3.
00674 */
00675 svn_error_t *
00676 svn_ra_create_callbacks(svn_ra_callbacks2_t **callbacks,
00677                         apr_pool_t *pool);
00678 
00679 /**
00680  * A repository access session.  This object is used to perform requests
00681  * to a repository, identified by a URL.
00682  *
00683  * @since New in 1.2.
00684  */
00685 typedef struct svn_ra_session_t svn_ra_session_t;
00686 
00687 /**
00688  * Open a repository access session to the repository at @a repos_URL,
00689  * or inform the caller regarding a correct URL by which to access
00690  * that repository.
00691  *
00692  * If @a repos_URL can be used successfully to access the repository,
00693  * set @a *session_p to an opaque object representing a repository
00694  * session for the repository and (if @a corrected_url is non-NULL)
00695  * set @a *corrected_url to NULL.  If there's a better URL that the
00696  * caller should try and @a corrected_url is non-NULL, set
00697  * @a *session_p to NULL and @a *corrected_url to the corrected URL.  If
00698  * there's a better URL that the caller should try, and @a
00699  * corrected_url is NULL, return an #SVN_ERR_RA_SESSION_URL_MISMATCH
00700  * error.  Allocate all returned items in @a pool.
00701  *
00702  * The @a repos_URL need not point to the root of the repository: subject
00703  * to authorization, it may point to any path within the repository, even
00704  * a path at which no node exists in the repository.  The session will
00705  * remember this URL as its "session URL" (also called "session root URL"),
00706  * until changed by svn_ra_reparent().  Many RA functions take or return
00707  * paths that are relative to the session URL.
00708  *
00709  * If a @a corrected_url is returned, it will point to the same path
00710  * within the new repository root URL that @a repos_URL pointed to within
00711  * the old repository root URL.
00712  *
00713  * Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
00714  * to the UUID of the repository at @c repos_URL.
00715  *
00716  * @a callbacks/@a callback_baton is a table of callbacks provided by the
00717  * client; see @c svn_ra_callbacks2_t.
00718  *
00719  * @a config is a hash mapping <tt>const char *</tt> keys to
00720  * @c svn_config_t * values.  For example, the @c svn_config_t for the
00721  * "~/.subversion/config" file is under the key "config".  @a config may
00722  * be NULL.  This function examines some config settings under the
00723  * "servers" key (if present) before loading the required RA module, and
00724  * the RA module may also examine any config settings.
00725  *
00726  * All RA requests require a session; they will continue to
00727  * use @a pool for memory allocation.
00728  *
00729  * @see svn_client_open_ra_session().
00730  *
00731  * @since New in 1.7.
00732  */
00733 svn_error_t *
00734 svn_ra_open4(svn_ra_session_t **session_p,
00735              const char **corrected_url,
00736              const char *repos_URL,
00737              const char *uuid,
00738              const svn_ra_callbacks2_t *callbacks,
00739              void *callback_baton,
00740              apr_hash_t *config,
00741              apr_pool_t *pool);
00742 
00743 /** Similar to svn_ra_open4(), but with @a corrected_url always passed
00744  * as @c NULL.
00745  *
00746  * @since New in 1.5.
00747  * @deprecated Provided for backward compatibility with the 1.6 API.
00748  */
00749 SVN_DEPRECATED
00750 svn_error_t *
00751 svn_ra_open3(svn_ra_session_t **session_p,
00752              const char *repos_URL,
00753              const char *uuid,
00754              const svn_ra_callbacks2_t *callbacks,
00755              void *callback_baton,
00756              apr_hash_t *config,
00757              apr_pool_t *pool);
00758 
00759 /**
00760  * Similar to svn_ra_open3(), but with @a uuid set to @c NULL.
00761  *
00762  * @since New in 1.3.
00763  * @deprecated Provided for backward compatibility with the 1.4 API.
00764  */
00765 SVN_DEPRECATED
00766 svn_error_t *
00767 svn_ra_open2(svn_ra_session_t **session_p,
00768              const char *repos_URL,
00769              const svn_ra_callbacks2_t *callbacks,
00770              void *callback_baton,
00771              apr_hash_t *config,
00772              apr_pool_t *pool);
00773 
00774 /**
00775  * @see svn_ra_open2().
00776  * @since New in 1.2.
00777  * @deprecated Provided for backward compatibility with the 1.2 API.
00778  */
00779 SVN_DEPRECATED
00780 svn_error_t *
00781 svn_ra_open(svn_ra_session_t **session_p,
00782             const char *repos_URL,
00783             const svn_ra_callbacks_t *callbacks,
00784             void *callback_baton,
00785             apr_hash_t *config,
00786             apr_pool_t *pool);
00787 
00788 /** Change the root URL of an open @a ra_session to point to a new path in the
00789  * same repository.  @a url is the new root URL.  Use @a pool for
00790  * temporary allocations.
00791  *
00792  * If @a url has a different repository root than the current session
00793  * URL, return @c SVN_ERR_RA_ILLEGAL_URL.
00794  *
00795  * @since New in 1.4.
00796  */
00797 svn_error_t *
00798 svn_ra_reparent(svn_ra_session_t *ra_session,
00799                 const char *url,
00800                 apr_pool_t *pool);
00801 
00802 /** Set @a *url to the session URL -- the URL to which @a ra_session was
00803  * opened or most recently reparented.
00804  *
00805  * @since New in 1.5.
00806  */
00807 svn_error_t *
00808 svn_ra_get_session_url(svn_ra_session_t *ra_session,
00809                        const char **url,
00810                        apr_pool_t *pool);
00811 
00812 
00813 /** Convert @a url into a path relative to the session URL of @a ra_session,
00814  * setting @a *rel_path to that value.  If @a url is not
00815  * a child of the session URL, return @c SVN_ERR_RA_ILLEGAL_URL.
00816  *
00817  * The returned path is uri decoded to allow using it with the ra or other
00818  * apis as a valid relpath.
00819  *
00820  * @since New in 1.7.
00821  */
00822 svn_error_t *
00823 svn_ra_get_path_relative_to_session(svn_ra_session_t *ra_session,
00824                                     const char **rel_path,
00825                                     const char *url,
00826                                     apr_pool_t *pool);
00827 
00828 /** Convert @a url into a path relative to the repository root URL of
00829  * the repository with which @a ra_session is associated, setting @a
00830  * *rel_path to that value.  If @a url is not a child of repository
00831  * root URL, return @c SVN_ERR_RA_ILLEGAL_URL.
00832  *
00833  * The returned path is uri decoded to allow using it with the ra or other
00834  * apis as a valid relpath.
00835  *
00836  * @since New in 1.7.
00837  */
00838 svn_error_t *
00839 svn_ra_get_path_relative_to_root(svn_ra_session_t *ra_session,
00840                                  const char **rel_path,
00841                                  const char *url,
00842                                  apr_pool_t *pool);
00843 
00844 /**
00845  * Get the latest revision number from the repository of @a session.
00846  *
00847  * Use @a pool for memory allocation.
00848  *
00849  * @since New in 1.2.
00850  */
00851 svn_error_t *
00852 svn_ra_get_latest_revnum(svn_ra_session_t *session,
00853                          svn_revnum_t *latest_revnum,
00854                          apr_pool_t *pool);
00855 
00856 /**
00857  * Get the latest revision number at time @a tm in the repository of
00858  * @a session.
00859  *
00860  * Use @a pool for memory allocation.
00861  *
00862  * @since New in 1.2.
00863  */
00864 svn_error_t *
00865 svn_ra_get_dated_revision(svn_ra_session_t *session,
00866                           svn_revnum_t *revision,
00867                           apr_time_t tm,
00868                           apr_pool_t *pool);
00869 
00870 /**
00871  * Set the property @a name to @a value on revision @a rev in the repository
00872  * of @a session.
00873  *
00874  * If @a value is @c NULL, delete the named revision property.
00875  *
00876  * If the server advertises the #SVN_RA_CAPABILITY_ATOMIC_REVPROPS capability
00877  * and @a old_value_p is not @c NULL, then changing the property will fail with
00878  * an error chain that contains #SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the
00879  * present value of the property is not @a *old_value_p.  (This is an atomic
00880  * test-and-set).
00881  * @a *old_value_p may be @c NULL, representing that the property must be not
00882  * already set.
00883  *
00884  * If the capability is not advertised, then @a old_value_p MUST be @c NULL.
00885  *
00886  * Please note that properties attached to revisions are @em unversioned.
00887  *
00888  * Use @a pool for memory allocation.
00889  *
00890  * @see svn_fs_change_rev_prop2(), svn_error_find_cause().
00891  *
00892  * @since New in 1.7.
00893  */
00894 svn_error_t *
00895 svn_ra_change_rev_prop2(svn_ra_session_t *session,
00896                         svn_revnum_t rev,
00897                         const char *name,
00898                         const svn_string_t *const *old_value_p,
00899                         const svn_string_t *value,
00900                         apr_pool_t *pool);
00901 
00902 /**
00903  * Similar to svn_ra_change_rev_prop2(), but with @a old_value_p set
00904  * to @c NULL.
00905  *
00906  * @since New in 1.2.
00907  * @deprecated Provided for backward compatibility with the 1.6 API.
00908  */
00909 SVN_DEPRECATED
00910 svn_error_t *
00911 svn_ra_change_rev_prop(svn_ra_session_t *session,
00912                        svn_revnum_t rev,
00913                        const char *name,
00914                        const svn_string_t *value,
00915                        apr_pool_t *pool);
00916 
00917 /**
00918  * Set @a *props to the list of unversioned properties attached to revision
00919  * @a rev in the repository of @a session.  The hash maps
00920  * (<tt>const char *</tt>) names to (<tt>@c svn_string_t *</tt>) values.
00921  *
00922  * Use @a pool for memory allocation.
00923  *
00924  * @since New in 1.2.
00925  */
00926 svn_error_t *
00927 svn_ra_rev_proplist(svn_ra_session_t *session,
00928                     svn_revnum_t rev,
00929                     apr_hash_t **props,
00930                     apr_pool_t *pool);
00931 
00932 /**
00933  * Set @a *value to the value of unversioned property @a name attached to
00934  * revision @a rev in the repository of @a session.  If @a rev has no
00935  * property by that name, set @a *value to @c NULL.
00936  *
00937  * Use @a pool for memory allocation.
00938  *
00939  * @since New in 1.2.
00940  */
00941 svn_error_t *
00942 svn_ra_rev_prop(svn_ra_session_t *session,
00943                 svn_revnum_t rev,
00944                 const char *name,
00945                 svn_string_t **value,
00946                 apr_pool_t *pool);
00947 
00948 /**
00949  * Set @a *editor and @a *edit_baton to an editor for committing
00950  * changes to the repository of @a session, setting the revision
00951  * properties from @a revprop_table.  The revisions being committed
00952  * against are passed to the editor functions, starting with the rev
00953  * argument to @c open_root.  The path root of the commit is the @a
00954  * session's URL.
00955  *
00956  * @a revprop_table is a hash mapping <tt>const char *</tt> property
00957  * names to @c svn_string_t property values.  The commit log message
00958  * is expected to be in the @c SVN_PROP_REVISION_LOG element.  @a
00959  * revprop_table can not contain either of @c SVN_PROP_REVISION_DATE
00960  * or @c SVN_PROP_REVISION_AUTHOR.
00961  *
00962  * Before @c close_edit returns, but after the commit has succeeded,
00963  * it will invoke @a commit_callback (if non-NULL) with filled-in
00964  * #svn_commit_info_t *, @a commit_baton, and @a pool or some subpool
00965  * thereof as arguments.  If @a commit_callback returns an error, that error
00966  * will be returned from @c * close_edit, otherwise @c close_edit will return
00967  * successfully (unless it encountered an error before invoking
00968  * @a commit_callback).
00969  *
00970  * The callback will not be called if the commit was a no-op
00971  * (i.e. nothing was committed);
00972  *
00973  * @a lock_tokens, if non-NULL, is a hash mapping <tt>const char
00974  * *</tt> paths (relative to the URL of @a session) to <tt>
00975  * const char *</tt> lock tokens.  The server checks that the
00976  * correct token is provided for each committed, locked path.  @a lock_tokens
00977  * must live during the whole commit operation.
00978  *
00979  * If @a keep_locks is @c TRUE, then do not release locks on
00980  * committed objects.  Else, automatically release such locks.
00981  *
00982  * The caller may not perform any RA operations using @a session before
00983  * finishing the edit.
00984  *
00985  * Use @a pool for memory allocation.
00986  *
00987  * @since New in 1.5.
00988  *
00989  * @note Like most commit editors, the returned editor requires that the
00990  * @c copyfrom_path parameter passed to its @c add_file and @c add_directory
00991  * methods is a URL, not a relative path.
00992  */
00993 svn_error_t *
00994 svn_ra_get_commit_editor3(svn_ra_session_t *session,
00995                           const svn_delta_editor_t **editor,
00996                           void **edit_baton,
00997                           apr_hash_t *revprop_table,
00998                           svn_commit_callback2_t commit_callback,
00999                           void *commit_baton,
01000                           apr_hash_t *lock_tokens,
01001                           svn_boolean_t keep_locks,
01002                           apr_pool_t *pool);
01003 
01004 /**
01005  * Same as svn_ra_get_commit_editor3(), but with @c revprop_table set
01006  * to a hash containing the @c SVN_PROP_REVISION_LOG property set
01007  * to the value of @a log_msg.
01008  *
01009  * @since New in 1.4.
01010  *
01011  * @deprecated Provided for backward compatibility with the 1.4 API.
01012  */
01013 SVN_DEPRECATED
01014 svn_error_t *
01015 svn_ra_get_commit_editor2(svn_ra_session_t *session,
01016                           const svn_delta_editor_t **editor,
01017                           void **edit_baton,
01018                           const char *log_msg,
01019                           svn_commit_callback2_t commit_callback,
01020                           void *commit_baton,
01021                           apr_hash_t *lock_tokens,
01022                           svn_boolean_t keep_locks,
01023                           apr_pool_t *pool);
01024 
01025 /**
01026  * Same as svn_ra_get_commit_editor2(), but uses @c svn_commit_callback_t.
01027  *
01028  * @since New in 1.2.
01029  *
01030  * @deprecated Provided for backward compatibility with the 1.3 API.
01031  */
01032 SVN_DEPRECATED
01033 svn_error_t *
01034 svn_ra_get_commit_editor(svn_ra_session_t *session,
01035                          const svn_delta_editor_t **editor,
01036                          void **edit_baton,
01037                          const char *log_msg,
01038                          svn_commit_callback_t callback,
01039                          void *callback_baton,
01040                          apr_hash_t *lock_tokens,
01041                          svn_boolean_t keep_locks,
01042                          apr_pool_t *pool);
01043 
01044 /**
01045  * Fetch the contents and properties of file @a path at @a revision.
01046  * @a revision may be SVN_INVALID_REVNUM, indicating that the HEAD
01047  * revision should be used.  Interpret @a path relative to the URL in
01048  * @a session.  Use @a pool for all allocations.
01049  *
01050  * If @a revision is @c SVN_INVALID_REVNUM and @a fetched_rev is not
01051  * @c NULL, then set @a *fetched_rev to the actual revision that was
01052  * retrieved.
01053  *
01054  * If @a stream is non @c NULL, push the contents of the file at @a
01055  * stream, do not call svn_stream_close() when finished.
01056  *
01057  * If @a props is non @c NULL, set @a *props to contain the properties of
01058  * the file.  This means @em all properties: not just ones controlled by
01059  * the user and stored in the repository fs, but non-tweakable ones
01060  * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
01061  * etc.)  The keys are <tt>const char *</tt>, values are
01062  * <tt>@c svn_string_t *</tt>.
01063  *
01064  * The stream handlers for @a stream may not perform any RA
01065  * operations using @a session.
01066  *
01067  * @since New in 1.2.
01068  */
01069 svn_error_t *
01070 svn_ra_get_file(svn_ra_session_t *session,
01071                 const char *path,
01072                 svn_revnum_t revision,
01073                 svn_stream_t *stream,
01074                 svn_revnum_t *fetched_rev,
01075                 apr_hash_t **props,
01076                 apr_pool_t *pool);
01077 
01078 /**
01079  * If @a dirents is non @c NULL, set @a *dirents to contain all the entries
01080  * of directory @a path at @a revision.  The keys of @a dirents will be
01081  * entry names (<tt>const char *</tt>), and the values dirents
01082  * (<tt>@c svn_dirent_t *</tt>).  Use @a pool for all allocations.
01083  *
01084  * @a dirent_fields controls which portions of the <tt>@c svn_dirent_t</tt>
01085  * objects are filled in.  To have them completely filled in just pass
01086  * @c SVN_DIRENT_ALL, otherwise pass the bitwise OR of all the @c SVN_DIRENT_
01087  * fields you would like to have returned to you.
01088  *
01089  * @a path is interpreted relative to the URL in @a session.
01090  *
01091  * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
01092  * @a *fetched_rev is not @c NULL, then this function will set
01093  * @a *fetched_rev to the actual revision that was retrieved.  (Some
01094  * callers want to know, and some don't.)
01095  *
01096  * If @a props is non @c NULL, set @a *props to contain the properties of
01097  * the directory, including properties that are non-tweakable and
01098  * generated by the SCM system itself (such as #svn_prop_wc_kind and
01099  * #svn_prop_entry_kind properties).  The keys are <tt>const char *</tt>,
01100  * values are <tt>@c svn_string_t *</tt>.
01101  *
01102  * @since New in 1.4.
01103  */
01104 svn_error_t *
01105 svn_ra_get_dir2(svn_ra_session_t *session,
01106                 apr_hash_t **dirents,
01107                 svn_revnum_t *fetched_rev,
01108                 apr_hash_t **props,
01109                 const char *path,
01110                 svn_revnum_t revision,
01111                 apr_uint32_t dirent_fields,
01112                 apr_pool_t *pool);
01113 
01114 /**
01115  * Similar to @c svn_ra_get_dir2, but with @c SVN_DIRENT_ALL for the
01116  * @a dirent_fields parameter.
01117  *
01118  * @since New in 1.2.
01119  *
01120  * @deprecated Provided for compatibility with the 1.3 API.
01121  */
01122 SVN_DEPRECATED
01123 svn_error_t *
01124 svn_ra_get_dir(svn_ra_session_t *session,
01125                const char *path,
01126                svn_revnum_t revision,
01127                apr_hash_t **dirents,
01128                svn_revnum_t *fetched_rev,
01129                apr_hash_t **props,
01130                apr_pool_t *pool);
01131 
01132 /**
01133  * Set @a *catalog to a mergeinfo catalog for the paths in @a paths.
01134  * If no mergeinfo is available, set @a *catalog to @c NULL.  The
01135  * requested mergeinfo hashes are for @a paths (which are relative to
01136  * @a session's URL) in @a revision.  If one of the paths does not exist
01137  * in that revision, return SVN_ERR_FS_NOT_FOUND.
01138  *
01139  * @a inherit indicates whether explicit, explicit or inherited, or
01140  * only inherited mergeinfo for @a paths is retrieved.
01141  *
01142  * If @a include_descendants is TRUE, then additionally return the
01143  * mergeinfo for any descendant of any element of @a paths which has
01144  * the @c SVN_PROP_MERGEINFO property explicitly set on it.  (Note
01145  * that inheritance is only taken into account for the elements in @a
01146  * paths; descendants of the elements in @a paths which get their
01147  * mergeinfo via inheritance are not included in @a *catalog.)
01148  *
01149  * Allocate the returned values in @a pool.
01150  *
01151  * If @a revision is @c SVN_INVALID_REVNUM, it defaults to youngest.
01152  *
01153  * If the server doesn't support retrieval of mergeinfo (which can
01154  * happen even for file:// URLs, if the repository itself hasn't been
01155  * upgraded), return @c SVN_ERR_UNSUPPORTED_FEATURE in preference to
01156  * any other error that might otherwise be returned.
01157  *
01158  * @since New in 1.5.
01159  */
01160 svn_error_t *
01161 svn_ra_get_mergeinfo(svn_ra_session_t *session,
01162                      svn_mergeinfo_catalog_t *catalog,
01163                      const apr_array_header_t *paths,
01164                      svn_revnum_t revision,
01165                      svn_mergeinfo_inheritance_t inherit,
01166                      svn_boolean_t include_descendants,
01167                      apr_pool_t *pool);
01168 
01169 /**
01170  * Ask the RA layer to update a working copy to a new revision.
01171  *
01172  * The client initially provides an @a update_editor/@a update_baton to the
01173  * RA layer; this editor contains knowledge of where the change will
01174  * begin in the working copy (when @c open_root() is called).
01175  *
01176  * In return, the client receives a @a reporter/@a report_baton.  The
01177  * client then describes its working copy by making calls into the
01178  * @a reporter.
01179  *
01180  * When finished, the client calls @a reporter->finish_report().  The
01181  * RA layer then does a complete drive of @a update_editor, ending with
01182  * @a update_editor->close_edit(), to update the working copy.
01183  *
01184  * @a update_target is an optional single path component to restrict
01185  * the scope of the update to just that entry (in the directory
01186  * represented by the @a session's URL).  If @a update_target is the
01187  * empty string, the entire directory is updated.
01188  *
01189  * Update the target only as deeply as @a depth indicates.
01190  *
01191  * If @a send_copyfrom_args is TRUE, then ask the server to send
01192  * copyfrom arguments to add_file() and add_directory() when possible.
01193  * (Note: this means that any subsequent txdeltas coming from the
01194  * server are presumed to apply against the copied file!)
01195  *
01196  * Use @a ignore_ancestry to control whether or not items being
01197  * updated will be checked for relatedness first.  Unrelated items
01198  * are typically transmitted to the editor as a deletion of one thing
01199  * and the addition of another, but if this flag is @c TRUE,
01200  * unrelated items will be diffed as if they were related.
01201  *
01202  * The working copy will be updated to @a revision_to_update_to, or the
01203  * "latest" revision if this arg is invalid.
01204  *
01205  * The caller may not perform any RA operations using @a session before
01206  * finishing the report, and may not perform any RA operations using
01207  * @a session from within the editing operations of @a update_editor.
01208  *
01209  * Allocate @a *reporter and @a *report_baton in @a result_pool.  Use
01210  * @a scratch_pool for temporary allocations.
01211  *
01212  * @note The reporter provided by this function does NOT supply copy-
01213  * from information to the diff editor callbacks.
01214  *
01215  * @note In order to prevent pre-1.5 servers from doing more work than
01216  * needed, and sending too much data back, a pre-1.5 'recurse'
01217  * directive may be sent to the server, based on @a depth.
01218  *
01219  * @note Pre Subversion 1.8 svnserve based servers never ignore ancestry.
01220  *
01221  * @note This differs from calling svn_ra_do_switch3() with the current
01222  * URL of the target node.  Update changes only the revision numbers,
01223  * leaving any switched subtrees still switched, whereas switch changes
01224  * every node in the tree to a child of the same URL.
01225  *
01226  * @since New in 1.8.
01227  */
01228 svn_error_t *
01229 svn_ra_do_update3(svn_ra_session_t *session,
01230                   const svn_ra_reporter3_t **reporter,
01231                   void **report_baton,
01232                   svn_revnum_t revision_to_update_to,
01233                   const char *update_target,
01234                   svn_depth_t depth,
01235                   svn_boolean_t send_copyfrom_args,
01236                   svn_boolean_t ignore_ancestry,
01237                   const svn_delta_editor_t *update_editor,
01238                   void *update_baton,
01239                   apr_pool_t *result_pool,
01240                   apr_pool_t *scratch_pool);
01241 
01242 /**
01243  * Similar to svn_ra_do_update3(), but always ignoring ancestry.
01244  *
01245  * @since New in 1.5.
01246  * @deprecated Provided for compatibility with the 1.4 API.
01247  */
01248 SVN_DEPRECATED
01249 svn_error_t *
01250 svn_ra_do_update2(svn_ra_session_t *session,
01251                   const svn_ra_reporter3_t **reporter,
01252                   void **report_baton,
01253                   svn_revnum_t revision_to_update_to,
01254                   const char *update_target,
01255                   svn_depth_t depth,
01256                   svn_boolean_t send_copyfrom_args,
01257                   const svn_delta_editor_t *update_editor,
01258                   void *update_baton,
01259                   apr_pool_t *pool);
01260 
01261 /**
01262  * Similar to svn_ra_do_update2(), but taking @c svn_ra_reporter2_t
01263  * instead of @c svn_ra_reporter3_t; if @a recurse is true, pass @c
01264  * svn_depth_infinity for @a depth, else pass @c svn_depth_files; and
01265  * with @a send_copyfrom_args always false.
01266  *
01267  * @deprecated Provided for compatibility with the 1.4 API.
01268  */
01269 SVN_DEPRECATED
01270 svn_error_t *
01271 svn_ra_do_update(svn_ra_session_t *session,
01272                  const svn_ra_reporter2_t **reporter,
01273                  void **report_baton,
01274                  svn_revnum_t revision_to_update_to,
01275                  const char *update_target,
01276                  svn_boolean_t recurse,
01277                  const svn_delta_editor_t *update_editor,
01278                  void *update_baton,
01279                  apr_pool_t *pool);
01280 
01281 
01282 /**
01283  * Ask the RA layer to switch a working copy to a new revision and URL.
01284  *
01285  * This is similar to svn_ra_do_update3(), but also changes the URL of
01286  * every node in the target tree to a child of the @a switch_url.  In
01287  * contrast, update changes only the revision numbers, leaving any
01288  * switched subtrees still switched.
01289  *
01290  * @note Pre Subversion 1.8 svnserve based servers always ignore ancestry
01291  * and never send copyfrom data.
01292  *
01293  * @since New in 1.8.
01294  */
01295 svn_error_t *
01296 svn_ra_do_switch3(svn_ra_session_t *session,
01297                   const svn_ra_reporter3_t **reporter,
01298                   void **report_baton,
01299                   svn_revnum_t revision_to_switch_to,
01300                   const char *switch_target,
01301                   svn_depth_t depth,
01302                   const char *switch_url,
01303                   svn_boolean_t send_copyfrom_args,
01304                   svn_boolean_t ignore_ancestry,
01305                   const svn_delta_editor_t *switch_editor,
01306                   void *switch_baton,
01307                   apr_pool_t *result_pool,
01308                   apr_pool_t *scratch_pool);
01309 
01310 /**
01311  * Similar to svn_ra_do_switch3(), but always ignoring ancestry and
01312  * never sending copyfrom_args.
01313  *
01314  * @since New in 1.5.
01315  * @deprecated Provided for compatibility with the 1.7 API.
01316  */
01317 SVN_DEPRECATED
01318 svn_error_t *
01319 svn_ra_do_switch2(svn_ra_session_t *session,
01320                   const svn_ra_reporter3_t **reporter,
01321                   void **report_baton,
01322                   svn_revnum_t revision_to_switch_to,
01323                   const char *switch_target,
01324                   svn_depth_t depth,
01325                   const char *switch_url,
01326                   const svn_delta_editor_t *switch_editor,
01327                   void *switch_baton,
01328                   apr_pool_t *pool);
01329 
01330 /**
01331  * Similar to svn_ra_do_switch2(), but taking @c svn_ra_reporter2_t
01332  * instead of @c svn_ra_reporter3_t, and therefore only able to report
01333  * @c svn_depth_infinity for depths.  The switch itself is performed
01334  * according to @a recurse: if TRUE, then use @c svn_depth_infinity
01335  * for @a depth, else use @c svn_depth_files.
01336  *
01337  * @deprecated Provided for compatibility with the 1.4 API.
01338  */
01339 SVN_DEPRECATED
01340 svn_error_t *
01341 svn_ra_do_switch(svn_ra_session_t *session,
01342                  const svn_ra_reporter2_t **reporter,
01343                  void **report_baton,
01344                  svn_revnum_t revision_to_switch_to,
01345                  const char *switch_target,
01346                  svn_boolean_t recurse,
01347                  const char *switch_url,
01348                  const svn_delta_editor_t *switch_editor,
01349                  void *switch_baton,
01350                  apr_pool_t *pool);
01351 
01352 /**
01353  * Ask the RA layer to describe the status of a working copy with respect
01354  * to @a revision of the repository (or HEAD, if @a revision is invalid).
01355  *
01356  * The client initially provides a @a status_editor/@a status_baton to the RA
01357  * layer; this editor contains knowledge of where the change will
01358  * begin in the working copy (when open_root() is called).
01359  *
01360  * In return, the client receives a @a reporter/@a report_baton. The
01361  * client then describes its working copy by making calls into the
01362  * @a reporter.
01363  *
01364  * When finished, the client calls @a reporter->finish_report(). The RA
01365  * layer then does a complete drive of @a status_editor, ending with
01366  * close_edit(), to report, essentially, what would be modified in
01367  * the working copy were the client to call do_update().
01368  * @a status_target is an optional single path component will restrict
01369  * the scope of the status report to an entry in the directory
01370  * represented by the @a session's URL, or empty if the entire directory
01371  * is meant to be examined.
01372  *
01373  * Get status as deeply as @a depth indicates. If @a depth is
01374  * #svn_depth_unknown, get the status down to the ambient depth of the
01375  * working copy. If @a depth is deeper than the working copy, include changes
01376  * that would be needed to populate the working copy to that depth.
01377  *
01378  * The caller may not perform any RA operations using @a session
01379  * before finishing the report, and may not perform any RA operations
01380  * using @a session from within the editing operations of @a status_editor.
01381  *
01382  * Use @a pool for memory allocation.
01383  *
01384  * @note The reporter provided by this function does NOT supply copy-
01385  * from information to the diff editor callbacks.
01386  *
01387  * @note In order to prevent pre-1.5 servers from doing more work than
01388  * needed, and sending too much data back, a pre-1.5 'recurse'
01389  * directive may be sent to the server, based on @a depth.
01390  *
01391  * @since New in 1.5.
01392  */
01393 svn_error_t *
01394 svn_ra_do_status2(svn_ra_session_t *session,
01395                   const svn_ra_reporter3_t **reporter,
01396                   void **report_baton,
01397                   const char *status_target,
01398                   svn_revnum_t revision,
01399                   svn_depth_t depth,
01400                   const svn_delta_editor_t *status_editor,
01401                   void *status_baton,
01402                   apr_pool_t *pool);
01403 
01404 
01405 /**
01406  * Similar to svn_ra_do_status2(), but taking @c svn_ra_reporter2_t
01407  * instead of @c svn_ra_reporter3_t, and therefore only able to report
01408  * @c svn_depth_infinity for depths.  The status operation itself is
01409  * performed according to @a recurse: if TRUE, then @a depth is
01410  * @c svn_depth_infinity, else it is @c svn_depth_immediates.
01411  *
01412  * @deprecated Provided for compatibility with the 1.4 API.
01413  */
01414 SVN_DEPRECATED
01415 svn_error_t *
01416 svn_ra_do_status(svn_ra_session_t *session,
01417                  const svn_ra_reporter2_t **reporter,
01418                  void **report_baton,
01419                  const char *status_target,
01420                  svn_revnum_t revision,
01421                  svn_boolean_t recurse,
01422                  const svn_delta_editor_t *status_editor,
01423                  void *status_baton,
01424                  apr_pool_t *pool);
01425 
01426 /**
01427  * Ask the RA layer to 'diff' a working copy against @a versus_url;
01428  * it's another form of svn_ra_do_update2().
01429  *
01430  * @note This function cannot be used to diff a single file, only a
01431  * working copy directory.  See the svn_ra_do_switch3() function
01432  * for more details.
01433  *
01434  * The client initially provides a @a diff_editor/@a diff_baton to the RA
01435  * layer; this editor contains knowledge of where the common diff
01436  * root is in the working copy (when open_root() is called).
01437  *
01438  * In return, the client receives a @a reporter/@a report_baton. The
01439  * client then describes its working copy by making calls into the
01440  * @a reporter.
01441  *
01442  * When finished, the client calls @a reporter->finish_report().  The
01443  * RA layer then does a complete drive of @a diff_editor, ending with
01444  * close_edit(), to transmit the diff.
01445  *
01446  * @a diff_target is an optional single path component will restrict
01447  * the scope of the diff to an entry in the directory represented by
01448  * the @a session's URL, or empty if the entire directory is meant to be
01449  * one of the diff paths.
01450  *
01451  * The working copy will be diffed against @a versus_url as it exists
01452  * in revision @a revision, or as it is in head if @a revision is
01453  * @c SVN_INVALID_REVNUM.
01454  *
01455  * Use @a ignore_ancestry to control whether or not items being
01456  * diffed will be checked for relatedness first.  Unrelated items
01457  * are typically transmitted to the editor as a deletion of one thing
01458  * and the addition of another, but if this flag is @c TRUE,
01459  * unrelated items will be diffed as if they were related.
01460  *
01461  * Diff only as deeply as @a depth indicates.
01462  *
01463  * The caller may not perform any RA operations using @a session before
01464  * finishing the report, and may not perform any RA operations using
01465  * @a session from within the editing operations of @a diff_editor.
01466  *
01467  * @a text_deltas instructs the driver of the @a diff_editor to enable
01468  * the generation of text deltas. If @a text_deltas is FALSE the window
01469  * handler returned by apply_textdelta will be called once with a NULL
01470  * @c svn_txdelta_window_t pointer.
01471  *
01472  * Use @a pool for memory allocation.
01473  *
01474  * @note The reporter provided by this function does NOT supply copy-
01475  * from information to the diff editor callbacks.
01476  *
01477  * @note In order to prevent pre-1.5 servers from doing more work than
01478  * needed, and sending too much data back, a pre-1.5 'recurse'
01479  * directive may be sent to the server, based on @a depth.
01480  *
01481  * @since New in 1.5.
01482  */
01483 svn_error_t *
01484 svn_ra_do_diff3(svn_ra_session_t *session,
01485                 const svn_ra_reporter3_t **reporter,
01486                 void **report_baton,
01487                 svn_revnum_t revision,
01488                 const char *diff_target,
01489                 svn_depth_t depth,
01490                 svn_boolean_t ignore_ancestry,
01491                 svn_boolean_t text_deltas,
01492                 const char *versus_url,
01493                 const svn_delta_editor_t *diff_editor,
01494                 void *diff_baton,
01495                 apr_pool_t *pool);
01496 
01497 /**
01498  * Similar to svn_ra_do_diff3(), but taking @c svn_ra_reporter2_t
01499  * instead of @c svn_ra_reporter3_t, and therefore only able to report
01500  * @c svn_depth_infinity for depths.  Perform the diff according to
01501  * @a recurse: if TRUE, then @a depth is @c svn_depth_infinity, else
01502  * it is @c svn_depth_files.
01503  *
01504  * @deprecated Provided for compatibility with the 1.4 API.
01505  */
01506 SVN_DEPRECATED
01507 svn_error_t *
01508 svn_ra_do_diff2(svn_ra_session_t *session,
01509                 const svn_ra_reporter2_t **reporter,
01510                 void **report_baton,
01511                 svn_revnum_t revision,
01512                 const char *diff_target,
01513                 svn_boolean_t recurse,
01514                 svn_boolean_t ignore_ancestry,
01515                 svn_boolean_t text_deltas,
01516                 const char *versus_url,
01517                 const svn_delta_editor_t *diff_editor,
01518                 void *diff_baton,
01519                 apr_pool_t *pool);
01520 
01521 
01522 /**
01523  * Similar to svn_ra_do_diff2(), but with @a text_deltas set to @c TRUE.
01524  *
01525  * @deprecated Provided for backward compatibility with the 1.3 API.
01526  */
01527 SVN_DEPRECATED
01528 svn_error_t *
01529 svn_ra_do_diff(svn_ra_session_t *session,
01530                const svn_ra_reporter2_t **reporter,
01531                void **report_baton,
01532                svn_revnum_t revision,
01533                const char *diff_target,
01534                svn_boolean_t recurse,
01535                svn_boolean_t ignore_ancestry,
01536                const char *versus_url,
01537                const svn_delta_editor_t *diff_editor,
01538                void *diff_baton,
01539                apr_pool_t *pool);
01540 
01541 /**
01542  * Invoke @a receiver with @a receiver_baton on each log message from
01543  * @a start to @a end.  @a start may be greater or less than @a end;
01544  * this just controls whether the log messages are processed in descending
01545  * or ascending revision number order.
01546  *
01547  * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest.
01548  *
01549  * If @a paths is non-NULL and has one or more elements, then only show
01550  * revisions in which at least one of @a paths was changed (i.e., if
01551  * file, text or props changed; if dir, props changed or an entry
01552  * was added or deleted).  Each path is an <tt>const char *</tt>, relative
01553  * to the @a session's common parent.
01554  *
01555  * If @a limit is greater than zero only invoke @a receiver on the first
01556  * @a limit logs.
01557  *
01558  * If @a discover_changed_paths, then each call to @a receiver passes a
01559  * <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
01560  * the hash's keys are all the paths committed in that revision, the hash's
01561  * values are <tt>const svn_log_changed_path2_t *</tt> for each committed
01562  * path. Otherwise, each call to receiver passes NULL for @a changed_paths.
01563  *
01564  * If @a strict_node_history is set, copy history will not be traversed
01565  * (if any exists) when harvesting the revision logs for each path.
01566  *
01567  * If @a include_merged_revisions is set, log information for revisions
01568  * which have been merged to @a targets will also be returned.
01569  *
01570  * If @a revprops is NULL, retrieve all revision properties; else, retrieve
01571  * only the revision properties named by the (const char *) array elements
01572  * (i.e. retrieve none if the array is empty).
01573  *
01574  * If any invocation of @a receiver returns error, return that error
01575  * immediately and without wrapping it.
01576  *
01577  * If @a start or @a end is a non-existent revision, return the error
01578  * @c SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
01579  *
01580  * See also the documentation for @c svn_log_message_receiver_t.
01581  *
01582  * The caller may not invoke any RA operations using @a session from
01583  * within @a receiver.
01584  *
01585  * Use @a pool for memory allocation.
01586  *
01587  * @note If @a paths is NULL or empty, the result depends on the
01588  * server.  Pre-1.5 servers will send nothing; 1.5 servers will
01589  * effectively perform the log operation on the root of the
01590  * repository.  This behavior may be changed in the future to ensure
01591  * consistency across all pedigrees of server.
01592  *
01593  * @note Pre-1.5 servers do not support custom revprop retrieval; if @a
01594  * revprops is NULL or contains a revprop other than svn:author, svn:date,
01595  * or svn:log, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
01596  *
01597  * @since New in 1.5.
01598  */
01599 svn_error_t *
01600 svn_ra_get_log2(svn_ra_session_t *session,
01601                 const apr_array_header_t *paths,
01602                 svn_revnum_t start,
01603                 svn_revnum_t end,
01604                 int limit,
01605                 svn_boolean_t discover_changed_paths,
01606                 svn_boolean_t strict_node_history,
01607                 svn_boolean_t include_merged_revisions,
01608                 const apr_array_header_t *revprops,
01609                 svn_log_entry_receiver_t receiver,
01610                 void *receiver_baton,
01611                 apr_pool_t *pool);
01612 
01613 /**
01614  * Similar to svn_ra_get_log2(), but uses @c svn_log_message_receiver_t
01615  * instead of @c svn_log_entry_receiver_t.  Also, @a
01616  * include_merged_revisions is set to @c FALSE and @a revprops is
01617  * svn:author, svn:date, and svn:log.
01618  *
01619  * @since New in 1.2.
01620  * @deprecated Provided for backward compatibility with the 1.4 API.
01621  */
01622 SVN_DEPRECATED
01623 svn_error_t *
01624 svn_ra_get_log(svn_ra_session_t *session,
01625                const apr_array_header_t *paths,
01626                svn_revnum_t start,
01627                svn_revnum_t end,
01628                int limit,
01629                svn_boolean_t discover_changed_paths,
01630                svn_boolean_t strict_node_history,
01631                svn_log_message_receiver_t receiver,
01632                void *receiver_baton,
01633                apr_pool_t *pool);
01634 
01635 /**
01636  * Set @a *kind to the node kind associated with @a path at @a revision.
01637  * If @a path does not exist under @a revision, set @a *kind to
01638  * @c svn_node_none.  @a path is relative to the @a session's parent URL.
01639  *
01640  * Use @a pool for memory allocation.
01641  *
01642  * @since New in 1.2.
01643  */
01644 svn_error_t *
01645 svn_ra_check_path(svn_ra_session_t *session,
01646                   const char *path,
01647                   svn_revnum_t revision,
01648                   svn_node_kind_t *kind,
01649                   apr_pool_t *pool);
01650 
01651 /**
01652  * Set @a *dirent to an @c svn_dirent_t associated with @a path at @a
01653  * revision.  @a path is relative to the @a session's parent's URL.
01654  * If @a path does not exist in @a revision, set @a *dirent to NULL.
01655  *
01656  * Use @a pool for memory allocation.
01657  *
01658  * @since New in 1.2.
01659  */
01660 svn_error_t *
01661 svn_ra_stat(svn_ra_session_t *session,
01662             const char *path,
01663             svn_revnum_t revision,
01664             svn_dirent_t **dirent,
01665             apr_pool_t *pool);
01666 
01667 
01668 /**
01669  * Set @a *uuid to the repository's UUID, allocated in @a pool.
01670  *
01671  * @since New in 1.5.
01672  */
01673 svn_error_t *
01674 svn_ra_get_uuid2(svn_ra_session_t *session,
01675                  const char **uuid,
01676                  apr_pool_t *pool);
01677 
01678 /**
01679  * Similar to svn_ra_get_uuid2(), but returns the value allocated in
01680  * @a session's pool.
01681  *
01682  * @deprecated Provided for backward compatibility with the 1.4 API.
01683  * @since New in 1.2.
01684  */
01685 SVN_DEPRECATED
01686 svn_error_t *
01687 svn_ra_get_uuid(svn_ra_session_t *session,
01688                 const char **uuid,
01689                 apr_pool_t *pool);
01690 
01691 /**
01692  * Set @a *url to the repository's root URL, allocated in @a pool.
01693  * The value will not include a trailing '/'.  The returned URL is
01694  * guaranteed to be a prefix of the @a session's URL.
01695  *
01696  * @since New in 1.5.
01697  */
01698 svn_error_t *
01699 svn_ra_get_repos_root2(svn_ra_session_t *session,
01700                        const char **url,
01701                        apr_pool_t *pool);
01702 
01703 
01704 /**
01705  * Similar to svn_ra_get_repos_root2(), but returns the value
01706  * allocated in @a session's pool.
01707  *
01708  * @deprecated Provided for backward compatibility with the 1.4 API.
01709  * @since New in 1.2.
01710  */
01711 SVN_DEPRECATED
01712 svn_error_t *
01713 svn_ra_get_repos_root(svn_ra_session_t *session,
01714                       const char **url,
01715                       apr_pool_t *pool);
01716 
01717 /**
01718  * Set @a *locations to the locations (at the repository revisions
01719  * @a location_revisions) of the file identified by @a path in
01720  * @a peg_revision.  @a path is relative to the URL to which
01721  * @a session was opened.  @a location_revisions is an array of
01722  * @c svn_revnum_t's.  @a *locations will be a mapping from the revisions to
01723  * their appropriate absolute paths.  If the file doesn't exist in a
01724  * location_revision, that revision will be ignored.
01725  *
01726  * Use @a pool for all allocations.
01727  *
01728  * @since New in 1.2.
01729  */
01730 svn_error_t *
01731 svn_ra_get_locations(svn_ra_session_t *session,
01732                      apr_hash_t **locations,
01733                      const char *path,
01734                      svn_revnum_t peg_revision,
01735                      const apr_array_header_t *location_revisions,
01736                      apr_pool_t *pool);
01737 
01738 
01739 /**
01740  * Call @a receiver (with @a receiver_baton) for each segment in the
01741  * location history of @a path in @a peg_revision, working backwards in
01742  * time from @a start_rev to @a end_rev.
01743  *
01744  * @a end_rev may be @c SVN_INVALID_REVNUM to indicate that you want
01745  * to trace the history of the object to its origin.
01746  *
01747  * @a start_rev may be @c SVN_INVALID_REVNUM to indicate "the HEAD
01748  * revision".  Otherwise, @a start_rev must be younger than @a end_rev
01749  * (unless @a end_rev is @c SVN_INVALID_REVNUM).
01750  *
01751  * @a peg_revision may be @c SVN_INVALID_REVNUM to indicate "the HEAD
01752  * revision", and must evaluate to be at least as young as @a start_rev.
01753  *
01754  * Use @a pool for all allocations.
01755  *
01756  * @since New in 1.5.
01757  */
01758 svn_error_t *
01759 svn_ra_get_location_segments(svn_ra_session_t *session,
01760                              const char *path,
01761                              svn_revnum_t peg_revision,
01762                              svn_revnum_t start_rev,
01763                              svn_revnum_t end_rev,
01764                              svn_location_segment_receiver_t receiver,
01765                              void *receiver_baton,
01766                              apr_pool_t *pool);
01767 
01768 /**
01769  * Retrieve a subset of the interesting revisions of a file @a path
01770  * as seen in revision @a end (see svn_fs_history_prev() for a
01771  * definition of "interesting revisions").  Invoke @a handler with
01772  * @a handler_baton as its first argument for each such revision.
01773  * @a session is an open RA session.  Use @a pool for all allocations.
01774  *
01775  * If there is an interesting revision of the file that is less than or
01776  * equal to @a start, the iteration will begin at that revision.
01777  * Else, the iteration will begin at the first revision of the file in
01778  * the repository, which has to be less than or equal to @a end.  Note
01779  * that if the function succeeds, @a handler will have been called at
01780  * least once.
01781  *
01782  * In a series of calls to @a handler, the file contents for the first
01783  * interesting revision will be provided as a text delta against the
01784  * empty file.  In the following calls, the delta will be against the
01785  * fulltext contents for the previous call.
01786  *
01787  * If @a include_merged_revisions is TRUE, revisions which are
01788  * included as a result of a merge between @a start and @a end will be
01789  * included.
01790  *
01791  * @note This functionality is not available in pre-1.1 servers.  If the
01792  * server doesn't implement it, an alternative (but much slower)
01793  * implementation based on svn_ra_get_log2() is used.
01794  *
01795  * On subversion 1.8 and newer servers this function has been enabled
01796  * to support reversion of the revision range for @a include_merged_revision
01797  * @c FALSE reporting by switching  @a end with @a start.
01798  *
01799  * @note Prior to Subversion 1.9, this function may request delta handlers
01800  * from @a handler even for empty text deltas.  Starting with 1.9, the
01801  * delta handler / baton return arguments passed to @a handler will be
01802  * #NULL unless there is an actual difference in the file contents between
01803  * the current and the previous call.
01804  *
01805  * @since New in 1.5.
01806  */
01807 svn_error_t *
01808 svn_ra_get_file_revs2(svn_ra_session_t *session,
01809                       const char *path,
01810                       svn_revnum_t start,
01811                       svn_revnum_t end,
01812                       svn_boolean_t include_merged_revisions,
01813                       svn_file_rev_handler_t handler,
01814                       void *handler_baton,
01815                       apr_pool_t *pool);
01816 
01817 /**
01818  * Similar to svn_ra_get_file_revs2(), but with @a include_merged_revisions
01819  * set to FALSE.
01820  *
01821  * @since New in 1.2.
01822  * @deprecated Provided for backward compatibility with the 1.4 API.
01823  */
01824 SVN_DEPRECATED
01825 svn_error_t *
01826 svn_ra_get_file_revs(svn_ra_session_t *session,
01827                      const char *path,
01828                      svn_revnum_t start,
01829                      svn_revnum_t end,
01830                      svn_ra_file_rev_handler_t handler,
01831                      void *handler_baton,
01832                      apr_pool_t *pool);
01833 
01834 /**
01835  * Lock each path in @a path_revs, which is a hash whose keys are the
01836  * paths to be locked, and whose values are the corresponding base
01837  * revisions for each path.  The keys are (const char *) and the
01838  * revisions are (svn_revnum_t *).
01839  *
01840  * Note that locking is never anonymous, so any server implementing
01841  * this function will have to "pull" a username from the client, if
01842  * it hasn't done so already.
01843  *
01844  * @a comment is optional: it's either an xml-escapable string
01845  * which describes the lock, or it is NULL.
01846  *
01847  * If any path is already locked by a different user, then call @a
01848  * lock_func/@a lock_baton with an error.  If @a steal_lock is TRUE,
01849  * then "steal" the existing lock(s) anyway, even if the RA username
01850  * does not match the current lock's owner.  Delete any lock on the
01851  * path, and unconditionally create a new lock.
01852  *
01853  * For each path, if its base revision (in @a path_revs) is a valid
01854  * revnum, then do an out-of-dateness check.  If the revnum is less
01855  * than the last-changed-revision of any path (or if a path doesn't
01856  * exist in HEAD), call @a lock_func/@a lock_baton with an
01857  * SVN_ERR_RA_OUT_OF_DATE error.
01858  *
01859  * After successfully locking a file, @a lock_func is called with the
01860  * @a lock_baton.
01861  *
01862  * Use @a pool for temporary allocations.
01863  *
01864  * @since New in 1.2.
01865  */
01866 svn_error_t *
01867 svn_ra_lock(svn_ra_session_t *session,
01868             apr_hash_t *path_revs,
01869             const char *comment,
01870             svn_boolean_t steal_lock,
01871             svn_ra_lock_callback_t lock_func,
01872             void *lock_baton,
01873             apr_pool_t *pool);
01874 
01875 /**
01876  * Remove the repository lock for each path in @a path_tokens.
01877  * @a path_tokens is a hash whose keys are the paths to be locked, and
01878  * whose values are the corresponding lock tokens for each path.  If
01879  * the path has no corresponding lock token, or if @a break_lock is TRUE,
01880  * then the corresponding value shall be "".
01881  *
01882  * Note that unlocking is never anonymous, so any server
01883  * implementing this function will have to "pull" a username from
01884  * the client, if it hasn't done so already.
01885  *
01886  * If @a token points to a lock, but the RA username doesn't match the
01887  * lock's owner, call @a lock_func/@a lock_baton with an error.  If @a
01888  * break_lock is TRUE, however, instead allow the lock to be "broken"
01889  * by the RA user.
01890  *
01891  * After successfully unlocking a path, @a lock_func is called with
01892  * the @a lock_baton.
01893  *
01894  * Use @a pool for temporary allocations.
01895  *
01896  * @since New in 1.2.
01897  */
01898 svn_error_t *
01899 svn_ra_unlock(svn_ra_session_t *session,
01900               apr_hash_t *path_tokens,
01901               svn_boolean_t break_lock,
01902               svn_ra_lock_callback_t lock_func,
01903               void *lock_baton,
01904               apr_pool_t *pool);
01905 
01906 /**
01907  * If @a path is locked, set @a *lock to an svn_lock_t which
01908  * represents the lock, allocated in @a pool.
01909  *
01910  * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
01911  *
01912  * @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
01913  * when @a path didn't exist in HEAD on specific ra layers.
01914  *
01915  * @since New in 1.2.
01916  */
01917 svn_error_t *
01918 svn_ra_get_lock(svn_ra_session_t *session,
01919                 svn_lock_t **lock,
01920                 const char *path,
01921                 apr_pool_t *pool);
01922 
01923 /**
01924  * Set @a *locks to a hashtable which represents all locks on or
01925  * below @a path.
01926  *
01927  * @a depth limits the returned locks to those associated with paths
01928  * within the specified depth of @a path, and must be one of the
01929  * following values:  #svn_depth_empty, #svn_depth_files,
01930  * #svn_depth_immediates, or #svn_depth_infinity.
01931  *
01932  * The hashtable maps (const char *) absolute fs paths to (const
01933  * svn_lock_t *) structures.  The hashtable -- and all keys and
01934  * values -- are allocated in @a pool.
01935  *
01936  * @note It is not considered an error for @a path to not exist in HEAD.
01937  * Such a search will simply return no locks.
01938  *
01939  * @note This functionality is not available in pre-1.2 servers.  If the
01940  * server doesn't implement it, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is
01941  * returned.
01942  *
01943  * @since New in 1.7.
01944  */
01945 svn_error_t *
01946 svn_ra_get_locks2(svn_ra_session_t *session,
01947                   apr_hash_t **locks,
01948                   const char *path,
01949                   svn_depth_t depth,
01950                   apr_pool_t *pool);
01951 
01952 /**
01953  * Similar to svn_ra_get_locks2(), but with @a depth always passed as
01954  * #svn_depth_infinity.
01955  *
01956  * @since New in 1.2.
01957  * @deprecated Provided for backward compatibility with the 1.6 API.
01958  */
01959 SVN_DEPRECATED
01960 svn_error_t *
01961 svn_ra_get_locks(svn_ra_session_t *session,
01962                  apr_hash_t **locks,
01963                  const char *path,
01964                  apr_pool_t *pool);
01965 
01966 
01967 /**
01968  * Replay the changes from a range of revisions between @a start_revision
01969  * and @a end_revision.
01970  *
01971  * When receiving information for one revision, a callback @a revstart_func is
01972  * called; this callback will provide an editor and baton through which the
01973  * revision will be replayed.
01974  * When replaying the revision is finished, callback @a revfinish_func will be
01975  * called so the editor can be closed.
01976  *
01977  * Changes will be limited to those that occur under @a session's URL, and
01978  * the server will assume that the client has no knowledge of revisions
01979  * prior to @a low_water_mark.  These two limiting factors define the portion
01980  * of the tree that the server will assume the client already has knowledge of,
01981  * and thus any copies of data from outside that part of the tree will be
01982  * sent in their entirety, not as simple copies or deltas against a previous
01983  * version.
01984  *
01985  * If @a send_deltas is @c TRUE, the actual text and property changes in
01986  * the revision will be sent, otherwise dummy text deltas and NULL property
01987  * changes will be sent instead.
01988  *
01989  * @a pool is used for all allocation.
01990  *
01991  * @since New in 1.5.
01992  */
01993 svn_error_t *
01994 svn_ra_replay_range(svn_ra_session_t *session,
01995                     svn_revnum_t start_revision,
01996                     svn_revnum_t end_revision,
01997                     svn_revnum_t low_water_mark,
01998                     svn_boolean_t send_deltas,
01999                     svn_ra_replay_revstart_callback_t revstart_func,
02000                     svn_ra_replay_revfinish_callback_t revfinish_func,
02001                     void *replay_baton,
02002                     apr_pool_t *pool);
02003 
02004 /**
02005  * Replay the changes from @a revision through @a editor and @a edit_baton.
02006  *
02007  * Changes will be limited to those that occur under @a session's URL, and
02008  * the server will assume that the client has no knowledge of revisions
02009  * prior to @a low_water_mark.  These two limiting factors define the portion
02010  * of the tree that the server will assume the client already has knowledge of,
02011  * and thus any copies of data from outside that part of the tree will be
02012  * sent in their entirety, not as simple copies or deltas against a previous
02013  * version.
02014  *
02015  * If @a send_deltas is @c TRUE, the actual text and property changes in
02016  * the revision will be sent, otherwise dummy text deltas and null property
02017  * changes will be sent instead.
02018  *
02019  * @a pool is used for all allocation.
02020  *
02021  * @since New in 1.4.
02022  */
02023 svn_error_t *
02024 svn_ra_replay(svn_ra_session_t *session,
02025               svn_revnum_t revision,
02026               svn_revnum_t low_water_mark,
02027               svn_boolean_t send_deltas,
02028               const svn_delta_editor_t *editor,
02029               void *edit_baton,
02030               apr_pool_t *pool);
02031 
02032 /**
02033  * Given @a path at revision @a peg_revision, set @a *revision_deleted to the
02034  * revision @a path was first deleted, within the inclusive revision range
02035  * defined by @a peg_revision and @a end_revision.  @a path is relative
02036  * to the URL in @a session.
02037  *
02038  * If @a path does not exist at @a peg_revision or was not deleted within
02039  * the specified range, then set @a *revision_deleted to @c SVN_INVALID_REVNUM.
02040  * If @a peg_revision or @a end_revision are invalid or if @a peg_revision is
02041  * greater than @a end_revision, then return @c SVN_ERR_CLIENT_BAD_REVISION.
02042  *
02043  * Use @a pool for all allocations.
02044  *
02045  * @since New in 1.6.
02046  */
02047 svn_error_t *
02048 svn_ra_get_deleted_rev(svn_ra_session_t *session,
02049                        const char *path,
02050                        svn_revnum_t peg_revision,
02051                        svn_revnum_t end_revision,
02052                        svn_revnum_t *revision_deleted,
02053                        apr_pool_t *pool);
02054 
02055 /**
02056  * Set @a *inherited_props to a depth-first ordered array of
02057  * #svn_prop_inherited_item_t * structures representing the properties
02058  * inherited by @a path at @a revision (or the 'head' revision if
02059  * @a revision is @c SVN_INVALID_REVNUM).  Interpret @a path relative to
02060  * the URL in @a session.  Use @a pool for all allocations.  If no
02061  * inheritable properties are found, then set @a *inherited_props to
02062  * an empty array.
02063  *
02064  * The #svn_prop_inherited_item_t->path_or_url members of the
02065  * #svn_prop_inherited_item_t * structures in @a *inherited_props are
02066  * paths relative to the repository root URL (of the repository which
02067  * @a ra_session is associated).
02068  *
02069  * Allocate @a *inherited_props in @a result_pool.  Use @a scratch_pool
02070  * for temporary allocations.
02071  *
02072  * @since New in 1.8.
02073  */
02074 svn_error_t *
02075 svn_ra_get_inherited_props(svn_ra_session_t *session,
02076                            apr_array_header_t **inherited_props,
02077                            const char *path,
02078                            svn_revnum_t revision,
02079                            apr_pool_t *result_pool,
02080                            apr_pool_t *scratch_pool);
02081 
02082 /**
02083  * @defgroup Capabilities Dynamically query the server's capabilities.
02084  *
02085  * @{
02086  */
02087 
02088 /**
02089  * Set @a *has to TRUE if the server represented by @a session has
02090  * @a capability (one of the capabilities beginning with
02091  * @c "SVN_RA_CAPABILITY_"), else set @a *has to FALSE.
02092  *
02093  * If @a capability isn't recognized, throw @c SVN_ERR_UNKNOWN_CAPABILITY,
02094  * with the effect on @a *has undefined.
02095  *
02096  * Use @a pool for all allocation.
02097  *
02098  * @since New in 1.5.
02099  */
02100 svn_error_t *
02101 svn_ra_has_capability(svn_ra_session_t *session,
02102                       svn_boolean_t *has,
02103                       const char *capability,
02104                       apr_pool_t *pool);
02105 
02106 /**
02107  * The capability of understanding @c svn_depth_t (e.g., the server
02108  * understands what the client means when the client describes the
02109  * depth of a working copy to the server.)
02110  *
02111  * @since New in 1.5.
02112  */
02113 #define SVN_RA_CAPABILITY_DEPTH "depth"
02114 
02115 /**
02116  * The capability of doing the right thing with merge-tracking
02117  * information.  This capability should be reported bidirectionally,
02118  * because some repositories may want to reject clients that do not
02119  * self-report as knowing how to handle merge-tracking.
02120  *
02121  * @since New in 1.5.
02122  */
02123 #define SVN_RA_CAPABILITY_MERGEINFO "mergeinfo"
02124 
02125 /**
02126  * The capability of retrieving arbitrary revprops in svn_ra_get_log2.
02127  *
02128  * @since New in 1.5.
02129  */
02130 #define SVN_RA_CAPABILITY_LOG_REVPROPS "log-revprops"
02131 
02132 /**
02133  * The capability of replaying a directory in the repository (partial replay).
02134  *
02135  * @since New in 1.5.
02136  */
02137 #define SVN_RA_CAPABILITY_PARTIAL_REPLAY "partial-replay"
02138 
02139 /**
02140  * The capability of including revision properties in a commit.
02141  *
02142  * @since New in 1.5.
02143  */
02144 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
02145 
02146 /**
02147  * The capability of specifying (and atomically verifying) expected
02148  * preexisting values when modifying revprops.
02149  *
02150  * @since New in 1.7.
02151  */
02152 #define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
02153 
02154 /**
02155  * The capability to get inherited properties.
02156  *
02157  * @since New in 1.8.
02158  */
02159 #define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props"
02160 
02161 /**
02162  * The capability of a server to automatically remove transaction
02163  * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX.
02164  *
02165  * @since New in 1.8.
02166  */
02167 #define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
02168 
02169 /**
02170  * The capability of a server to walk revisions backwards in
02171  * svn_ra_get_file_revs2
02172  *
02173  * @since New in 1.8.
02174  */
02175 #define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE "get-file-revs-reversed"
02176 
02177 
02178 /*       *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
02179  *
02180  * RA layers generally fetch all capabilities when asked about any
02181  * capability, to save future round trips.  So if you add a new
02182  * capability here, make sure to update the RA layers to remember
02183  * it after any capabilities query.
02184  *
02185  * Also note that capability strings should not include colons,
02186  * because we pass a list of client capabilities to the start-commit
02187  * hook as a single, colon-separated string.
02188  */
02189 
02190 /** @} */
02191 
02192 
02193 /**
02194  * Append a textual list of all available RA modules to the stringbuf
02195  * @a output.
02196  *
02197  * @since New in 1.2.
02198  */
02199 svn_error_t *
02200 svn_ra_print_modules(svn_stringbuf_t *output,
02201                      apr_pool_t *pool);
02202 
02203 
02204 /**
02205  * Similar to svn_ra_print_modules().
02206  * @a ra_baton is ignored.
02207  *
02208  * @deprecated Provided for backward compatibility with the 1.1 API.
02209  */
02210 SVN_DEPRECATED
02211 svn_error_t *
02212 svn_ra_print_ra_libraries(svn_stringbuf_t **descriptions,
02213                           void *ra_baton,
02214                           apr_pool_t *pool);
02215 
02216 
02217 
02218 /**
02219  * Using this callback struct is similar to calling the newer public
02220  * interface that is based on @c svn_ra_session_t.
02221  *
02222  * @deprecated Provided for backward compatibility with the 1.1 API.
02223  */
02224 typedef struct svn_ra_plugin_t
02225 {
02226   /** The proper name of the RA library, (like "ra_serf" or "ra_local") */
02227   const char *name;
02228 
02229   /** Short doc string printed out by `svn --version` */
02230   const char *description;
02231 
02232   /* The vtable hooks */
02233 
02234   /** Call svn_ra_open() and set @a session_baton to an object representing
02235    * the new session.  All other arguments are passed to svn_ra_open().
02236    */
02237   svn_error_t *(*open)(void **session_baton,
02238                        const char *repos_URL,
02239                        const svn_ra_callbacks_t *callbacks,
02240                        void *callback_baton,
02241                        apr_hash_t *config,
02242                        apr_pool_t *pool);
02243 
02244   /** Call svn_ra_get_latest_revnum() with the session associated with
02245    * @a session_baton and all other arguments.
02246    */
02247   svn_error_t *(*get_latest_revnum)(void *session_baton,
02248                                     svn_revnum_t *latest_revnum,
02249                                     apr_pool_t *pool);
02250 
02251   /** Call svn_ra_get_dated_revision() with the session associated with
02252    * @a session_baton and all other arguments.
02253    */
02254   svn_error_t *(*get_dated_revision)(void *session_baton,
02255                                      svn_revnum_t *revision,
02256                                      apr_time_t tm,
02257                                      apr_pool_t *pool);
02258 
02259   /** Call svn_ra_change_rev_prop() with the session associated with
02260    * @a session_baton and all other arguments.
02261    */
02262   svn_error_t *(*change_rev_prop)(void *session_baton,
02263                                   svn_revnum_t rev,
02264                                   const char *name,
02265                                   const svn_string_t *value,
02266                                   apr_pool_t *pool);
02267 
02268   /** Call svn_ra_rev_proplist() with the session associated with
02269    * @a session_baton and all other arguments.
02270    */
02271   svn_error_t *(*rev_proplist)(void *session_baton,
02272                                svn_revnum_t rev,
02273                                apr_hash_t **props,
02274                                apr_pool_t *pool);
02275 
02276   /** Call svn_ra_rev_prop() with the session associated with
02277    * @a session_baton and all other arguments.
02278    */
02279   svn_error_t *(*rev_prop)(void *session_baton,
02280                            svn_revnum_t rev,
02281                            const char *name,
02282                            svn_string_t **value,
02283                            apr_pool_t *pool);
02284 
02285   /** Call svn_ra_get_commit_editor() with the session associated with
02286    * @a session_baton and all other arguments plus @a lock_tokens set to
02287    * @c NULL and @a keep_locks set to @c TRUE.
02288    */
02289   svn_error_t *(*get_commit_editor)(void *session_baton,
02290                                     const svn_delta_editor_t **editor,
02291                                     void **edit_baton,
02292                                     const char *log_msg,
02293                                     svn_commit_callback_t callback,
02294                                     void *callback_baton,
02295                                     apr_pool_t *pool);
02296 
02297   /** Call svn_ra_get_file() with the session associated with
02298    * @a session_baton and all other arguments.
02299    */
02300   svn_error_t *(*get_file)(void *session_baton,
02301                            const char *path,
02302                            svn_revnum_t revision,
02303                            svn_stream_t *stream,
02304                            svn_revnum_t *fetched_rev,
02305                            apr_hash_t **props,
02306                            apr_pool_t *pool);
02307 
02308   /** Call svn_ra_get_dir() with the session associated with
02309    * @a session_baton and all other arguments.
02310    */
02311   svn_error_t *(*get_dir)(void *session_baton,
02312                           const char *path,
02313                           svn_revnum_t revision,
02314                           apr_hash_t **dirents,
02315                           svn_revnum_t *fetched_rev,
02316                           apr_hash_t **props,
02317                           apr_pool_t *pool);
02318 
02319   /** Call svn_ra_do_update() with the session associated with
02320    * @a session_baton and all other arguments.
02321    */
02322   svn_error_t *(*do_update)(void *session_baton,
02323                             const svn_ra_reporter_t **reporter,
02324                             void **report_baton,
02325                             svn_revnum_t revision_to_update_to,
02326                             const char *update_target,
02327                             svn_boolean_t recurse,
02328                             const svn_delta_editor_t *update_editor,
02329                             void *update_baton,
02330                             apr_pool_t *pool);
02331 
02332   /** Call svn_ra_do_switch() with the session associated with
02333    * @a session_baton and all other arguments.
02334    */
02335   svn_error_t *(*do_switch)(void *session_baton,
02336                             const svn_ra_reporter_t **reporter,
02337                             void **report_baton,
02338                             svn_revnum_t revision_to_switch_to,
02339                             const char *switch_target,
02340                             svn_boolean_t recurse,
02341                             const char *switch_url,
02342                             const svn_delta_editor_t *switch_editor,
02343                             void *switch_baton,
02344                             apr_pool_t *pool);
02345 
02346   /** Call svn_ra_do_status() with the session associated with
02347    * @a session_baton and all other arguments.
02348    */
02349   svn_error_t *(*do_status)(void *session_baton,
02350                             const svn_ra_reporter_t **reporter,
02351                             void **report_baton,
02352                             const char *status_target,
02353                             svn_revnum_t revision,
02354                             svn_boolean_t recurse,
02355                             const svn_delta_editor_t *status_editor,
02356                             void *status_baton,
02357                             apr_pool_t *pool);
02358 
02359   /** Call svn_ra_do_diff() with the session associated with
02360    * @a session_baton and all other arguments.
02361    */
02362   svn_error_t *(*do_diff)(void *session_baton,
02363                           const svn_ra_reporter_t **reporter,
02364                           void **report_baton,
02365                           svn_revnum_t revision,
02366                           const char *diff_target,
02367                           svn_boolean_t recurse,
02368                           svn_boolean_t ignore_ancestry,
02369                           const char *versus_url,
02370                           const svn_delta_editor_t *diff_editor,
02371                           void *diff_baton,
02372                           apr_pool_t *pool);
02373 
02374   /** Call svn_ra_get_log() with the session associated with
02375    * @a session_baton and all other arguments.  @a limit is set to 0.
02376    */
02377   svn_error_t *(*get_log)(void *session_baton,
02378                           const apr_array_header_t *paths,
02379                           svn_revnum_t start,
02380                           svn_revnum_t end,
02381                           svn_boolean_t discover_changed_paths,
02382                           svn_boolean_t strict_node_history,
02383                           svn_log_message_receiver_t receiver,
02384                           void *receiver_baton,
02385                           apr_pool_t *pool);
02386 
02387   /** Call svn_ra_check_path() with the session associated with
02388    * @a session_baton and all other arguments.
02389    */
02390   svn_error_t *(*check_path)(void *session_baton,
02391                              const char *path,
02392                              svn_revnum_t revision,
02393                              svn_node_kind_t *kind,
02394                              apr_pool_t *pool);
02395 
02396   /** Call svn_ra_get_uuid() with the session associated with
02397    * @a session_baton and all other arguments.
02398    */
02399   svn_error_t *(*get_uuid)(void *session_baton,
02400                            const char **uuid,
02401                            apr_pool_t *pool);
02402 
02403   /** Call svn_ra_get_repos_root() with the session associated with
02404    * @a session_baton and all other arguments.
02405    */
02406   svn_error_t *(*get_repos_root)(void *session_baton,
02407                                  const char **url,
02408                                  apr_pool_t *pool);
02409 
02410   /**
02411    * Call svn_ra_get_locations() with the session associated with
02412    * @a session_baton and all other arguments.
02413    *
02414    * @since New in 1.1.
02415    */
02416   svn_error_t *(*get_locations)(void *session_baton,
02417                                 apr_hash_t **locations,
02418                                 const char *path,
02419                                 svn_revnum_t peg_revision,
02420                                 apr_array_header_t *location_revisions,
02421                                 apr_pool_t *pool);
02422 
02423   /**
02424    * Call svn_ra_get_file_revs() with the session associated with
02425    * @a session_baton and all other arguments.
02426    *
02427    * @since New in 1.1.
02428    */
02429   svn_error_t *(*get_file_revs)(void *session_baton,
02430                                 const char *path,
02431                                 svn_revnum_t start,
02432                                 svn_revnum_t end,
02433                                 svn_ra_file_rev_handler_t handler,
02434                                 void *handler_baton,
02435                                 apr_pool_t *pool);
02436 
02437   /**
02438    * Return the plugin's version information.
02439    *
02440    * @since New in 1.1.
02441    */
02442   const svn_version_t *(*get_version)(void);
02443 
02444 
02445 } svn_ra_plugin_t;
02446 
02447 /**
02448  * All "ra_FOO" implementations *must* export a function named
02449  * svn_ra_FOO_init() of type @c svn_ra_init_func_t.
02450  *
02451  * When called by libsvn_client, this routine adds an entry (or
02452  * entries) to the hash table for any URL schemes it handles.  The hash
02453  * value must be of type (<tt>@c svn_ra_plugin_t *</tt>).  @a pool is a
02454  * pool for allocating configuration / one-time data.
02455  *
02456  * This type is defined to use the "C Calling Conventions" to ensure that
02457  * abi_version is the first parameter. The RA plugin must check that value
02458  * before accessing the other parameters.
02459  *
02460  * ### need to force this to be __cdecl on Windows... how??
02461  *
02462  * @deprecated Provided for backward compatibility with the 1.1 API.
02463  */
02464 typedef svn_error_t *(*svn_ra_init_func_t)(int abi_version,
02465                                            apr_pool_t *pool,
02466                                            apr_hash_t *hash);
02467 
02468 /**
02469  * The current ABI (Application Binary Interface) version for the
02470  * RA plugin model. This version number will change when the ABI
02471  * between the SVN core (e.g. libsvn_client) and the RA plugin changes.
02472  *
02473  * An RA plugin should verify that the passed version number is acceptable
02474  * before accessing the rest of the parameters, and before returning any
02475  * information.
02476  *
02477  * It is entirely acceptable for an RA plugin to accept multiple ABI
02478  * versions. It can simply interpret the parameters based on the version,
02479  * and it can return different plugin structures.
02480  *
02481  *
02482  * <pre>
02483  * VSN  DATE        REASON FOR CHANGE
02484  * ---  ----------  ------------------------------------------------
02485  *   1  2001-02-17  Initial revision.
02486  *   2  2004-06-29  Preparing for svn 1.1, which adds new RA vtable funcs.
02487  *      2005-01-19  Rework the plugin interface and don't provide the vtable
02488  *                  to the client.  Separate ABI versions are no longer used.
02489  * </pre>
02490  *
02491  * @deprecated Provided for backward compatibility with the 1.0 API.
02492  */
02493 #define SVN_RA_ABI_VERSION      2
02494 
02495 /* Public RA implementations. */
02496 
02497 /** Initialize libsvn_ra_serf.
02498  *
02499  * @deprecated Provided for backward compatibility with the 1.1 API. */
02500 SVN_DEPRECATED
02501 svn_error_t *
02502 svn_ra_dav_init(int abi_version,
02503                 apr_pool_t *pool,
02504                 apr_hash_t *hash);
02505 
02506 /** Initialize libsvn_ra_local.
02507  *
02508  * @deprecated Provided for backward compatibility with the 1.1 API. */
02509 SVN_DEPRECATED
02510 svn_error_t *
02511 svn_ra_local_init(int abi_version,
02512                   apr_pool_t *pool,
02513                   apr_hash_t *hash);
02514 
02515 /** Initialize libsvn_ra_svn.
02516  *
02517  * @deprecated Provided for backward compatibility with the 1.1 API. */
02518 SVN_DEPRECATED
02519 svn_error_t *
02520 svn_ra_svn_init(int abi_version,
02521                 apr_pool_t *pool,
02522                 apr_hash_t *hash);
02523 
02524 /** Initialize libsvn_ra_serf.
02525  *
02526  * @since New in 1.4.
02527  * @deprecated Provided for backward compatibility with the 1.1 API. */
02528 SVN_DEPRECATED
02529 svn_error_t *
02530 svn_ra_serf_init(int abi_version,
02531                  apr_pool_t *pool,
02532                  apr_hash_t *hash);
02533 
02534 
02535 /**
02536  * Initialize the compatibility wrapper, using @a pool for any allocations.
02537  * The caller must hold on to @a ra_baton as long as the RA library is used.
02538  *
02539  * @deprecated Provided for backward compatibility with the 1.1 API.
02540  */
02541 SVN_DEPRECATED
02542 svn_error_t *
02543 svn_ra_init_ra_libs(void **ra_baton,
02544                     apr_pool_t *pool);
02545 
02546 /**
02547  * Return an RA vtable-@a library which can handle URL.  A number of
02548  * svn_client_* routines will call this internally, but client apps might
02549  * use it too.  $a ra_baton is a baton obtained by a call to
02550  * svn_ra_init_ra_libs().
02551  *
02552  * @deprecated Provided for backward compatibility with the 1.1 API.
02553  */
02554 SVN_DEPRECATED
02555 svn_error_t *
02556 svn_ra_get_ra_library(svn_ra_plugin_t **library,
02557                       void *ra_baton,
02558                       const char *url,
02559                       apr_pool_t *pool);
02560 
02561 #ifdef __cplusplus
02562 }
02563 #endif /* __cplusplus */
02564 
02565 #endif  /* SVN_RA_H */
02566 

Generated on Tue Apr 26 10:43:44 2016 for Subversion by  doxygen 1.4.7