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