Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_ra.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Copyright (c) 2000-2008 CollabNet. All rights reserved.
5  *
6  * This software is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution. The terms
8  * are also available at http://subversion.tigris.org/license-1.html.
9  * If newer versions of this license are posted there, you may use a
10  * newer version instead, at your option.
11  *
12  * This software consists of voluntary contributions made by many
13  * individuals. For exact contribution history, see the revision
14  * history and logs, available at http://subversion.tigris.org/.
15  * ====================================================================
16  * @endcopyright
17  *
18  * @file svn_ra.h
19  * @brief Repository Access
20  */
21 
22 #ifndef SVN_RA_H
23 #define SVN_RA_H
24 
25 #include <apr.h>
26 #include <apr_pools.h>
27 #include <apr_hash.h>
28 #include <apr_tables.h>
29 #include <apr_time.h>
30 #include <apr_file_io.h> /* for apr_file_t */
31 
32 #include "svn_types.h"
33 #include "svn_string.h"
34 #include "svn_delta.h"
35 #include "svn_auth.h"
36 #include "svn_mergeinfo.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41 
42 
43 
44 /* Misc. declarations */
45 
46 /**
47  * Get libsvn_ra version information.
48  *
49  * @since New in 1.1.
50  */
51 const svn_version_t *
52 svn_ra_version(void);
53 
54 
55 /** This is a function type which allows the RA layer to fetch working
56  * copy (WC) properties.
57  *
58  * The @a baton is provided along with the function pointer and should
59  * be passed back in. This will be the @a callback_baton or the
60  * @a close_baton as appropriate.
61  *
62  * @a path is relative to the "root" of the session, defined by the
63  * @a repos_URL passed to svn_ra_open3() vtable call.
64  *
65  * @a name is the name of the property to fetch. If the property is present,
66  * then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
67  */
68 typedef svn_error_t *(*svn_ra_get_wc_prop_func_t)(void *baton,
69  const char *relpath,
70  const char *name,
71  const svn_string_t **value,
72  apr_pool_t *pool);
73 
74 /** This is a function type which allows the RA layer to store new
75  * working copy properties during update-like operations. See the
76  * comments for @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and
77  * @a name. The @a value is the value that will be stored for the property;
78  * a NULL @a value means the property will be deleted.
79  */
80 typedef svn_error_t *(*svn_ra_set_wc_prop_func_t)(void *baton,
81  const char *path,
82  const char *name,
83  const svn_string_t *value,
84  apr_pool_t *pool);
85 
86 /** This is a function type which allows the RA layer to store new
87  * working copy properties as part of a commit. See the comments for
88  * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
89  * The @a value is the value that will be stored for the property; a
90  * @c NULL @a value means the property will be deleted.
91  *
92  * Note that this might not actually store the new property before
93  * returning, but instead schedule it to be changed as part of
94  * post-commit processing (in which case a successful commit means the
95  * properties got written). Thus, during the commit, it is possible
96  * to invoke this function to set a new value for a wc prop, then read
97  * the wc prop back from the working copy and get the *old* value.
98  * Callers beware.
99  */
100 typedef svn_error_t *(*svn_ra_push_wc_prop_func_t)(void *baton,
101  const char *path,
102  const char *name,
103  const svn_string_t *value,
104  apr_pool_t *pool);
105 
106 /** This is a function type which allows the RA layer to invalidate
107  * (i.e., remove) wcprops recursively. See the documentation for
108  * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
109  *
110  * Unlike @c svn_ra_push_wc_prop_func_t, this has immediate effect. If
111  * it returns success, the wcprops have been removed.
112  */
113 typedef svn_error_t *(*svn_ra_invalidate_wc_props_func_t)(void *baton,
114  const char *path,
115  const char *name,
116  apr_pool_t *pool);
117 
118 
119 /** A function type for retrieving the youngest revision from a repos. */
120 typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)
121  (void *session_baton,
122  svn_revnum_t *latest_revnum);
123 
124 /** A function type which allows the RA layer to ask about any
125  * customizations to the client name string. This is primarily used
126  * by HTTP-based RA layers wishing to extend the string reported to
127  * Apache/mod_dav_svn via the User-agent HTTP header.
128  */
129 typedef svn_error_t *(*svn_ra_get_client_string_func_t)(void *baton,
130  const char **name,
131  apr_pool_t *pool);
132 
133 
134 /**
135  * A callback function type for use in @c get_file_revs.
136  * @a baton is provided by the caller, @a path is the pathname of the file
137  * in revision @a rev and @a rev_props are the revision properties.
138  * If @a delta_handler and @a delta_baton are non-NULL, they may be set to a
139  * handler/baton which will be called with the delta between the previous
140  * revision and this one after the return of this callback. They may be
141  * left as NULL/NULL.
142  * @a prop_diffs is an array of svn_prop_t elements indicating the property
143  * delta for this and the previous revision.
144  * @a pool may be used for temporary allocations, but you can't rely
145  * on objects allocated to live outside of this particular call and the
146  * immediately following calls to @a *delta_handler, if any.
147  *
148  * @since New in 1.1.
149  */
150 typedef svn_error_t *(*svn_ra_file_rev_handler_t)
151  (void *baton,
152  const char *path,
153  svn_revnum_t rev,
154  apr_hash_t *rev_props,
155  svn_txdelta_window_handler_t *delta_handler,
156  void **delta_baton,
157  apr_array_header_t *prop_diffs,
158  apr_pool_t *pool);
159 
160 /**
161  * Callback function type for locking and unlocking actions.
162  *
163  * @since New in 1.2.
164  *
165  * @a do_lock is TRUE when locking @a path, and FALSE
166  * otherwise.
167  *
168  * @a lock is a lock for @a path or NULL if @a do_lock is FALSE or @a ra_err is
169  * non-NULL.
170  *
171  * @a ra_err is NULL unless the ra layer encounters a locking related
172  * error which it passes back for notification purposes. The caller
173  * is responsible for clearing @a ra_err after the callback is run.
174  *
175  * @a baton is a closure object; it should be provided by the
176  * implementation, and passed by the caller. @a pool may be used for
177  * temporary allocation.
178  */
179 typedef svn_error_t *(*svn_ra_lock_callback_t)(void *baton,
180  const char *path,
181  svn_boolean_t do_lock,
182  const svn_lock_t *lock,
183  svn_error_t *ra_err,
184  apr_pool_t *pool);
185 
186 /**
187  * Callback function type for progress notification.
188  *
189  * @a progress is the number of bytes already transferred, @a total is
190  * the total number of bytes to transfer or -1 if it's not known, @a
191  * baton is the callback baton.
192  *
193  * @since New in 1.3.
194  */
195 typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
196  apr_off_t total,
197  void *baton,
198  apr_pool_t *pool);
199 
200 /**
201  * Callback function type for replay_range actions.
202  *
203  * This callback function should provide replay_range with an editor which
204  * will be driven with the received replay reports from the master repository.
205  *
206  * @a revision is the target revision number of the received replay report.
207  *
208  * @a editor and @a edit_baton should provided by the callback implementation.
209  *
210  * @a replay_baton is the baton as originally passed to replay_range.
211  *
212  * @a revprops contains key/value pairs for each revision properties for this
213  * revision.
214  *
215  * @since New in 1.5.
216  */
217 typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)
218  (svn_revnum_t revision,
219  void *replay_baton,
220  const svn_delta_editor_t **editor,
221  void **edit_baton,
222  apr_hash_t *rev_props,
223  apr_pool_t *pool);
224 
225 /**
226  * Callback function type for replay_range actions.
227  *
228  * This callback function should close the editor.
229  *
230  * @a revision is the target revision number of the received replay report.
231  *
232  * @a editor and @a edit_baton should provided by the callback implementation.
233  *
234  * @a replay_baton is the baton as originally passed to replay_range.
235  *
236  * @a revprops contains key/value pairs for each revision properties for this
237  * revision.
238  *
239  * @since New in 1.5.
240  */
241 typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)
242  (svn_revnum_t revision,
243  void *replay_baton,
244  const svn_delta_editor_t *editor,
245  void *edit_baton,
246  apr_hash_t *rev_props,
247  apr_pool_t *pool);
248 
249 
250 /**
251  * The update Reporter.
252  *
253  * A vtable structure which allows a working copy to describe a subset
254  * (or possibly all) of its working-copy to an RA layer, for the
255  * purposes of an update, switch, status, or diff operation.
256  *
257  * Paths for report calls are relative to the target (not the anchor)
258  * of the operation. Report calls must be made in depth-first order:
259  * parents before children, all children of a parent before any
260  * siblings of the parent. The first report call must be a set_path
261  * with a @a path argument of "" and a valid revision. (If the target
262  * of the operation is locally deleted or missing, use the anchor's
263  * revision.) If the target of the operation is deleted or switched
264  * relative to the anchor, follow up the initial set_path call with a
265  * link_path or delete_path call with a @a path argument of "" to
266  * indicate that. In no other case may there be two report
267  * descriptions for the same path. If the target of the operation is
268  * a locally added file or directory (which previously did not exist),
269  * it may be reported as having revision 0 or as having the parent
270  * directory's revision.
271  *
272  * @since New in 1.5.
273  */
274 typedef struct svn_ra_reporter3_t
275 {
276  /** Describe a working copy @a path as being at a particular
277  * @a revision and having depth @a depth.
278  *
279  * @a revision may be SVN_INVALID_REVNUM if (for example) @a path
280  * represents a locally-added path with no revision number, or @a
281  * depth is @c svn_depth_exclude.
282  *
283  * @a path may not be underneath a path on which set_path() was
284  * previously called with @c svn_depth_exclude in this report.
285  *
286  * If @a start_empty is set and @a path is a directory, the
287  * implementor should assume the directory has no entries or props.
288  *
289  * This will *override* any previous set_path() calls made on parent
290  * paths. @a path is relative to the URL specified in svn_ra_open3().
291  *
292  * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
293  *
294  * All temporary allocations are done in @a pool.
295  */
296  svn_error_t *(*set_path)(void *report_baton,
297  const char *path,
298  svn_revnum_t revision,
299  svn_depth_t depth,
300  svn_boolean_t start_empty,
301  const char *lock_token,
302  apr_pool_t *pool);
303 
304  /** Describing a working copy @a path as missing.
305  *
306  * @a path may not be underneath a path on which set_path() was
307  * previously called with @c svn_depth_exclude in this report.
308  *
309  * All temporary allocations are done in @a pool.
310  */
311  svn_error_t *(*delete_path)(void *report_baton,
312  const char *path,
313  apr_pool_t *pool);
314 
315  /** Like set_path(), but differs in that @a path in the working copy
316  * (relative to the root of the report driver) isn't a reflection of
317  * @a path in the repository (relative to the URL specified when
318  * opening the RA layer), but is instead a reflection of a different
319  * repository @a url at @a revision, and has depth @a depth.
320  *
321  * @a path may not be underneath a path on which set_path() was
322  * previously called with @c svn_depth_exclude in this report.
323  *
324  * If @a start_empty is set and @a path is a directory,
325  * the implementor should assume the directory has no entries or props.
326  *
327  * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
328  *
329  * All temporary allocations are done in @a pool.
330  */
331  svn_error_t *(*link_path)(void *report_baton,
332  const char *path,
333  const char *url,
334  svn_revnum_t revision,
335  svn_depth_t depth,
336  svn_boolean_t start_empty,
337  const char *lock_token,
338  apr_pool_t *pool);
339 
340  /** WC calls this when the state report is finished; any directories
341  * or files not explicitly `set' are assumed to be at the
342  * baseline revision originally passed into do_update(). No other
343  * reporting functions, including abort_report, should be called after
344  * calling this function.
345  */
346  svn_error_t *(*finish_report)(void *report_baton,
347  apr_pool_t *pool);
348 
349  /** If an error occurs during a report, this routine should cause the
350  * filesystem transaction to be aborted & cleaned up. No other reporting
351  * functions should be called after calling this function.
352  */
353  svn_error_t *(*abort_report)(void *report_baton,
354  apr_pool_t *pool);
355 
357 
358 /**
359  * Similar to @c svn_ra_reporter3_t, but without support for depths.
360  *
361  * @deprecated Provided for backward compatibility with the 1.4 API.
362  */
363 typedef struct svn_ra_reporter2_t
364 {
365  /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
366  * with @a depth always set to @c svn_depth_infinity. */
367  svn_error_t *(*set_path)(void *report_baton,
368  const char *path,
369  svn_revnum_t revision,
370  svn_boolean_t start_empty,
371  const char *lock_token,
372  apr_pool_t *pool);
373 
374  /** Same as the corresponding field in @c svn_ra_reporter3_t. */
375  svn_error_t *(*delete_path)(void *report_baton,
376  const char *path,
377  apr_pool_t *pool);
378 
379  /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
380  * with @a depth always set to @c svn_depth_infinity. */
381  svn_error_t *(*link_path)(void *report_baton,
382  const char *path,
383  const char *url,
384  svn_revnum_t revision,
385  svn_boolean_t start_empty,
386  const char *lock_token,
387  apr_pool_t *pool);
388 
389  /** Same as the corresponding field in @c svn_ra_reporter3_t. */
390  svn_error_t *(*finish_report)(void *report_baton,
391  apr_pool_t *pool);
392 
393  /** Same as the corresponding field in @c svn_ra_reporter3_t. */
394  svn_error_t *(*abort_report)(void *report_baton,
395  apr_pool_t *pool);
396 
398 
399 /**
400  * Similar to @c svn_ra_reporter2_t, but without support for lock tokens.
401  *
402  * @deprecated Provided for backward compatibility with the 1.1 API.
403  */
404 typedef struct svn_ra_reporter_t
405 {
406  /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
407  * with @a lock_token always set to NULL. */
408  svn_error_t *(*set_path)(void *report_baton,
409  const char *path,
410  svn_revnum_t revision,
411  svn_boolean_t start_empty,
412  apr_pool_t *pool);
413 
414  /** Same as the corresponding field in @c svn_ra_reporter2_t. */
415  svn_error_t *(*delete_path)(void *report_baton,
416  const char *path,
417  apr_pool_t *pool);
418 
419  /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
420  * with @a lock_token always set to NULL. */
421  svn_error_t *(*link_path)(void *report_baton,
422  const char *path,
423  const char *url,
424  svn_revnum_t revision,
425  svn_boolean_t start_empty,
426  apr_pool_t *pool);
427 
428  /** Same as the corresponding field in @c svn_ra_reporter2_t. */
429  svn_error_t *(*finish_report)(void *report_baton,
430  apr_pool_t *pool);
431 
432  /** Same as the corresponding field in @c svn_ra_reporter2_t. */
433  svn_error_t *(*abort_report)(void *report_baton,
434  apr_pool_t *pool);
436 
437 
438 /** A collection of callbacks implemented by libsvn_client which allows
439  * an RA layer to "pull" information from the client application, or
440  * possibly store information. libsvn_client passes this vtable to
441  * svn_ra_open3().
442  *
443  * Each routine takes a @a callback_baton originally provided with the
444  * vtable.
445  *
446  * Clients must use svn_ra_create_callbacks() to allocate and
447  * initialize this structure.
448  *
449  * @since New in 1.3.
450  */
451 typedef struct svn_ra_callbacks2_t
452 {
453  /** Open a unique temporary file for writing in the working copy.
454  * This file will be automatically deleted when @a fp is closed.
455  *
456  * @deprecated This callback should no longer be used by RA layers.
457  */
458  svn_error_t *(*open_tmp_file)(apr_file_t **fp,
459  void *callback_baton,
460  apr_pool_t *pool);
461 
462  /** An authentication baton, created by the application, which is
463  * capable of retrieving all known types of credentials.
464  */
466 
467  /*** The following items may be set to NULL to disallow the RA layer
468  to perform the respective operations of the vtable functions.
469  Perhaps WC props are not defined or are in invalid for this
470  session, or perhaps the commit operation this RA session will
471  perform is a server-side only one that shouldn't do post-commit
472  processing on a working copy path. ***/
473 
474  /** Fetch working copy properties.
475  *
476  *<pre> ### we might have a problem if the RA layer ever wants a property
477  * ### that corresponds to a different revision of the file than
478  * ### what is in the WC. we'll cross that bridge one day...</pre>
479  */
481 
482  /** Immediately set new values for working copy properties. */
484 
485  /** Schedule new values for working copy properties. */
487 
488  /** Invalidate working copy properties. */
490 
491  /** Notification callback used for progress information.
492  * May be NULL if not used.
493  */
495 
496  /** Notification callback baton, used with progress_func. */
498 
499  /** Cancelation function
500  *
501  * As its baton, the general callback baton is used
502  *
503  * @since New in 1.5
504  */
506 
507  /** Client string customization callback function
508  * @since New in 1.5
509  */
511 
513 
514 /** Similar to svn_ra_callbacks2_t, except that the progress
515  * notification function and baton is missing.
516  *
517  * @deprecated Provided for backward compatibility with the 1.2 API.
518  */
519 typedef struct svn_ra_callbacks_t
520 {
521  svn_error_t *(*open_tmp_file)(apr_file_t **fp,
522  void *callback_baton,
523  apr_pool_t *pool);
524 
525  svn_auth_baton_t *auth_baton;
526 
527  svn_ra_get_wc_prop_func_t get_wc_prop;
528 
529  svn_ra_set_wc_prop_func_t set_wc_prop;
530 
531  svn_ra_push_wc_prop_func_t push_wc_prop;
532 
533  svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
534 
536 
537 
538 
539 /*----------------------------------------------------------------------*/
540 
541 /* Public Interfaces. */
542 
543 /**
544  * Initialize the RA library. This function must be called before using
545  * any function in this header, except the deprecated APIs based on
546  * @c svn_ra_plugin_t, or svn_ra_version(). This function must not be called
547  * simultaneously in multiple threads. @a pool must live
548  * longer than any open RA sessions.
549  *
550  * @since New in 1.2.
551  */
552 svn_error_t *
553 svn_ra_initialize(apr_pool_t *pool);
554 
555 /** Initialize a callback structure.
556 * Set @a *callbacks to a ra callbacks object, allocated in @a pool.
557 *
558 * Clients must use this function to allocate and initialize @c
559 * svn_ra_callbacks2_t structures.
560 *
561 * @since New in 1.3.
562 */
563 svn_error_t *
565  apr_pool_t *pool);
566 
567 /**
568  * A repository access session. This object is used to perform requests
569  * to a repository, identified by an URL.
570  *
571  * @since New in 1.2.
572  */
574 
575 /**
576  * Open a repository session to @a repos_URL. Return an opaque object
577  * representing this session in @a *session_p, allocated in @a pool.
578  *
579  * Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
580  * to the UUID of the repository at @c repos_URL.
581  *
582  * @a callbacks/@a callback_baton is a table of callbacks provided by the
583  * client; see @c svn_ra_callbacks2_t.
584  *
585  * @a config is a hash mapping <tt>const char *</tt> keys to
586  * @c svn_config_t * values. For example, the @c svn_config_t for the
587  * "~/.subversion/config" file is under the key "config".
588  *
589  * All RA requests require a session; they will continue to
590  * use @a pool for memory allocation.
591  *
592  * @see svn_client_open_ra_session().
593  *
594  * @since New in 1.5.
595  */
596 svn_error_t *
597 svn_ra_open3(svn_ra_session_t **session_p,
598  const char *repos_URL,
599  const char *uuid,
600  const svn_ra_callbacks2_t *callbacks,
601  void *callback_baton,
602  apr_hash_t *config,
603  apr_pool_t *pool);
604 
605 /**
606  * Similiar to svn_ra_open3(), but with @a uuid set to @c NULL.
607  *
608  * @since New in 1.3.
609  * @deprecated Provided for backward compatibility with the 1.4 API.
610  */
612 svn_error_t *
613 svn_ra_open2(svn_ra_session_t **session_p,
614  const char *repos_URL,
615  const svn_ra_callbacks2_t *callbacks,
616  void *callback_baton,
617  apr_hash_t *config,
618  apr_pool_t *pool);
619 
620 /**
621  * @see svn_ra_open2().
622  * @since New in 1.2.
623  * @deprecated Provided for backward compatibility with the 1.2 API.
624  */
626 svn_error_t *
627 svn_ra_open(svn_ra_session_t **session_p,
628  const char *repos_URL,
629  const svn_ra_callbacks_t *callbacks,
630  void *callback_baton,
631  apr_hash_t *config,
632  apr_pool_t *pool);
633 
634 /** Change the root URL of an open @a ra_session to point to a new path in the
635  * same repository. @a url is the new root URL. Use @a pool for
636  * temporary allocations.
637  *
638  * If @a url has a different repository root than the current session
639  * URL, return @c SVN_ERR_RA_ILLEGAL_URL.
640  *
641  * @since New in 1.4.
642  */
643 svn_error_t *
645  const char *url,
646  apr_pool_t *pool);
647 
648 /** Set @a *url to the repository URL to which @a ra_session was
649  * opened or most recently reparented.
650  */
651 svn_error_t *
653  const char **url,
654  apr_pool_t *pool);
655 
656 
657 /**
658  * Get the latest revision number from the repository of @a session.
659  *
660  * Use @a pool for memory allocation.
661  *
662  * @since New in 1.2.
663  */
664 svn_error_t *
666  svn_revnum_t *latest_revnum,
667  apr_pool_t *pool);
668 
669 /**
670  * Get the latest revision number at time @a tm in the repository of
671  * @a session.
672  *
673  * Use @a pool for memory allocation.
674  *
675  * @since New in 1.2.
676  */
677 svn_error_t *
679  svn_revnum_t *revision,
680  apr_time_t tm,
681  apr_pool_t *pool);
682 
683 /**
684  * Set the property @a name to @a value on revision @a rev in the repository
685  * of @a session.
686  *
687  * If @a value is @c NULL, delete the named revision property.
688  *
689  * Please note that properties attached to revisions are @em unversioned.
690  *
691  * Use @a pool for memory allocation.
692  *
693  * @since New in 1.2.
694  */
695 svn_error_t *
697  svn_revnum_t rev,
698  const char *name,
699  const svn_string_t *value,
700  apr_pool_t *pool);
701 
702 /**
703  * Set @a *props to the list of unversioned properties attached to revision
704  * @a rev in the repository of @a session. The hash maps
705  * (<tt>const char *</tt>) names to (<tt>@c svn_string_t *</tt>) values.
706  *
707  * Use @a pool for memory allocation.
708  *
709  * @since New in 1.2.
710  */
711 svn_error_t *
713  svn_revnum_t rev,
714  apr_hash_t **props,
715  apr_pool_t *pool);
716 
717 /**
718  * Set @a *value to the value of unversioned property @a name attached to
719  * revision @a rev in the repository of @a session. If @a rev has no
720  * property by that name, set @a *value to @c NULL.
721  *
722  * Use @a pool for memory allocation.
723  *
724  * @since New in 1.2.
725  */
726 svn_error_t *
728  svn_revnum_t rev,
729  const char *name,
730  svn_string_t **value,
731  apr_pool_t *pool);
732 
733 /**
734  * Set @a *editor and @a *edit_baton to an editor for committing
735  * changes to the repository of @a session, setting the revision
736  * properties from @a revprop_table. The revisions being committed
737  * against are passed to the editor functions, starting with the rev
738  * argument to @c open_root. The path root of the commit is the @a
739  * session's URL.
740  *
741  * @a revprop_table is a hash mapping <tt>const char *</tt> property
742  * names to @c svn_string_t property values. The commit log message
743  * is expected to be in the @c SVN_PROP_REVISION_LOG element. @a
744  * revprop_table can not contain either of @c SVN_PROP_REVISION_DATE
745  * or @c SVN_PROP_REVISION_AUTHOR.
746  *
747  * Before @c close_edit returns, but after the commit has succeeded,
748  * it will invoke @a callback with the new revision number, the
749  * commit date (as a <tt>const char *</tt>), commit author (as a
750  * <tt>const char *</tt>), and @a callback_baton as arguments. If
751  * @a callback returns an error, that error will be returned from @c
752  * close_edit, otherwise @c close_edit will return successfully
753  * (unless it encountered an error before invoking @a callback).
754  *
755  * The callback will not be called if the commit was a no-op
756  * (i.e. nothing was committed);
757  *
758  * @a lock_tokens, if non-NULL, is a hash mapping <tt>const char
759  * *</tt> paths (relative to the URL of @a session) to <tt>
760  * const char *</tt> lock tokens. The server checks that the
761  * correct token is provided for each committed, locked path. @a lock_tokens
762  * must live during the whole commit operation.
763  *
764  * If @a keep_locks is @c TRUE, then do not release locks on
765  * committed objects. Else, automatically release such locks.
766  *
767  * The caller may not perform any RA operations using @a session before
768  * finishing the edit.
769  *
770  * Use @a pool for memory allocation.
771  *
772  * @since New in 1.5.
773  */
774 svn_error_t *
776  const svn_delta_editor_t **editor,
777  void **edit_baton,
778  apr_hash_t *revprop_table,
779  svn_commit_callback2_t callback,
780  void *callback_baton,
781  apr_hash_t *lock_tokens,
782  svn_boolean_t keep_locks,
783  apr_pool_t *pool);
784 
785 /**
786  * Same as svn_ra_get_commit_editor3(), but with @c revprop_table set
787  * to a hash containing the @c SVN_PROP_REVISION_LOG property set
788  * to the value of @a log_msg.
789  *
790  * @since New in 1.4.
791  *
792  * @deprecated Provided for backward compatibility with the 1.4 API.
793  */
795 svn_error_t *
797  const svn_delta_editor_t **editor,
798  void **edit_baton,
799  const char *log_msg,
800  svn_commit_callback2_t callback,
801  void *callback_baton,
802  apr_hash_t *lock_tokens,
803  svn_boolean_t keep_locks,
804  apr_pool_t *pool);
805 
806 /**
807  * Same as svn_ra_get_commit_editor2(), but uses @c svn_commit_callback_t.
808  *
809  * @since New in 1.2.
810  *
811  * @deprecated Provided for backward compatibility with the 1.3 API.
812  */
814 svn_error_t *
816  const svn_delta_editor_t **editor,
817  void **edit_baton,
818  const char *log_msg,
819  svn_commit_callback_t callback,
820  void *callback_baton,
821  apr_hash_t *lock_tokens,
822  svn_boolean_t keep_locks,
823  apr_pool_t *pool);
824 
825 /**
826  * Fetch the contents and properties of file @a path at @a revision.
827  * @a revision may be SVN_INVALID_REVNUM, indicating that the HEAD
828  * revision should be used. Interpret @a path relative to the URL in
829  * @a session. Use @a pool for all allocations.
830  *
831  * If @a revision is @c SVN_INVALID_REVNUM and @a fetched_rev is not
832  * @c NULL, then set @a *fetched_rev to the actual revision that was
833  * retrieved.
834  *
835  * If @a stream is non @c NULL, push the contents of the file at @a
836  * stream, do not call svn_stream_close() when finished.
837  *
838  * If @a props is non @c NULL, set @a *props to contain the properties of
839  * the file. This means @em all properties: not just ones controlled by
840  * the user and stored in the repository fs, but non-tweakable ones
841  * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
842  * etc.) The keys are <tt>const char *</tt>, values are
843  * <tt>@c svn_string_t *</tt>.
844  *
845  * The stream handlers for @a stream may not perform any RA
846  * operations using @a session.
847  *
848  * @since New in 1.2.
849  */
850 svn_error_t *
852  const char *path,
853  svn_revnum_t revision,
854  svn_stream_t *stream,
855  svn_revnum_t *fetched_rev,
856  apr_hash_t **props,
857  apr_pool_t *pool);
858 
859 /**
860  * If @a dirents is non @c NULL, set @a *dirents to contain all the entries
861  * of directory @a path at @a revision. The keys of @a dirents will be
862  * entry names (<tt>const char *</tt>), and the values dirents
863  * (<tt>@c svn_dirent_t *</tt>). Use @a pool for all allocations.
864  *
865  * @a dirent_fields controls which portions of the <tt>@c svn_dirent_t</tt>
866  * objects are filled in. To have them completely filled in just pass
867  * @c SVN_DIRENT_ALL, otherwise pass the bitwise OR of all the @c SVN_DIRENT_
868  * fields you would like to have returned to you.
869  *
870  * @a path is interpreted relative to the URL in @a session.
871  *
872  * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
873  * @a *fetched_rev is not @c NULL, then this function will set
874  * @a *fetched_rev to the actual revision that was retrieved. (Some
875  * callers want to know, and some don't.)
876  *
877  * If @a props is non @c NULL, set @a *props to contain the properties of
878  * the directory. This means @em all properties: not just ones controlled by
879  * the user and stored in the repository fs, but non-tweakable ones
880  * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
881  * etc.) The keys are <tt>const char *</tt>, values are
882  * <tt>@c svn_string_t *</tt>.
883  *
884  * @since New in 1.4.
885  */
886 svn_error_t *
888  apr_hash_t **dirents,
889  svn_revnum_t *fetched_rev,
890  apr_hash_t **props,
891  const char *path,
892  svn_revnum_t revision,
893  apr_uint32_t dirent_fields,
894  apr_pool_t *pool);
895 
896 /**
897  * Similar to @c svn_ra_get_dir2, but with @c SVN_DIRENT_ALL for the
898  * @a dirent_fields parameter.
899  *
900  * @since New in 1.2.
901  *
902  * @deprecated Provided for compatibility with the 1.3 API.
903  */
905 svn_error_t *
907  const char *path,
908  svn_revnum_t revision,
909  apr_hash_t **dirents,
910  svn_revnum_t *fetched_rev,
911  apr_hash_t **props,
912  apr_pool_t *pool);
913 
914 /**
915  * Set @a *catalog to a mergeinfo catalog for the paths in @a paths.
916  * If no mergeinfo is available, set @a *catalog to @c NULL. The
917  * requested mergeinfo hashes are for @a paths (which are relative to
918  * @a session's URL) in @a revision. If one of the paths does not exist
919  * in that revision, return SVN_ERR_FS_NOT_FOUND.
920  *
921  * @a inherit indicates whether explicit, explicit or inherited, or
922  * only inherited mergeinfo for @a paths is retrieved.
923  *
924  * If @a include_descendants is TRUE, then additionally return the
925  * mergeinfo for any descendant of any element of @a paths which has
926  * the @c SVN_PROP_MERGEINFO property explicitly set on it. (Note
927  * that inheritance is only taken into account for the elements in @a
928  * paths; descendants of the elements in @a paths which get their
929  * mergeinfo via inheritance are not included in @a *catalog.)
930  *
931  * Allocate the returned values in @a pool.
932  *
933  * If @a revision is @c SVN_INVALID_REVNUM, it defaults to youngest.
934  *
935  * If the server doesn't support retrieval of mergeinfo (which can
936  * happen even for file:// URLs, if the repository itself hasn't been
937  * upgraded), return @c SVN_ERR_UNSUPPORTED_FEATURE in preference to
938  * any other error that might otherwise be returned.
939  *
940  * @since New in 1.5.
941  */
942 svn_error_t *
944  svn_mergeinfo_catalog_t *catalog,
945  const apr_array_header_t *paths,
946  svn_revnum_t revision,
948  svn_boolean_t include_descendants,
949  apr_pool_t *pool);
950 
951 /**
952  * Ask the RA layer to update a working copy.
953  *
954  * The client initially provides an @a update_editor/@a update_baton to the
955  * RA layer; this editor contains knowledge of where the change will
956  * begin in the working copy (when @c open_root() is called).
957  *
958  * In return, the client receives a @a reporter/@a report_baton. The
959  * client then describes its working copy by making calls into the
960  * @a reporter.
961  *
962  * When finished, the client calls @a reporter->finish_report(). The
963  * RA layer then does a complete drive of @a update_editor, ending with
964  * @a update_editor->close_edit(), to update the working copy.
965  *
966  * @a update_target is an optional single path component to restrict
967  * the scope of the update to just that entry (in the directory
968  * represented by the @a session's URL). If @a update_target is the
969  * empty string, the entire directory is updated.
970  *
971  * Update the target only as deeply as @a depth indicates.
972  *
973  * If @a send_copyfrom_args is TRUE, then ask the server to send
974  * copyfrom arguments to add_file() and add_directory() when possible.
975  * (Note: this means that any subsequent txdeltas coming from the
976  * server are presumed to apply against the copied file!)
977  *
978  * The working copy will be updated to @a revision_to_update_to, or the
979  * "latest" revision if this arg is invalid.
980  *
981  * The caller may not perform any RA operations using @a session before
982  * finishing the report, and may not perform any RA operations using
983  * @a session from within the editing operations of @a update_editor.
984  *
985  * Use @a pool for memory allocation.
986  *
987  * @note The reporter provided by this function does NOT supply copy-
988  * from information to the diff editor callbacks.
989  *
990  * @note In order to prevent pre-1.5 servers from doing more work than
991  * needed, and sending too much data back, a pre-1.5 'recurse'
992  * directive may be sent to the server, based on @a depth.
993  *
994  * @since New in 1.5.
995  */
996 svn_error_t *
998  const svn_ra_reporter3_t **reporter,
999  void **report_baton,
1000  svn_revnum_t revision_to_update_to,
1001  const char *update_target,
1002  svn_depth_t depth,
1003  svn_boolean_t send_copyfrom_args,
1004  const svn_delta_editor_t *update_editor,
1005  void *update_baton,
1006  apr_pool_t *pool);
1007 
1008 /**
1009  * Similar to svn_ra_do_update2(), but taking @c svn_ra_reporter2_t
1010  * instead of @c svn_ra_reporter3_t; if @a recurse is true, pass @c
1011  * svn_depth_infinity for @a depth, else pass @c svn_depth_files; and
1012  * with @a send_copyfrom_args always false.
1013  *
1014  * @deprecated Provided for compatibility with the 1.4 API.
1015  */
1017 svn_error_t *
1019  const svn_ra_reporter2_t **reporter,
1020  void **report_baton,
1021  svn_revnum_t revision_to_update_to,
1022  const char *update_target,
1023  svn_boolean_t recurse,
1024  const svn_delta_editor_t *update_editor,
1025  void *update_baton,
1026  apr_pool_t *pool);
1027 
1028 
1029 /**
1030  * Ask the RA layer to 'switch' a working copy to a new
1031  * @a switch_url; it's another form of svn_ra_do_update().
1032  *
1033  * The client initially provides a @a switch_editor/@a switch_baton to the RA
1034  * layer; this editor contains knowledge of where the change will
1035  * begin in the working copy (when open_root() is called).
1036  *
1037  * In return, the client receives a @a reporter/@a report_baton. The
1038  * client then describes its working copy by making calls into the
1039  * @a reporter.
1040  *
1041  * When finished, the client calls @a reporter->finish_report(). The
1042  * RA layer then does a complete drive of @a switch_editor, ending with
1043  * close_edit(), to switch the working copy.
1044  *
1045  * @a switch_target is an optional single path component will restrict
1046  * the scope of things affected by the switch to an entry in the
1047  * directory represented by the @a session's URL, or empty if the
1048  * entire directory is meant to be switched.
1049  *
1050  * Switch the target only as deeply as @a depth indicates.
1051  *
1052  * The working copy will be switched to @a revision_to_switch_to, or the
1053  * "latest" revision if this arg is invalid.
1054  *
1055  * The caller may not perform any RA operations using
1056  * @a session before finishing the report, and may not perform
1057  * any RA operations using @a session from within the editing
1058  * operations of @a switch_editor.
1059  *
1060  * Use @a pool for memory allocation.
1061  *
1062  * @note The reporter provided by this function does NOT supply copy-
1063  * from information to the diff editor callbacks.
1064  *
1065  * @note In order to prevent pre-1.5 servers from doing more work than
1066  * needed, and sending too much data back, a pre-1.5 'recurse'
1067  * directive may be sent to the server, based on @a depth.
1068  *
1069  * @since New in 1.5.
1070  */
1071 svn_error_t *
1073  const svn_ra_reporter3_t **reporter,
1074  void **report_baton,
1075  svn_revnum_t revision_to_switch_to,
1076  const char *switch_target,
1077  svn_depth_t depth,
1078  const char *switch_url,
1079  const svn_delta_editor_t *switch_editor,
1080  void *switch_baton,
1081  apr_pool_t *pool);
1082 
1083 /**
1084  * Similar to svn_ra_do_switch2(), but taking @c svn_ra_reporter2_t
1085  * instead of @c svn_ra_reporter3_t, and therefore only able to report
1086  * @c svn_depth_infinity for depths. The switch itself is performed
1087  * according to @a recurse: if TRUE, then use @c svn_depth_infinity
1088  * for @a depth, else use @c svn_depth_files.
1089  *
1090  * @deprecated Provided for compatibility with the 1.4 API.
1091  */
1093 svn_error_t *
1095  const svn_ra_reporter2_t **reporter,
1096  void **report_baton,
1097  svn_revnum_t revision_to_switch_to,
1098  const char *switch_target,
1099  svn_boolean_t recurse,
1100  const char *switch_url,
1101  const svn_delta_editor_t *switch_editor,
1102  void *switch_baton,
1103  apr_pool_t *pool);
1104 
1105 /**
1106  * Ask the RA layer to describe the status of a working copy with respect
1107  * to @a revision of the repository (or HEAD, if @a revision is invalid).
1108  *
1109  * The client initially provides a @a status_editor/@a status_baton to the RA
1110  * layer; this editor contains knowledge of where the change will
1111  * begin in the working copy (when open_root() is called).
1112  *
1113  * In return, the client receives a @a reporter/@a report_baton. The
1114  * client then describes its working copy by making calls into the
1115  * @a reporter.
1116  *
1117  * When finished, the client calls @a reporter->finish_report(). The RA
1118  * layer then does a complete drive of @a status_editor, ending with
1119  * close_edit(), to report, essentially, what would be modified in
1120  * the working copy were the client to call do_update().
1121  * @a status_target is an optional single path component will restrict
1122  * the scope of the status report to an entry in the directory
1123  * represented by the @a session's URL, or empty if the entire directory
1124  * is meant to be examined.
1125  *
1126  * Get status only as deeply as @a depth indicates.
1127  *
1128  * The caller may not perform any RA operations using @a session
1129  * before finishing the report, and may not perform any RA operations
1130  * using @a session from within the editing operations of @a status_editor.
1131  *
1132  * Use @a pool for memory allocation.
1133  *
1134  * @note The reporter provided by this function does NOT supply copy-
1135  * from information to the diff editor callbacks.
1136  *
1137  * @note In order to prevent pre-1.5 servers from doing more work than
1138  * needed, and sending too much data back, a pre-1.5 'recurse'
1139  * directive may be sent to the server, based on @a depth.
1140  *
1141  * @since New in 1.5.
1142  */
1143 svn_error_t *
1145  const svn_ra_reporter3_t **reporter,
1146  void **report_baton,
1147  const char *status_target,
1148  svn_revnum_t revision,
1149  svn_depth_t depth,
1150  const svn_delta_editor_t *status_editor,
1151  void *status_baton,
1152  apr_pool_t *pool);
1153 
1154 
1155 /**
1156  * Similar to svn_ra_do_status2(), but taking @c svn_ra_reporter2_t
1157  * instead of @c svn_ra_reporter3_t, and therefore only able to report
1158  * @c svn_depth_infinity for depths. The status operation itself is
1159  * performed according to @a recurse: if TRUE, then @a depth is
1160  * @c svn_depth_infinity, else it is @c svn_depth_immediates.
1161  *
1162  * @deprecated Provided for compatibility with the 1.4 API.
1163  */
1165 svn_error_t *
1167  const svn_ra_reporter2_t **reporter,
1168  void **report_baton,
1169  const char *status_target,
1170  svn_revnum_t revision,
1171  svn_boolean_t recurse,
1172  const svn_delta_editor_t *status_editor,
1173  void *status_baton,
1174  apr_pool_t *pool);
1175 
1176 /**
1177  * Ask the RA layer to 'diff' a working copy against @a versus_url;
1178  * it's another form of svn_ra_do_update2().
1179  *
1180  * @note This function cannot be used to diff a single file, only a
1181  * working copy directory. See the svn_ra_do_switch2() function
1182  * for more details.
1183  *
1184  * The client initially provides a @a diff_editor/@a diff_baton to the RA
1185  * layer; this editor contains knowledge of where the common diff
1186  * root is in the working copy (when open_root() is called).
1187  *
1188  * In return, the client receives a @a reporter/@a report_baton. The
1189  * client then describes its working copy by making calls into the
1190  * @a reporter.
1191  *
1192  * When finished, the client calls @a reporter->finish_report(). The
1193  * RA layer then does a complete drive of @a diff_editor, ending with
1194  * close_edit(), to transmit the diff.
1195  *
1196  * @a diff_target is an optional single path component will restrict
1197  * the scope of the diff to an entry in the directory represented by
1198  * the @a session's URL, or empty if the entire directory is meant to be
1199  * one of the diff paths.
1200  *
1201  * The working copy will be diffed against @a versus_url as it exists
1202  * in revision @a revision, or as it is in head if @a revision is
1203  * @c SVN_INVALID_REVNUM.
1204  *
1205  * Use @a ignore_ancestry to control whether or not items being
1206  * diffed will be checked for relatedness first. Unrelated items
1207  * are typically transmitted to the editor as a deletion of one thing
1208  * and the addition of another, but if this flag is @c TRUE,
1209  * unrelated items will be diffed as if they were related.
1210  *
1211  * Diff only as deeply as @a depth indicates.
1212  *
1213  * The caller may not perform any RA operations using @a session before
1214  * finishing the report, and may not perform any RA operations using
1215  * @a session from within the editing operations of @a diff_editor.
1216  *
1217  * @a text_deltas instructs the driver of the @a diff_editor to enable
1218  * the generation of text deltas. If @a text_deltas is FALSE the window
1219  * handler returned by apply_textdelta will be called once with a NULL
1220  * @c svn_txdelta_window_t pointer.
1221  *
1222  * Use @a pool for memory allocation.
1223  *
1224  * @note The reporter provided by this function does NOT supply copy-
1225  * from information to the diff editor callbacks.
1226  *
1227  * @note In order to prevent pre-1.5 servers from doing more work than
1228  * needed, and sending too much data back, a pre-1.5 'recurse'
1229  * directive may be sent to the server, based on @a depth.
1230  *
1231  * @since New in 1.5.
1232  */
1233 svn_error_t *
1235  const svn_ra_reporter3_t **reporter,
1236  void **report_baton,
1237  svn_revnum_t revision,
1238  const char *diff_target,
1239  svn_depth_t depth,
1240  svn_boolean_t ignore_ancestry,
1241  svn_boolean_t text_deltas,
1242  const char *versus_url,
1243  const svn_delta_editor_t *diff_editor,
1244  void *diff_baton,
1245  apr_pool_t *pool);
1246 
1247 /**
1248  * Similar to svn_ra_do_diff3(), but taking @c svn_ra_reporter2_t
1249  * instead of @c svn_ra_reporter3_t, and therefore only able to report
1250  * @c svn_depth_infinity for depths. Perform the diff according to
1251  * @a recurse: if TRUE, then @a depth is @c svn_depth_infinity, else
1252  * it is @c svn_depth_files.
1253  *
1254  * @deprecated Provided for compatibility with the 1.4 API.
1255  */
1257 svn_error_t *
1259  const svn_ra_reporter2_t **reporter,
1260  void **report_baton,
1261  svn_revnum_t revision,
1262  const char *diff_target,
1263  svn_boolean_t recurse,
1264  svn_boolean_t ignore_ancestry,
1265  svn_boolean_t text_deltas,
1266  const char *versus_url,
1267  const svn_delta_editor_t *diff_editor,
1268  void *diff_baton,
1269  apr_pool_t *pool);
1270 
1271 
1272 /**
1273  * Similar to svn_ra_do_diff2(), but with @a text_deltas set to @c TRUE.
1274  *
1275  * @deprecated Provided for backward compatibility with the 1.3 API.
1276  */
1278 svn_error_t *
1280  const svn_ra_reporter2_t **reporter,
1281  void **report_baton,
1282  svn_revnum_t revision,
1283  const char *diff_target,
1284  svn_boolean_t recurse,
1285  svn_boolean_t ignore_ancestry,
1286  const char *versus_url,
1287  const svn_delta_editor_t *diff_editor,
1288  void *diff_baton,
1289  apr_pool_t *pool);
1290 
1291 /**
1292  * Invoke @a receiver with @a receiver_baton on each log message from
1293  * @a start to @a end. @a start may be greater or less than @a end;
1294  * this just controls whether the log messages are processed in descending
1295  * or ascending revision number order.
1296  *
1297  * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest.
1298  *
1299  * If @a paths is non-NULL and has one or more elements, then only show
1300  * revisions in which at least one of @a paths was changed (i.e., if
1301  * file, text or props changed; if dir, props changed or an entry
1302  * was added or deleted). Each path is an <tt>const char *</tt>, relative
1303  * to the @a session's common parent.
1304  *
1305  * If @a limit is non-zero only invoke @a receiver on the first @a limit
1306  * logs.
1307  *
1308  * If @a discover_changed_paths, then each call to receiver passes a
1309  * <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
1310  * the hash's keys are all the paths committed in that revision.
1311  * Otherwise, each call to receiver passes NULL for @a changed_paths.
1312  *
1313  * If @a strict_node_history is set, copy history will not be traversed
1314  * (if any exists) when harvesting the revision logs for each path.
1315  *
1316  * If @a include_merged_revisions is set, log information for revisions
1317  * which have been merged to @a targets will also be returned.
1318  *
1319  * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
1320  * revprops named in the array (i.e. retrieve none if the array is empty).
1321  *
1322  * If any invocation of @a receiver returns error, return that error
1323  * immediately and without wrapping it.
1324  *
1325  * If @a start or @a end is a non-existent revision, return the error
1326  * @c SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
1327  *
1328  * See also the documentation for @c svn_log_message_receiver_t.
1329  *
1330  * The caller may not invoke any RA operations using @a session from
1331  * within @a receiver.
1332  *
1333  * Use @a pool for memory allocation.
1334  *
1335  * @note If @a paths is NULL or empty, the result depends on the
1336  * server. Pre-1.5 servers will send nothing; 1.5 servers will
1337  * effectively perform the log operation on the root of the
1338  * repository. This behavior may be changed in the future to ensure
1339  * consistency across all pedigrees of server.
1340  *
1341  * @note Pre-1.5 servers do not support custom revprop retrieval; if @a
1342  * revprops is NULL or contains a revprop other than svn:author, svn:date,
1343  * or svn:log, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
1344  *
1345  * @since New in 1.5.
1346  */
1347 
1348 svn_error_t *
1350  const apr_array_header_t *paths,
1351  svn_revnum_t start,
1352  svn_revnum_t end,
1353  int limit,
1354  svn_boolean_t discover_changed_paths,
1355  svn_boolean_t strict_node_history,
1356  svn_boolean_t include_merged_revisions,
1357  const apr_array_header_t *revprops,
1358  svn_log_entry_receiver_t receiver,
1359  void *receiver_baton,
1360  apr_pool_t *pool);
1361 
1362 /**
1363  * Similar to svn_ra_get_log2(), but uses @c svn_log_message_receiver_t
1364  * instead of @c svn_log_entry_receiver_t. Also, @a
1365  * include_merged_revisions is set to @c FALSE and @a revprops is
1366  * svn:author, svn:date, and svn:log.
1367  *
1368  * @since New in 1.2.
1369  * @deprecated Provided for backward compatibility with the 1.4 API.
1370  */
1372 svn_error_t *
1374  const apr_array_header_t *paths,
1375  svn_revnum_t start,
1376  svn_revnum_t end,
1377  int limit,
1378  svn_boolean_t discover_changed_paths,
1379  svn_boolean_t strict_node_history,
1380  svn_log_message_receiver_t receiver,
1381  void *receiver_baton,
1382  apr_pool_t *pool);
1383 
1384 /**
1385  * Set @a *kind to the node kind associated with @a path at @a revision.
1386  * If @a path does not exist under @a revision, set @a *kind to
1387  * @c svn_node_none. @a path is relative to the @a session's parent URL.
1388  *
1389  * Use @a pool for memory allocation.
1390  *
1391  * @since New in 1.2.
1392  */
1393 svn_error_t *
1395  const char *path,
1396  svn_revnum_t revision,
1397  svn_node_kind_t *kind,
1398  apr_pool_t *pool);
1399 
1400 /**
1401  * Set @a *dirent to an @c svn_dirent_t associated with @a path at @a
1402  * revision. @a path is relative to the @a session's parent's URL.
1403  * If @a path does not exist in @a revision, set @a *dirent to NULL.
1404  *
1405  * Use @a pool for memory allocation.
1406  *
1407  * @since New in 1.2.
1408  */
1409 svn_error_t *
1410 svn_ra_stat(svn_ra_session_t *session,
1411  const char *path,
1412  svn_revnum_t revision,
1413  svn_dirent_t **dirent,
1414  apr_pool_t *pool);
1415 
1416 
1417 /**
1418  * Set @a *uuid to the repository's UUID, allocated in @a pool.
1419  *
1420  * @since New in 1.5.
1421  */
1422 svn_error_t *
1424  const char **uuid,
1425  apr_pool_t *pool);
1426 
1427 /**
1428  * Similar to svn_ra_get_uuid2(), but returns the value allocated in
1429  * @a session's pool.
1430  *
1431  * @deprecated Provided for backward compatibility with the 1.4 API.
1432  * @since New in 1.2.
1433  */
1435 svn_error_t *
1437  const char **uuid,
1438  apr_pool_t *pool);
1439 
1440 /**
1441  * Set @a *url to the repository's root URL, allocated in @a pool.
1442  * The value will not include a trailing '/'. The returned URL is
1443  * guaranteed to be a prefix of the @a session's URL.
1444  *
1445  * @since New in 1.5.
1446  */
1447 svn_error_t *
1449  const char **url,
1450  apr_pool_t *pool);
1451 
1452 
1453 /**
1454  * Similar to svn_ra_get_repos_root2(), but returns the value
1455  * allocated in @a session's pool.
1456  *
1457  * @deprecated Provided for backward compatibility with the 1.4 API.
1458  * @since New in 1.2.
1459  */
1461 svn_error_t *
1463  const char **url,
1464  apr_pool_t *pool);
1465 
1466 /**
1467  * Set @a *locations to the locations (at the repository revisions
1468  * @a location_revisions) of the file identified by @a path in
1469  * @a peg_revision. @a path is relative to the URL to which
1470  * @a session was opened. @a location_revisions is an array of
1471  * @c svn_revnum_t's. @a *locations will be a mapping from the revisions to
1472  * their appropriate absolute paths. If the file doesn't exist in a
1473  * location_revision, that revision will be ignored.
1474  *
1475  * Use @a pool for all allocations.
1476  *
1477  * @since New in 1.2.
1478  */
1479 svn_error_t *
1481  apr_hash_t **locations,
1482  const char *path,
1483  svn_revnum_t peg_revision,
1484  apr_array_header_t *location_revisions,
1485  apr_pool_t *pool);
1486 
1487 
1488 /**
1489  * Call @a receiver (with @a receiver_baton) for each segment in the
1490  * location history of @a path in @a peg_revision, working backwards in
1491  * time from @a start_rev to @a end_rev.
1492  *
1493  * @a end_rev may be @c SVN_INVALID_REVNUM to indicate that you want
1494  * to trace the history of the object to its origin.
1495  *
1496  * @a start_rev may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1497  * revision". Otherwise, @a start_rev must be younger than @a end_rev
1498  * (unless @a end_rev is @c SVN_INVALID_REVNUM).
1499  *
1500  * @a peg_revision may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1501  * revision", and must evaluate to be at least as young as @a start_rev.
1502  *
1503  * Use @a pool for all allocations.
1504  *
1505  * @since New in 1.5.
1506  */
1507 svn_error_t *
1509  const char *path,
1510  svn_revnum_t peg_revision,
1511  svn_revnum_t start_rev,
1512  svn_revnum_t end_rev,
1514  void *receiver_baton,
1515  apr_pool_t *pool);
1516 
1517 /**
1518  * Retrieve a subset of the interesting revisions of a file @a path
1519  * as seen in revision @a end (see svn_fs_history_prev() for a
1520  * definition of "interesting revisions"). Invoke @a handler with
1521  * @a handler_baton as its first argument for each such revision.
1522  * @a session is an open RA session. Use @a pool for all allocations.
1523  *
1524  * If there is an interesting revision of the file that is less than or
1525  * equal to @a start, the iteration will begin at that revision.
1526  * Else, the iteration will begin at the first revision of the file in
1527  * the repository, which has to be less than or equal to @a end. Note
1528  * that if the function succeeds, @a handler will have been called at
1529  * least once.
1530  *
1531  * In a series of calls to @a handler, the file contents for the first
1532  * interesting revision will be provided as a text delta against the
1533  * empty file. In the following calls, the delta will be against the
1534  * fulltext contents for the previous call.
1535  *
1536  * If @a include_merged_revisions is TRUE, revisions which a included as a
1537  * result of a merge between @a start and @a end will be included.
1538  *
1539  * @note This functionality is not available in pre-1.1 servers. If the
1540  * server doesn't implement it, an alternative (but much slower)
1541  * implementation based on svn_ra_get_log2() is used.
1542  *
1543  * @since New in 1.5.
1544  */
1545 svn_error_t *
1547  const char *path,
1548  svn_revnum_t start,
1549  svn_revnum_t end,
1550  svn_boolean_t include_merged_revisions,
1551  svn_file_rev_handler_t handler,
1552  void *handler_baton,
1553  apr_pool_t *pool);
1554 
1555 /**
1556  * Similiar to svn_ra_get_file_revs2(), but with @a include_merged_revisions
1557  * set to FALSE.
1558  *
1559  * @since New in 1.2.
1560  * @deprecated Provided for backward compatibility with the 1.4 API.
1561  */
1563 svn_error_t *
1565  const char *path,
1566  svn_revnum_t start,
1567  svn_revnum_t end,
1568  svn_ra_file_rev_handler_t handler,
1569  void *handler_baton,
1570  apr_pool_t *pool);
1571 
1572 /**
1573  * Lock each path in @a path_revs, which is a hash whose keys are the
1574  * paths to be locked, and whose values are the corresponding base
1575  * revisions for each path.
1576  *
1577  * Note that locking is never anonymous, so any server implementing
1578  * this function will have to "pull" a username from the client, if
1579  * it hasn't done so already.
1580  *
1581  * @a comment is optional: it's either an xml-escapable string
1582  * which describes the lock, or it is NULL.
1583  *
1584  * If any path is already locked by a different user, then call @a
1585  * lock_func/@a lock_baton with an error. If @a steal_lock is TRUE,
1586  * then "steal" the existing lock(s) anyway, even if the RA username
1587  * does not match the current lock's owner. Delete any lock on the
1588  * path, and unconditionally create a new lock.
1589  *
1590  * For each path, if its base revision (in @a path_revs) is a valid
1591  * revnum, then do an out-of-dateness check. If the revnum is less
1592  * than the last-changed-revision of any path (or if a path doesn't
1593  * exist in HEAD), call @a lock_func/@a lock_baton with an
1594  * SVN_ERR_RA_OUT_OF_DATE error.
1595  *
1596  * After successfully locking a file, @a lock_func is called with the
1597  * @a lock_baton.
1598  *
1599  * Use @a pool for temporary allocations.
1600  *
1601  * @since New in 1.2.
1602  */
1603 svn_error_t *
1604 svn_ra_lock(svn_ra_session_t *session,
1605  apr_hash_t *path_revs,
1606  const char *comment,
1607  svn_boolean_t steal_lock,
1608  svn_ra_lock_callback_t lock_func,
1609  void *lock_baton,
1610  apr_pool_t *pool);
1611 
1612 /**
1613  * Remove the repository lock for each path in @a path_tokens.
1614  * @a path_tokens is a hash whose keys are the paths to be locked, and
1615  * whose values are the corresponding lock tokens for each path. If
1616  * the path has no corresponding lock token, or if @a break_lock is TRUE,
1617  * then the corresponding value shall be "".
1618  *
1619  * Note that unlocking is never anonymous, so any server
1620  * implementing this function will have to "pull" a username from
1621  * the client, if it hasn't done so already.
1622  *
1623  * If @a token points to a lock, but the RA username doesn't match the
1624  * lock's owner, call @a lock_func/@a lock_baton with an error. If @a
1625  * break_lock is TRUE, however, instead allow the lock to be "broken"
1626  * by the RA user.
1627  *
1628  * After successfully unlocking a path, @a lock_func is called with
1629  * the @a lock_baton.
1630  *
1631  * Use @a pool for temporary allocations.
1632  *
1633  * @since New in 1.2.
1634  */
1635 svn_error_t *
1637  apr_hash_t *path_tokens,
1638  svn_boolean_t break_lock,
1639  svn_ra_lock_callback_t lock_func,
1640  void *lock_baton,
1641  apr_pool_t *pool);
1642 
1643 /**
1644  * If @a path is locked, set @a *lock to an svn_lock_t which
1645  * represents the lock, allocated in @a pool. If @a path is not
1646  * locked, set @a *lock to NULL.
1647  *
1648  * @since New in 1.2.
1649  */
1650 svn_error_t *
1652  svn_lock_t **lock,
1653  const char *path,
1654  apr_pool_t *pool);
1655 
1656 /**
1657  * Set @a *locks to a hashtable which represents all locks on or
1658  * below @a path.
1659  *
1660  * The hashtable maps (const char *) absolute fs paths to (const
1661  * svn_lock_t *) structures. The hashtable -- and all keys and
1662  * values -- are allocated in @a pool.
1663  *
1664  * @note It is not considered an error for @a path to not exist in HEAD.
1665  * Such a search will simply return no locks.
1666  *
1667  * @note This functionality is not available in pre-1.2 servers. If the
1668  * server doesn't implement it, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is
1669  * returned.
1670  *
1671  * @since New in 1.2.
1672  */
1673 svn_error_t *
1675  apr_hash_t **locks,
1676  const char *path,
1677  apr_pool_t *pool);
1678 
1679 
1680 /**
1681  * Replay the changes from a range of revisions between @a start_revision
1682  * and @a end_revision.
1683  *
1684  * When receiving information for one revision, a callback @a revstart_func is
1685  * called; this callback will provide an editor and baton through which the
1686  * revision will be replayed.
1687  * When replaying the revision is finished, callback @a revfinish_func will be
1688  * called so the editor can be closed.
1689  *
1690  * Changes will be limited to those that occur under @a session's URL, and
1691  * the server will assume that the client has no knowledge of revisions
1692  * prior to @a low_water_mark. These two limiting factors define the portion
1693  * of the tree that the server will assume the client already has knowledge of,
1694  * and thus any copies of data from outside that part of the tree will be
1695  * sent in their entirety, not as simple copies or deltas against a previous
1696  * version.
1697  *
1698  * If @a send_deltas is @c TRUE, the actual text and property changes in
1699  * the revision will be sent, otherwise dummy text deltas and NULL property
1700  * changes will be sent instead.
1701  *
1702  * @a pool is used for all allocation.
1703  *
1704  * @since New in 1.5.
1705  */
1706 svn_error_t *
1708  svn_revnum_t start_revision,
1709  svn_revnum_t end_revision,
1710  svn_revnum_t low_water_mark,
1711  svn_boolean_t send_deltas,
1712  svn_ra_replay_revstart_callback_t revstart_func,
1713  svn_ra_replay_revfinish_callback_t revfinish_func,
1714  void *replay_baton,
1715  apr_pool_t *pool);
1716 
1717 /**
1718  * Replay the changes from @a revision through @a editor and @a edit_baton.
1719  *
1720  * Changes will be limited to those that occur under @a session's URL, and
1721  * the server will assume that the client has no knowledge of revisions
1722  * prior to @a low_water_mark. These two limiting factors define the portion
1723  * of the tree that the server will assume the client already has knowledge of,
1724  * and thus any copies of data from outside that part of the tree will be
1725  * sent in their entirety, not as simple copies or deltas against a previous
1726  * version.
1727  *
1728  * If @a send_deltas is @c TRUE, the actual text and property changes in
1729  * the revision will be sent, otherwise dummy text deltas and null property
1730  * changes will be sent instead.
1731  *
1732  * @a pool is used for all allocation.
1733  *
1734  * @since New in 1.4.
1735  */
1736 svn_error_t *
1738  svn_revnum_t revision,
1739  svn_revnum_t low_water_mark,
1740  svn_boolean_t send_deltas,
1741  const svn_delta_editor_t *editor,
1742  void *edit_baton,
1743  apr_pool_t *pool);
1744 
1745 /**
1746  * Set @a *has to TRUE if the server represented by @a session has
1747  * @a capability (one of the capabilities beginning with
1748  * @c "SVN_RA_CAPABILITY_"), else set @a *has to FALSE.
1749  *
1750  * If @a capability isn't recognized, throw @c SVN_ERR_UNKNOWN_CAPABILITY,
1751  * with the effect on @a *has undefined.
1752  *
1753  * Use @a pool for all allocation.
1754  *
1755  * @since New in 1.5.
1756  */
1757 svn_error_t *
1759  svn_boolean_t *has,
1760  const char *capability,
1761  apr_pool_t *pool);
1762 
1763 /**
1764  * Given @a path at revision @a peg_revision, set @a *revision_deleted to the
1765  * revision @a path was first deleted, within the inclusive revision range
1766  * defined by @a peg_revision and @a end_revision. @a path is relative
1767  * to the URL in @a session.
1768  *
1769  * If @a path does not exist at @a peg_revision or was not deleted within
1770  * the specified range, then set @a *revision_deleted to @c SVN_INVALID_REVNUM.
1771  * If @a peg_revision or @a end_revision are invalid or if @a peg_revision is
1772  * greater than @a end_revision, then return @c SVN_ERR_CLIENT_BAD_REVISION.
1773  *
1774  * Use @a pool for all allocations.
1775  *
1776  * @since New in 1.6.
1777  */
1778 svn_error_t *
1780  const char *path,
1781  svn_revnum_t peg_revision,
1782  svn_revnum_t end_revision,
1783  svn_revnum_t *revision_deleted,
1784  apr_pool_t *pool);
1785 
1786 /**
1787  * The capability of understanding @c svn_depth_t (e.g., the server
1788  * understands what the client means when the client describes the
1789  * depth of a working copy to the server.)
1790  *
1791  * @since New in 1.5.
1792  */
1793 #define SVN_RA_CAPABILITY_DEPTH "depth"
1794 
1795 /**
1796  * The capability of doing the right thing with merge-tracking
1797  * information. This capability should be reported bidirectionally,
1798  * because some repositories may want to reject clients that do not
1799  * self-report as knowing how to handle merge-tracking.
1800  *
1801  * @since New in 1.5.
1802  */
1803 #define SVN_RA_CAPABILITY_MERGEINFO "mergeinfo"
1804 
1805 /**
1806  * The capability of retrieving arbitrary revprops in svn_ra_get_log2.
1807  *
1808  * @since New in 1.5.
1809  */
1810 #define SVN_RA_CAPABILITY_LOG_REVPROPS "log-revprops"
1811 
1812 /**
1813  * The capability of replaying a directory in the repository (partial replay).
1814  *
1815  * @since New in 1.5.
1816  */
1817 #define SVN_RA_CAPABILITY_PARTIAL_REPLAY "partial-replay"
1818 
1819 /**
1820  * The capability of including revision properties in a commit.
1821  *
1822  * @since New in 1.5.
1823  */
1824 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
1825 
1826 /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
1827  *
1828  * RA layers generally fetch all capabilities when asked about any
1829  * capability, to save future round trips. So if you add a new
1830  * capability here, make sure to update the RA layers to remember
1831  * it after any capabilities query.
1832  *
1833  * Also note that capability strings should not include colons,
1834  * because we pass a list of client capabilities to the start-commit
1835  * hook as a single, colon-separated string.
1836  */
1837 
1838 /**
1839  * Append a textual list of all available RA modules to the stringbuf
1840  * @a output.
1841  *
1842  * @since New in 1.2.
1843  */
1844 svn_error_t *
1846  apr_pool_t *pool);
1847 
1848 
1849 /**
1850  * Similar to svn_ra_print_modules().
1851  * @a ra_baton is ignored.
1852  *
1853  * @deprecated Provided for backward compatibility with the 1.1 API.
1854  */
1856 svn_error_t *
1858  void *ra_baton,
1859  apr_pool_t *pool);
1860 
1861 
1862 
1863 /**
1864  * Using this callback struct is similar to calling the newer public
1865  * interface that is based on @c svn_ra_session_t.
1866  *
1867  * @deprecated Provided for backward compatibility with the 1.1 API.
1868  */
1869 typedef struct svn_ra_plugin_t
1870 {
1871  /** The proper name of the RA library, (like "ra_neon" or "ra_local") */
1872  const char *name;
1873 
1874  /** Short doc string printed out by `svn --version` */
1875  const char *description;
1876 
1877  /* The vtable hooks */
1878 
1879  /** Call svn_ra_open() and set @a session_baton to an object representing
1880  * the new session. All other arguments are passed to svn_ra_open().
1881  */
1882  svn_error_t *(*open)(void **session_baton,
1883  const char *repos_URL,
1884  const svn_ra_callbacks_t *callbacks,
1885  void *callback_baton,
1886  apr_hash_t *config,
1887  apr_pool_t *pool);
1888 
1889  /** Call svn_ra_get_latest_revnum() with the session associated with
1890  * @a session_baton and all other arguments.
1891  */
1892  svn_error_t *(*get_latest_revnum)(void *session_baton,
1893  svn_revnum_t *latest_revnum,
1894  apr_pool_t *pool);
1895 
1896  /** Call svn_ra_get_dated_revision() with the session associated with
1897  * @a session_baton and all other arguments.
1898  */
1899  svn_error_t *(*get_dated_revision)(void *session_baton,
1900  svn_revnum_t *revision,
1901  apr_time_t tm,
1902  apr_pool_t *pool);
1903 
1904  /** Call svn_ra_change_rev_prop() with the session associated with
1905  * @a session_baton and all other arguments.
1906  */
1907  svn_error_t *(*change_rev_prop)(void *session_baton,
1908  svn_revnum_t rev,
1909  const char *name,
1910  const svn_string_t *value,
1911  apr_pool_t *pool);
1912 
1913  /** Call svn_ra_rev_proplist() with the session associated with
1914  * @a session_baton and all other arguments.
1915  */
1916  svn_error_t *(*rev_proplist)(void *session_baton,
1917  svn_revnum_t rev,
1918  apr_hash_t **props,
1919  apr_pool_t *pool);
1920 
1921  /** Call svn_ra_rev_prop() with the session associated with
1922  * @a session_baton and all other arguments.
1923  */
1924  svn_error_t *(*rev_prop)(void *session_baton,
1925  svn_revnum_t rev,
1926  const char *name,
1927  svn_string_t **value,
1928  apr_pool_t *pool);
1929 
1930  /** Call svn_ra_get_commit_editor() with the session associated with
1931  * @a session_baton and all other arguments plus @a lock_tokens set to
1932  * @c NULL and @a keep_locks set to @c TRUE.
1933  */
1934  svn_error_t *(*get_commit_editor)(void *session_baton,
1935  const svn_delta_editor_t **editor,
1936  void **edit_baton,
1937  const char *log_msg,
1938  svn_commit_callback_t callback,
1939  void *callback_baton,
1940  apr_pool_t *pool);
1941 
1942  /** Call svn_ra_get_file() with the session associated with
1943  * @a session_baton and all other arguments.
1944  */
1945  svn_error_t *(*get_file)(void *session_baton,
1946  const char *path,
1947  svn_revnum_t revision,
1948  svn_stream_t *stream,
1949  svn_revnum_t *fetched_rev,
1950  apr_hash_t **props,
1951  apr_pool_t *pool);
1952 
1953  /** Call svn_ra_get_dir() with the session associated with
1954  * @a session_baton and all other arguments.
1955  */
1956  svn_error_t *(*get_dir)(void *session_baton,
1957  const char *path,
1958  svn_revnum_t revision,
1959  apr_hash_t **dirents,
1960  svn_revnum_t *fetched_rev,
1961  apr_hash_t **props,
1962  apr_pool_t *pool);
1963 
1964  /** Call svn_ra_do_update() with the session associated with
1965  * @a session_baton and all other arguments.
1966  */
1967  svn_error_t *(*do_update)(void *session_baton,
1968  const svn_ra_reporter_t **reporter,
1969  void **report_baton,
1970  svn_revnum_t revision_to_update_to,
1971  const char *update_target,
1972  svn_boolean_t recurse,
1973  const svn_delta_editor_t *update_editor,
1974  void *update_baton,
1975  apr_pool_t *pool);
1976 
1977  /** Call svn_ra_do_switch() with the session associated with
1978  * @a session_baton and all other arguments.
1979  */
1980  svn_error_t *(*do_switch)(void *session_baton,
1981  const svn_ra_reporter_t **reporter,
1982  void **report_baton,
1983  svn_revnum_t revision_to_switch_to,
1984  const char *switch_target,
1985  svn_boolean_t recurse,
1986  const char *switch_url,
1987  const svn_delta_editor_t *switch_editor,
1988  void *switch_baton,
1989  apr_pool_t *pool);
1990 
1991  /** Call svn_ra_do_status() with the session associated with
1992  * @a session_baton and all other arguments.
1993  */
1994  svn_error_t *(*do_status)(void *session_baton,
1995  const svn_ra_reporter_t **reporter,
1996  void **report_baton,
1997  const char *status_target,
1998  svn_revnum_t revision,
1999  svn_boolean_t recurse,
2000  const svn_delta_editor_t *status_editor,
2001  void *status_baton,
2002  apr_pool_t *pool);
2003 
2004  /** Call svn_ra_do_diff() with the session associated with
2005  * @a session_baton and all other arguments.
2006  */
2007  svn_error_t *(*do_diff)(void *session_baton,
2008  const svn_ra_reporter_t **reporter,
2009  void **report_baton,
2010  svn_revnum_t revision,
2011  const char *diff_target,
2012  svn_boolean_t recurse,
2013  svn_boolean_t ignore_ancestry,
2014  const char *versus_url,
2015  const svn_delta_editor_t *diff_editor,
2016  void *diff_baton,
2017  apr_pool_t *pool);
2018 
2019  /** Call svn_ra_get_log() with the session associated with
2020  * @a session_baton and all other arguments. @a limit is set to 0.
2021  */
2022  svn_error_t *(*get_log)(void *session_baton,
2023  const apr_array_header_t *paths,
2024  svn_revnum_t start,
2025  svn_revnum_t end,
2026  svn_boolean_t discover_changed_paths,
2027  svn_boolean_t strict_node_history,
2028  svn_log_message_receiver_t receiver,
2029  void *receiver_baton,
2030  apr_pool_t *pool);
2031 
2032  /** Call svn_ra_check_path() with the session associated with
2033  * @a session_baton and all other arguments.
2034  */
2035  svn_error_t *(*check_path)(void *session_baton,
2036  const char *path,
2037  svn_revnum_t revision,
2038  svn_node_kind_t *kind,
2039  apr_pool_t *pool);
2040 
2041  /** Call svn_ra_get_uuid() with the session associated with
2042  * @a session_baton and all other arguments.
2043  */
2044  svn_error_t *(*get_uuid)(void *session_baton,
2045  const char **uuid,
2046  apr_pool_t *pool);
2047 
2048  /** Call svn_ra_get_repos_root() with the session associated with
2049  * @a session_baton and all other arguments.
2050  */
2051  svn_error_t *(*get_repos_root)(void *session_baton,
2052  const char **url,
2053  apr_pool_t *pool);
2054 
2055  /**
2056  * Call svn_ra_get_locations() with the session associated with
2057  * @a session_baton and all other arguments.
2058  *
2059  * @since New in 1.1.
2060  */
2061  svn_error_t *(*get_locations)(void *session_baton,
2062  apr_hash_t **locations,
2063  const char *path,
2064  svn_revnum_t peg_revision,
2065  apr_array_header_t *location_revisions,
2066  apr_pool_t *pool);
2067 
2068  /**
2069  * Call svn_ra_get_file_revs() with the session associated with
2070  * @a session_baton and all other arguments.
2071  *
2072  * @since New in 1.1.
2073  */
2074  svn_error_t *(*get_file_revs)(void *session_baton,
2075  const char *path,
2076  svn_revnum_t start,
2077  svn_revnum_t end,
2078  svn_ra_file_rev_handler_t handler,
2079  void *handler_baton,
2080  apr_pool_t *pool);
2081 
2082  /**
2083  * Return the plugin's version information.
2084  *
2085  * @since New in 1.1.
2086  */
2087  const svn_version_t *(*get_version)(void);
2088 
2089 
2090 } svn_ra_plugin_t;
2091 
2092 /**
2093  * All "ra_FOO" implementations *must* export a function named
2094  * svn_ra_FOO_init() of type @c svn_ra_init_func_t.
2095  *
2096  * When called by libsvn_client, this routine adds an entry (or
2097  * entries) to the hash table for any URL schemes it handles. The hash
2098  * value must be of type (<tt>@c svn_ra_plugin_t *</tt>). @a pool is a
2099  * pool for allocating configuration / one-time data.
2100  *
2101  * This type is defined to use the "C Calling Conventions" to ensure that
2102  * abi_version is the first parameter. The RA plugin must check that value
2103  * before accessing the other parameters.
2104  *
2105  * ### need to force this to be __cdecl on Windows... how??
2106  *
2107  * @deprecated Provided for backward compatibility with the 1.1 API.
2108  */
2109 typedef svn_error_t *(*svn_ra_init_func_t)(int abi_version,
2110  apr_pool_t *pool,
2111  apr_hash_t *hash);
2112 
2113 /**
2114  * The current ABI (Application Binary Interface) version for the
2115  * RA plugin model. This version number will change when the ABI
2116  * between the SVN core (e.g. libsvn_client) and the RA plugin changes.
2117  *
2118  * An RA plugin should verify that the passed version number is acceptable
2119  * before accessing the rest of the parameters, and before returning any
2120  * information.
2121  *
2122  * It is entirely acceptable for an RA plugin to accept multiple ABI
2123  * versions. It can simply interpret the parameters based on the version,
2124  * and it can return different plugin structures.
2125  *
2126  *
2127  * <pre>
2128  * VSN DATE REASON FOR CHANGE
2129  * --- ---------- ------------------------------------------------
2130  * 1 2001-02-17 Initial revision.
2131  * 2 2004-06-29 Preparing for svn 1.1, which adds new RA vtable funcs.
2132  * 2005-01-19 Rework the plugin interface and don't provide the vtable
2133  * to the client. Separate ABI versions are no longer used.
2134  * </pre>
2135  *
2136  * @deprecated Provided for backward compatibility with the 1.0 API.
2137  */
2138 #define SVN_RA_ABI_VERSION 2
2139 
2140 /* Public RA implementations. */
2141 
2142 /** Initialize libsvn_ra_neon.
2143  *
2144  * @deprecated Provided for backward compatibility with the 1.1 API. */
2146 svn_error_t *
2147 svn_ra_dav_init(int abi_version,
2148  apr_pool_t *pool,
2149  apr_hash_t *hash);
2150 
2151 /** Initialize libsvn_ra_local.
2152  *
2153  * @deprecated Provided for backward compatibility with the 1.1 API. */
2155 svn_error_t *
2156 svn_ra_local_init(int abi_version,
2157  apr_pool_t *pool,
2158  apr_hash_t *hash);
2159 
2160 /** Initialize libsvn_ra_svn.
2161  *
2162  * @deprecated Provided for backward compatibility with the 1.1 API. */
2164 svn_error_t *
2165 svn_ra_svn_init(int abi_version,
2166  apr_pool_t *pool,
2167  apr_hash_t *hash);
2168 
2169 /** Initialize libsvn_ra_serf.
2170  *
2171  * @since New in 1.4.
2172  * @deprecated Provided for backward compatibility with the 1.1 API. */
2174 svn_error_t *
2175 svn_ra_serf_init(int abi_version,
2176  apr_pool_t *pool,
2177  apr_hash_t *hash);
2178 
2179 
2180 /**
2181  * Initialize the compatibility wrapper, using @a pool for any allocations.
2182  * The caller must hold on to @a ra_baton as long as the RA library is used.
2183  *
2184  * @deprecated Provided for backward compatibility with the 1.1 API.
2185  */
2187 svn_error_t *
2188 svn_ra_init_ra_libs(void **ra_baton,
2189  apr_pool_t *pool);
2190 
2191 /**
2192  * Return an RA vtable-@a library which can handle URL. A number of
2193  * svn_client_* routines will call this internally, but client apps might
2194  * use it too. $a ra_baton is a baton obtained by a call to
2195  * svn_ra_init_ra_libs().
2196  *
2197  * @deprecated Provided for backward compatibility with the 1.1 API.
2198  */
2200 svn_error_t *
2202  void *ra_baton,
2203  const char *url,
2204  apr_pool_t *pool);
2205 
2206 #ifdef __cplusplus
2207 }
2208 #endif /* __cplusplus */
2209 
2210 #endif /* SVN_RA_H */
2211