Subversion 1.6.16

svn_ra.h

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