3 * ====================================================================
\r
4 * Copyright (c) 2000-2008 CollabNet. All rights reserved.
\r
6 * This software is licensed as described in the file COPYING, which
\r
7 * you should have received as part of this distribution. The terms
\r
8 * are also available at http://subversion.tigris.org/license-1.html.
\r
9 * If newer versions of this license are posted there, you may use a
\r
10 * newer version instead, at your option.
\r
12 * This software consists of voluntary contributions made by many
\r
13 * individuals. For exact contribution history, see the revision
\r
14 * history and logs, available at http://subversion.tigris.org/.
\r
15 * ====================================================================
\r
19 * @brief Repository Access
\r
26 #include <apr_pools.h>
\r
27 #include <apr_hash.h>
\r
28 #include <apr_tables.h>
\r
29 #include <apr_time.h>
\r
30 #include <apr_file_io.h> /* for apr_file_t */
\r
32 #include "svn_types.h"
\r
33 #include "svn_string.h"
\r
34 #include "svn_delta.h"
\r
35 #include "svn_auth.h"
\r
36 #include "svn_mergeinfo.h"
\r
40 #endif /* __cplusplus */
\r
44 /* Misc. declarations */
\r
47 * Get libsvn_ra version information.
\r
49 * @since New in 1.1.
\r
51 const svn_version_t *
\r
52 svn_ra_version(void);
\r
55 /** This is a function type which allows the RA layer to fetch working
\r
56 * copy (WC) properties.
\r
58 * The @a baton is provided along with the function pointer and should
\r
59 * be passed back in. This will be the @a callback_baton or the
\r
60 * @a close_baton as appropriate.
\r
62 * @a path is relative to the "root" of the session, defined by the
\r
63 * @a repos_URL passed to svn_ra_open3() vtable call.
\r
65 * @a name is the name of the property to fetch. If the property is present,
\r
66 * then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
\r
68 typedef svn_error_t *(*svn_ra_get_wc_prop_func_t)(void *baton,
\r
69 const char *relpath,
\r
71 const svn_string_t **value,
\r
74 /** This is a function type which allows the RA layer to store new
\r
75 * working copy properties during update-like operations. See the
\r
76 * comments for @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and
\r
77 * @a name. The @a value is the value that will be stored for the property;
\r
78 * a NULL @a value means the property will be deleted.
\r
80 typedef svn_error_t *(*svn_ra_set_wc_prop_func_t)(void *baton,
\r
83 const svn_string_t *value,
\r
86 /** This is a function type which allows the RA layer to store new
\r
87 * working copy properties as part of a commit. See the comments for
\r
88 * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
\r
89 * The @a value is the value that will be stored for the property; a
\r
90 * @c NULL @a value means the property will be deleted.
\r
92 * Note that this might not actually store the new property before
\r
93 * returning, but instead schedule it to be changed as part of
\r
94 * post-commit processing (in which case a successful commit means the
\r
95 * properties got written). Thus, during the commit, it is possible
\r
96 * to invoke this function to set a new value for a wc prop, then read
\r
97 * the wc prop back from the working copy and get the *old* value.
\r
100 typedef svn_error_t *(*svn_ra_push_wc_prop_func_t)(void *baton,
\r
103 const svn_string_t *value,
\r
106 /** This is a function type which allows the RA layer to invalidate
\r
107 * (i.e., remove) wcprops recursively. See the documentation for
\r
108 * @c svn_ra_get_wc_prop_func_t for @a baton, @a path, and @a name.
\r
110 * Unlike @c svn_ra_push_wc_prop_func_t, this has immediate effect. If
\r
111 * it returns success, the wcprops have been removed.
\r
113 typedef svn_error_t *(*svn_ra_invalidate_wc_props_func_t)(void *baton,
\r
119 /** A function type for retrieving the youngest revision from a repos. */
\r
120 typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)
\r
121 (void *session_baton,
\r
122 svn_revnum_t *latest_revnum);
\r
124 /** A function type which allows the RA layer to ask about any
\r
125 * customizations to the client name string. This is primarily used
\r
126 * by HTTP-based RA layers wishing to extend the string reported to
\r
127 * Apache/mod_dav_svn via the User-agent HTTP header.
\r
129 typedef svn_error_t *(*svn_ra_get_client_string_func_t)(void *baton,
\r
135 * A callback function type for use in @c get_file_revs.
\r
136 * @a baton is provided by the caller, @a path is the pathname of the file
\r
137 * in revision @a rev and @a rev_props are the revision properties.
\r
138 * If @a delta_handler and @a delta_baton are non-NULL, they may be set to a
\r
139 * handler/baton which will be called with the delta between the previous
\r
140 * revision and this one after the return of this callback. They may be
\r
141 * left as NULL/NULL.
\r
142 * @a prop_diffs is an array of svn_prop_t elements indicating the property
\r
143 * delta for this and the previous revision.
\r
144 * @a pool may be used for temporary allocations, but you can't rely
\r
145 * on objects allocated to live outside of this particular call and the
\r
146 * immediately following calls to @a *delta_handler, if any.
\r
148 * @since New in 1.1.
\r
150 typedef svn_error_t *(*svn_ra_file_rev_handler_t)
\r
154 apr_hash_t *rev_props,
\r
155 svn_txdelta_window_handler_t *delta_handler,
\r
156 void **delta_baton,
\r
157 apr_array_header_t *prop_diffs,
\r
161 * Callback function type for locking and unlocking actions.
\r
163 * @since New in 1.2.
\r
165 * @a do_lock is TRUE when locking @a path, and FALSE
\r
168 * @a lock is a lock for @a path or NULL if @a do_lock is FALSE or @a ra_err is
\r
171 * @a ra_err is NULL unless the ra layer encounters a locking related
\r
172 * error which it passes back for notification purposes. The caller
\r
173 * is responsible for clearing @a ra_err after the callback is run.
\r
175 * @a baton is a closure object; it should be provided by the
\r
176 * implementation, and passed by the caller. @a pool may be used for
\r
177 * temporary allocation.
\r
179 typedef svn_error_t *(*svn_ra_lock_callback_t)(void *baton,
\r
181 svn_boolean_t do_lock,
\r
182 const svn_lock_t *lock,
\r
183 svn_error_t *ra_err,
\r
187 * Callback function type for progress notification.
\r
189 * @a progress is the number of bytes already transferred, @a total is
\r
190 * the total number of bytes to transfer or -1 if it's not known, @a
\r
191 * baton is the callback baton.
\r
193 * @since New in 1.3.
\r
195 typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
\r
201 * Callback function type for replay_range actions.
\r
203 * This callback function should provide replay_range with an editor which
\r
204 * will be driven with the received replay reports from the master repository.
\r
206 * @a revision is the target revision number of the received replay report.
\r
208 * @a editor and @a edit_baton should provided by the callback implementation.
\r
210 * @a replay_baton is the baton as originally passed to replay_range.
\r
212 * @a revprops contains key/value pairs for each revision properties for this
\r
215 * @since New in 1.5.
\r
217 typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)
\r
218 (svn_revnum_t revision,
\r
219 void *replay_baton,
\r
220 const svn_delta_editor_t **editor,
\r
222 apr_hash_t *rev_props,
\r
226 * Callback function type for replay_range actions.
\r
228 * This callback function should close the editor.
\r
230 * @a revision is the target revision number of the received replay report.
\r
232 * @a editor and @a edit_baton should provided by the callback implementation.
\r
234 * @a replay_baton is the baton as originally passed to replay_range.
\r
236 * @a revprops contains key/value pairs for each revision properties for this
\r
239 * @since New in 1.5.
\r
241 typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)
\r
242 (svn_revnum_t revision,
\r
243 void *replay_baton,
\r
244 const svn_delta_editor_t *editor,
\r
246 apr_hash_t *rev_props,
\r
251 * The update Reporter.
\r
253 * A vtable structure which allows a working copy to describe a subset
\r
254 * (or possibly all) of its working-copy to an RA layer, for the
\r
255 * purposes of an update, switch, status, or diff operation.
\r
257 * Paths for report calls are relative to the target (not the anchor)
\r
258 * of the operation. Report calls must be made in depth-first order:
\r
259 * parents before children, all children of a parent before any
\r
260 * siblings of the parent. The first report call must be a set_path
\r
261 * with a @a path argument of "" and a valid revision. (If the target
\r
262 * of the operation is locally deleted or missing, use the anchor's
\r
263 * revision.) If the target of the operation is deleted or switched
\r
264 * relative to the anchor, follow up the initial set_path call with a
\r
265 * link_path or delete_path call with a @a path argument of "" to
\r
266 * indicate that. In no other case may there be two report
\r
267 * descriptions for the same path. If the target of the operation is
\r
268 * a locally added file or directory (which previously did not exist),
\r
269 * it may be reported as having revision 0 or as having the parent
\r
270 * directory's revision.
\r
272 * @since New in 1.5.
\r
274 typedef struct svn_ra_reporter3_t
\r
276 /** Describe a working copy @a path as being at a particular
\r
277 * @a revision and having depth @a depth.
\r
279 * @a revision may be SVN_INVALID_REVNUM if (for example) @a path
\r
280 * represents a locally-added path with no revision number, or @a
\r
281 * depth is @c svn_depth_exclude.
\r
283 * @a path may not be underneath a path on which set_path() was
\r
284 * previously called with @c svn_depth_exclude in this report.
\r
286 * If @a start_empty is set and @a path is a directory, the
\r
287 * implementor should assume the directory has no entries or props.
\r
289 * This will *override* any previous set_path() calls made on parent
\r
290 * paths. @a path is relative to the URL specified in svn_ra_open3().
\r
292 * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
\r
294 * All temporary allocations are done in @a pool.
\r
296 svn_error_t *(*set_path)(void *report_baton,
\r
298 svn_revnum_t revision,
\r
300 svn_boolean_t start_empty,
\r
301 const char *lock_token,
\r
304 /** Describing a working copy @a path as missing.
\r
306 * @a path may not be underneath a path on which set_path() was
\r
307 * previously called with @c svn_depth_exclude in this report.
\r
309 * All temporary allocations are done in @a pool.
\r
311 svn_error_t *(*delete_path)(void *report_baton,
\r
315 /** Like set_path(), but differs in that @a path in the working copy
\r
316 * (relative to the root of the report driver) isn't a reflection of
\r
317 * @a path in the repository (relative to the URL specified when
\r
318 * opening the RA layer), but is instead a reflection of a different
\r
319 * repository @a url at @a revision, and has depth @a depth.
\r
321 * @a path may not be underneath a path on which set_path() was
\r
322 * previously called with @c svn_depth_exclude in this report.
\r
324 * If @a start_empty is set and @a path is a directory,
\r
325 * the implementor should assume the directory has no entries or props.
\r
327 * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
\r
329 * All temporary allocations are done in @a pool.
\r
331 svn_error_t *(*link_path)(void *report_baton,
\r
334 svn_revnum_t revision,
\r
336 svn_boolean_t start_empty,
\r
337 const char *lock_token,
\r
340 /** WC calls this when the state report is finished; any directories
\r
341 * or files not explicitly `set' are assumed to be at the
\r
342 * baseline revision originally passed into do_update(). No other
\r
343 * reporting functions, including abort_report, should be called after
\r
344 * calling this function.
\r
346 svn_error_t *(*finish_report)(void *report_baton,
\r
349 /** If an error occurs during a report, this routine should cause the
\r
350 * filesystem transaction to be aborted & cleaned up. No other reporting
\r
351 * functions should be called after calling this function.
\r
353 svn_error_t *(*abort_report)(void *report_baton,
\r
356 } svn_ra_reporter3_t;
\r
359 * Similar to @c svn_ra_reporter3_t, but without support for depths.
\r
361 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
363 typedef struct svn_ra_reporter2_t
\r
365 /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
\r
366 * with @a depth always set to @c svn_depth_infinity. */
\r
367 svn_error_t *(*set_path)(void *report_baton,
\r
369 svn_revnum_t revision,
\r
370 svn_boolean_t start_empty,
\r
371 const char *lock_token,
\r
374 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
\r
375 svn_error_t *(*delete_path)(void *report_baton,
\r
379 /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
\r
380 * with @a depth always set to @c svn_depth_infinity. */
\r
381 svn_error_t *(*link_path)(void *report_baton,
\r
384 svn_revnum_t revision,
\r
385 svn_boolean_t start_empty,
\r
386 const char *lock_token,
\r
389 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
\r
390 svn_error_t *(*finish_report)(void *report_baton,
\r
393 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
\r
394 svn_error_t *(*abort_report)(void *report_baton,
\r
397 } svn_ra_reporter2_t;
\r
400 * Similar to @c svn_ra_reporter2_t, but without support for lock tokens.
\r
402 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
404 typedef struct svn_ra_reporter_t
\r
406 /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
\r
407 * with @a lock_token always set to NULL. */
\r
408 svn_error_t *(*set_path)(void *report_baton,
\r
410 svn_revnum_t revision,
\r
411 svn_boolean_t start_empty,
\r
414 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
\r
415 svn_error_t *(*delete_path)(void *report_baton,
\r
419 /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
\r
420 * with @a lock_token always set to NULL. */
\r
421 svn_error_t *(*link_path)(void *report_baton,
\r
424 svn_revnum_t revision,
\r
425 svn_boolean_t start_empty,
\r
428 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
\r
429 svn_error_t *(*finish_report)(void *report_baton,
\r
432 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
\r
433 svn_error_t *(*abort_report)(void *report_baton,
\r
435 } svn_ra_reporter_t;
\r
438 /** A collection of callbacks implemented by libsvn_client which allows
\r
439 * an RA layer to "pull" information from the client application, or
\r
440 * possibly store information. libsvn_client passes this vtable to
\r
443 * Each routine takes a @a callback_baton originally provided with the
\r
446 * Clients must use svn_ra_create_callbacks() to allocate and
\r
447 * initialize this structure.
\r
449 * @since New in 1.3.
\r
451 typedef struct svn_ra_callbacks2_t
\r
453 /** Open a unique temporary file for writing in the working copy.
\r
454 * This file will be automatically deleted when @a fp is closed.
\r
456 * @deprecated This callback should no longer be used by RA layers.
\r
458 svn_error_t *(*open_tmp_file)(apr_file_t **fp,
\r
459 void *callback_baton,
\r
462 /** An authentication baton, created by the application, which is
\r
463 * capable of retrieving all known types of credentials.
\r
465 svn_auth_baton_t *auth_baton;
\r
467 /*** The following items may be set to NULL to disallow the RA layer
\r
468 to perform the respective operations of the vtable functions.
\r
469 Perhaps WC props are not defined or are in invalid for this
\r
470 session, or perhaps the commit operation this RA session will
\r
471 perform is a server-side only one that shouldn't do post-commit
\r
472 processing on a working copy path. ***/
\r
474 /** Fetch working copy properties.
\r
476 *<pre> ### we might have a problem if the RA layer ever wants a property
\r
477 * ### that corresponds to a different revision of the file than
\r
478 * ### what is in the WC. we'll cross that bridge one day...</pre>
\r
480 svn_ra_get_wc_prop_func_t get_wc_prop;
\r
482 /** Immediately set new values for working copy properties. */
\r
483 svn_ra_set_wc_prop_func_t set_wc_prop;
\r
485 /** Schedule new values for working copy properties. */
\r
486 svn_ra_push_wc_prop_func_t push_wc_prop;
\r
488 /** Invalidate working copy properties. */
\r
489 svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
\r
491 /** Notification callback used for progress information.
\r
492 * May be NULL if not used.
\r
494 svn_ra_progress_notify_func_t progress_func;
\r
496 /** Notification callback baton, used with progress_func. */
\r
497 void *progress_baton;
\r
499 /** Cancelation function
\r
501 * As its baton, the general callback baton is used
\r
503 * @since New in 1.5
\r
505 svn_cancel_func_t cancel_func;
\r
507 /** Client string customization callback function
\r
508 * @since New in 1.5
\r
510 svn_ra_get_client_string_func_t get_client_string;
\r
512 } svn_ra_callbacks2_t;
\r
514 /** Similar to svn_ra_callbacks2_t, except that the progress
\r
515 * notification function and baton is missing.
\r
517 * @deprecated Provided for backward compatibility with the 1.2 API.
\r
519 typedef struct svn_ra_callbacks_t
\r
521 svn_error_t *(*open_tmp_file)(apr_file_t **fp,
\r
522 void *callback_baton,
\r
525 svn_auth_baton_t *auth_baton;
\r
527 svn_ra_get_wc_prop_func_t get_wc_prop;
\r
529 svn_ra_set_wc_prop_func_t set_wc_prop;
\r
531 svn_ra_push_wc_prop_func_t push_wc_prop;
\r
533 svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
\r
535 } svn_ra_callbacks_t;
\r
539 /*----------------------------------------------------------------------*/
\r
541 /* Public Interfaces. */
\r
544 * Initialize the RA library. This function must be called before using
\r
545 * any function in this header, except the deprecated APIs based on
\r
546 * @c svn_ra_plugin_t, or svn_ra_version(). This function must not be called
\r
547 * simultaneously in multiple threads. @a pool must live
\r
548 * longer than any open RA sessions.
\r
550 * @since New in 1.2.
\r
553 svn_ra_initialize(apr_pool_t *pool);
\r
555 /** Initialize a callback structure.
\r
556 * Set @a *callbacks to a ra callbacks object, allocated in @a pool.
\r
558 * Clients must use this function to allocate and initialize @c
\r
559 * svn_ra_callbacks2_t structures.
\r
561 * @since New in 1.3.
\r
564 svn_ra_create_callbacks(svn_ra_callbacks2_t **callbacks,
\r
568 * A repository access session. This object is used to perform requests
\r
569 * to a repository, identified by an URL.
\r
571 * @since New in 1.2.
\r
573 typedef struct svn_ra_session_t svn_ra_session_t;
\r
576 * Open a repository session to @a repos_URL. Return an opaque object
\r
577 * representing this session in @a *session_p, allocated in @a pool.
\r
579 * Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
\r
580 * to the UUID of the repository at @c repos_URL.
\r
582 * @a callbacks/@a callback_baton is a table of callbacks provided by the
\r
583 * client; see @c svn_ra_callbacks2_t.
\r
585 * @a config is a hash mapping <tt>const char *</tt> keys to
\r
586 * @c svn_config_t * values. For example, the @c svn_config_t for the
\r
587 * "~/.subversion/config" file is under the key "config".
\r
589 * All RA requests require a session; they will continue to
\r
590 * use @a pool for memory allocation.
\r
592 * @see svn_client_open_ra_session().
\r
594 * @since New in 1.5.
\r
597 svn_ra_open3(svn_ra_session_t **session_p,
\r
598 const char *repos_URL,
\r
600 const svn_ra_callbacks2_t *callbacks,
\r
601 void *callback_baton,
\r
602 apr_hash_t *config,
\r
606 * Similiar to svn_ra_open3(), but with @a uuid set to @c NULL.
\r
608 * @since New in 1.3.
\r
609 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
613 svn_ra_open2(svn_ra_session_t **session_p,
\r
614 const char *repos_URL,
\r
615 const svn_ra_callbacks2_t *callbacks,
\r
616 void *callback_baton,
\r
617 apr_hash_t *config,
\r
621 * @see svn_ra_open2().
\r
622 * @since New in 1.2.
\r
623 * @deprecated Provided for backward compatibility with the 1.2 API.
\r
627 svn_ra_open(svn_ra_session_t **session_p,
\r
628 const char *repos_URL,
\r
629 const svn_ra_callbacks_t *callbacks,
\r
630 void *callback_baton,
\r
631 apr_hash_t *config,
\r
634 /** Change the root URL of an open @a ra_session to point to a new path in the
\r
635 * same repository. @a url is the new root URL. Use @a pool for
\r
636 * temporary allocations.
\r
638 * If @a url has a different repository root than the current session
\r
639 * URL, return @c SVN_ERR_RA_ILLEGAL_URL.
\r
641 * @since New in 1.4.
\r
644 svn_ra_reparent(svn_ra_session_t *ra_session,
\r
648 /** Set @a *url to the repository URL to which @a ra_session was
\r
649 * opened or most recently reparented.
\r
652 svn_ra_get_session_url(svn_ra_session_t *ra_session,
\r
658 * Get the latest revision number from the repository of @a session.
\r
660 * Use @a pool for memory allocation.
\r
662 * @since New in 1.2.
\r
665 svn_ra_get_latest_revnum(svn_ra_session_t *session,
\r
666 svn_revnum_t *latest_revnum,
\r
670 * Get the latest revision number at time @a tm in the repository of
\r
673 * Use @a pool for memory allocation.
\r
675 * @since New in 1.2.
\r
678 svn_ra_get_dated_revision(svn_ra_session_t *session,
\r
679 svn_revnum_t *revision,
\r
684 * Set the property @a name to @a value on revision @a rev in the repository
\r
687 * If @a value is @c NULL, delete the named revision property.
\r
689 * Please note that properties attached to revisions are @em unversioned.
\r
691 * Use @a pool for memory allocation.
\r
693 * @since New in 1.2.
\r
696 svn_ra_change_rev_prop(svn_ra_session_t *session,
\r
699 const svn_string_t *value,
\r
703 * Set @a *props to the list of unversioned properties attached to revision
\r
704 * @a rev in the repository of @a session. The hash maps
\r
705 * (<tt>const char *</tt>) names to (<tt>@c svn_string_t *</tt>) values.
\r
707 * Use @a pool for memory allocation.
\r
709 * @since New in 1.2.
\r
712 svn_ra_rev_proplist(svn_ra_session_t *session,
\r
714 apr_hash_t **props,
\r
718 * Set @a *value to the value of unversioned property @a name attached to
\r
719 * revision @a rev in the repository of @a session. If @a rev has no
\r
720 * property by that name, set @a *value to @c NULL.
\r
722 * Use @a pool for memory allocation.
\r
724 * @since New in 1.2.
\r
727 svn_ra_rev_prop(svn_ra_session_t *session,
\r
730 svn_string_t **value,
\r
734 * Set @a *editor and @a *edit_baton to an editor for committing
\r
735 * changes to the repository of @a session, setting the revision
\r
736 * properties from @a revprop_table. The revisions being committed
\r
737 * against are passed to the editor functions, starting with the rev
\r
738 * argument to @c open_root. The path root of the commit is the @a
\r
741 * @a revprop_table is a hash mapping <tt>const char *</tt> property
\r
742 * names to @c svn_string_t property values. The commit log message
\r
743 * is expected to be in the @c SVN_PROP_REVISION_LOG element. @a
\r
744 * revprop_table can not contain either of @c SVN_PROP_REVISION_DATE
\r
745 * or @c SVN_PROP_REVISION_AUTHOR.
\r
747 * Before @c close_edit returns, but after the commit has succeeded,
\r
748 * it will invoke @a callback with the new revision number, the
\r
749 * commit date (as a <tt>const char *</tt>), commit author (as a
\r
750 * <tt>const char *</tt>), and @a callback_baton as arguments. If
\r
751 * @a callback returns an error, that error will be returned from @c
\r
752 * close_edit, otherwise @c close_edit will return successfully
\r
753 * (unless it encountered an error before invoking @a callback).
\r
755 * The callback will not be called if the commit was a no-op
\r
756 * (i.e. nothing was committed);
\r
758 * @a lock_tokens, if non-NULL, is a hash mapping <tt>const char
\r
759 * *</tt> paths (relative to the URL of @a session) to <tt>
\r
760 * const char *</tt> lock tokens. The server checks that the
\r
761 * correct token is provided for each committed, locked path. @a lock_tokens
\r
762 * must live during the whole commit operation.
\r
764 * If @a keep_locks is @c TRUE, then do not release locks on
\r
765 * committed objects. Else, automatically release such locks.
\r
767 * The caller may not perform any RA operations using @a session before
\r
768 * finishing the edit.
\r
770 * Use @a pool for memory allocation.
\r
772 * @since New in 1.5.
\r
775 svn_ra_get_commit_editor3(svn_ra_session_t *session,
\r
776 const svn_delta_editor_t **editor,
\r
778 apr_hash_t *revprop_table,
\r
779 svn_commit_callback2_t callback,
\r
780 void *callback_baton,
\r
781 apr_hash_t *lock_tokens,
\r
782 svn_boolean_t keep_locks,
\r
786 * Same as svn_ra_get_commit_editor3(), but with @c revprop_table set
\r
787 * to a hash containing the @c SVN_PROP_REVISION_LOG property set
\r
788 * to the value of @a log_msg.
\r
790 * @since New in 1.4.
\r
792 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
796 svn_ra_get_commit_editor2(svn_ra_session_t *session,
\r
797 const svn_delta_editor_t **editor,
\r
799 const char *log_msg,
\r
800 svn_commit_callback2_t callback,
\r
801 void *callback_baton,
\r
802 apr_hash_t *lock_tokens,
\r
803 svn_boolean_t keep_locks,
\r
807 * Same as svn_ra_get_commit_editor2(), but uses @c svn_commit_callback_t.
\r
809 * @since New in 1.2.
\r
811 * @deprecated Provided for backward compatibility with the 1.3 API.
\r
815 svn_ra_get_commit_editor(svn_ra_session_t *session,
\r
816 const svn_delta_editor_t **editor,
\r
818 const char *log_msg,
\r
819 svn_commit_callback_t callback,
\r
820 void *callback_baton,
\r
821 apr_hash_t *lock_tokens,
\r
822 svn_boolean_t keep_locks,
\r
826 * Fetch the contents and properties of file @a path at @a revision.
\r
827 * @a revision may be SVN_INVALID_REVNUM, indicating that the HEAD
\r
828 * revision should be used. Interpret @a path relative to the URL in
\r
829 * @a session. Use @a pool for all allocations.
\r
831 * If @a revision is @c SVN_INVALID_REVNUM and @a fetched_rev is not
\r
832 * @c NULL, then set @a *fetched_rev to the actual revision that was
\r
835 * If @a stream is non @c NULL, push the contents of the file at @a
\r
836 * stream, do not call svn_stream_close() when finished.
\r
838 * If @a props is non @c NULL, set @a *props to contain the properties of
\r
839 * the file. This means @em all properties: not just ones controlled by
\r
840 * the user and stored in the repository fs, but non-tweakable ones
\r
841 * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
\r
842 * etc.) The keys are <tt>const char *</tt>, values are
\r
843 * <tt>@c svn_string_t *</tt>.
\r
845 * The stream handlers for @a stream may not perform any RA
\r
846 * operations using @a session.
\r
848 * @since New in 1.2.
\r
851 svn_ra_get_file(svn_ra_session_t *session,
\r
853 svn_revnum_t revision,
\r
854 svn_stream_t *stream,
\r
855 svn_revnum_t *fetched_rev,
\r
856 apr_hash_t **props,
\r
860 * If @a dirents is non @c NULL, set @a *dirents to contain all the entries
\r
861 * of directory @a path at @a revision. The keys of @a dirents will be
\r
862 * entry names (<tt>const char *</tt>), and the values dirents
\r
863 * (<tt>@c svn_dirent_t *</tt>). Use @a pool for all allocations.
\r
865 * @a dirent_fields controls which portions of the <tt>@c svn_dirent_t</tt>
\r
866 * objects are filled in. To have them completely filled in just pass
\r
867 * @c SVN_DIRENT_ALL, otherwise pass the bitwise OR of all the @c SVN_DIRENT_
\r
868 * fields you would like to have returned to you.
\r
870 * @a path is interpreted relative to the URL in @a session.
\r
872 * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
\r
873 * @a *fetched_rev is not @c NULL, then this function will set
\r
874 * @a *fetched_rev to the actual revision that was retrieved. (Some
\r
875 * callers want to know, and some don't.)
\r
877 * If @a props is non @c NULL, set @a *props to contain the properties of
\r
878 * the directory. This means @em all properties: not just ones controlled by
\r
879 * the user and stored in the repository fs, but non-tweakable ones
\r
880 * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
\r
881 * etc.) The keys are <tt>const char *</tt>, values are
\r
882 * <tt>@c svn_string_t *</tt>.
\r
884 * @since New in 1.4.
\r
887 svn_ra_get_dir2(svn_ra_session_t *session,
\r
888 apr_hash_t **dirents,
\r
889 svn_revnum_t *fetched_rev,
\r
890 apr_hash_t **props,
\r
892 svn_revnum_t revision,
\r
893 apr_uint32_t dirent_fields,
\r
897 * Similar to @c svn_ra_get_dir2, but with @c SVN_DIRENT_ALL for the
\r
898 * @a dirent_fields parameter.
\r
900 * @since New in 1.2.
\r
902 * @deprecated Provided for compatibility with the 1.3 API.
\r
906 svn_ra_get_dir(svn_ra_session_t *session,
\r
908 svn_revnum_t revision,
\r
909 apr_hash_t **dirents,
\r
910 svn_revnum_t *fetched_rev,
\r
911 apr_hash_t **props,
\r
915 * Set @a *catalog to a mergeinfo catalog for the paths in @a paths.
\r
916 * If no mergeinfo is available, set @a *catalog to @c NULL. The
\r
917 * requested mergeinfo hashes are for @a paths (which are relative to
\r
918 * @a session's URL) in @a revision. If one of the paths does not exist
\r
919 * in that revision, return SVN_ERR_FS_NOT_FOUND.
\r
921 * @a inherit indicates whether explicit, explicit or inherited, or
\r
922 * only inherited mergeinfo for @a paths is retrieved.
\r
924 * If @a include_descendants is TRUE, then additionally return the
\r
925 * mergeinfo for any descendant of any element of @a paths which has
\r
926 * the @c SVN_PROP_MERGEINFO property explicitly set on it. (Note
\r
927 * that inheritance is only taken into account for the elements in @a
\r
928 * paths; descendants of the elements in @a paths which get their
\r
929 * mergeinfo via inheritance are not included in @a *catalog.)
\r
931 * Allocate the returned values in @a pool.
\r
933 * If @a revision is @c SVN_INVALID_REVNUM, it defaults to youngest.
\r
935 * If the server doesn't support retrieval of mergeinfo (which can
\r
936 * happen even for file:// URLs, if the repository itself hasn't been
\r
937 * upgraded), return @c SVN_ERR_UNSUPPORTED_FEATURE in preference to
\r
938 * any other error that might otherwise be returned.
\r
940 * @since New in 1.5.
\r
943 svn_ra_get_mergeinfo(svn_ra_session_t *session,
\r
944 svn_mergeinfo_catalog_t *catalog,
\r
945 const apr_array_header_t *paths,
\r
946 svn_revnum_t revision,
\r
947 svn_mergeinfo_inheritance_t inherit,
\r
948 svn_boolean_t include_descendants,
\r
952 * Ask the RA layer to update a working copy.
\r
954 * The client initially provides an @a update_editor/@a update_baton to the
\r
955 * RA layer; this editor contains knowledge of where the change will
\r
956 * begin in the working copy (when @c open_root() is called).
\r
958 * In return, the client receives a @a reporter/@a report_baton. The
\r
959 * client then describes its working copy by making calls into the
\r
962 * When finished, the client calls @a reporter->finish_report(). The
\r
963 * RA layer then does a complete drive of @a update_editor, ending with
\r
964 * @a update_editor->close_edit(), to update the working copy.
\r
966 * @a update_target is an optional single path component to restrict
\r
967 * the scope of the update to just that entry (in the directory
\r
968 * represented by the @a session's URL). If @a update_target is the
\r
969 * empty string, the entire directory is updated.
\r
971 * Update the target only as deeply as @a depth indicates.
\r
973 * If @a send_copyfrom_args is TRUE, then ask the server to send
\r
974 * copyfrom arguments to add_file() and add_directory() when possible.
\r
975 * (Note: this means that any subsequent txdeltas coming from the
\r
976 * server are presumed to apply against the copied file!)
\r
978 * The working copy will be updated to @a revision_to_update_to, or the
\r
979 * "latest" revision if this arg is invalid.
\r
981 * The caller may not perform any RA operations using @a session before
\r
982 * finishing the report, and may not perform any RA operations using
\r
983 * @a session from within the editing operations of @a update_editor.
\r
985 * Use @a pool for memory allocation.
\r
987 * @note The reporter provided by this function does NOT supply copy-
\r
988 * from information to the diff editor callbacks.
\r
990 * @note In order to prevent pre-1.5 servers from doing more work than
\r
991 * needed, and sending too much data back, a pre-1.5 'recurse'
\r
992 * directive may be sent to the server, based on @a depth.
\r
994 * @since New in 1.5.
\r
997 svn_ra_do_update2(svn_ra_session_t *session,
\r
998 const svn_ra_reporter3_t **reporter,
\r
999 void **report_baton,
\r
1000 svn_revnum_t revision_to_update_to,
\r
1001 const char *update_target,
\r
1002 svn_depth_t depth,
\r
1003 svn_boolean_t send_copyfrom_args,
\r
1004 const svn_delta_editor_t *update_editor,
\r
1005 void *update_baton,
\r
1006 apr_pool_t *pool);
\r
1009 * Similar to svn_ra_do_update2(), but taking @c svn_ra_reporter2_t
\r
1010 * instead of @c svn_ra_reporter3_t; if @a recurse is true, pass @c
\r
1011 * svn_depth_infinity for @a depth, else pass @c svn_depth_files; and
\r
1012 * with @a send_copyfrom_args always false.
\r
1014 * @deprecated Provided for compatibility with the 1.4 API.
\r
1018 svn_ra_do_update(svn_ra_session_t *session,
\r
1019 const svn_ra_reporter2_t **reporter,
\r
1020 void **report_baton,
\r
1021 svn_revnum_t revision_to_update_to,
\r
1022 const char *update_target,
\r
1023 svn_boolean_t recurse,
\r
1024 const svn_delta_editor_t *update_editor,
\r
1025 void *update_baton,
\r
1026 apr_pool_t *pool);
\r
1030 * Ask the RA layer to 'switch' a working copy to a new
\r
1031 * @a switch_url; it's another form of svn_ra_do_update().
\r
1033 * The client initially provides a @a switch_editor/@a switch_baton to the RA
\r
1034 * layer; this editor contains knowledge of where the change will
\r
1035 * begin in the working copy (when open_root() is called).
\r
1037 * In return, the client receives a @a reporter/@a report_baton. The
\r
1038 * client then describes its working copy by making calls into the
\r
1041 * When finished, the client calls @a reporter->finish_report(). The
\r
1042 * RA layer then does a complete drive of @a switch_editor, ending with
\r
1043 * close_edit(), to switch the working copy.
\r
1045 * @a switch_target is an optional single path component will restrict
\r
1046 * the scope of things affected by the switch to an entry in the
\r
1047 * directory represented by the @a session's URL, or empty if the
\r
1048 * entire directory is meant to be switched.
\r
1050 * Switch the target only as deeply as @a depth indicates.
\r
1052 * The working copy will be switched to @a revision_to_switch_to, or the
\r
1053 * "latest" revision if this arg is invalid.
\r
1055 * The caller may not perform any RA operations using
\r
1056 * @a session before finishing the report, and may not perform
\r
1057 * any RA operations using @a session from within the editing
\r
1058 * operations of @a switch_editor.
\r
1060 * Use @a pool for memory allocation.
\r
1062 * @note The reporter provided by this function does NOT supply copy-
\r
1063 * from information to the diff editor callbacks.
\r
1065 * @note In order to prevent pre-1.5 servers from doing more work than
\r
1066 * needed, and sending too much data back, a pre-1.5 'recurse'
\r
1067 * directive may be sent to the server, based on @a depth.
\r
1069 * @since New in 1.5.
\r
1072 svn_ra_do_switch2(svn_ra_session_t *session,
\r
1073 const svn_ra_reporter3_t **reporter,
\r
1074 void **report_baton,
\r
1075 svn_revnum_t revision_to_switch_to,
\r
1076 const char *switch_target,
\r
1077 svn_depth_t depth,
\r
1078 const char *switch_url,
\r
1079 const svn_delta_editor_t *switch_editor,
\r
1080 void *switch_baton,
\r
1081 apr_pool_t *pool);
\r
1084 * Similar to svn_ra_do_switch2(), but taking @c svn_ra_reporter2_t
\r
1085 * instead of @c svn_ra_reporter3_t, and therefore only able to report
\r
1086 * @c svn_depth_infinity for depths. The switch itself is performed
\r
1087 * according to @a recurse: if TRUE, then use @c svn_depth_infinity
\r
1088 * for @a depth, else use @c svn_depth_files.
\r
1090 * @deprecated Provided for compatibility with the 1.4 API.
\r
1094 svn_ra_do_switch(svn_ra_session_t *session,
\r
1095 const svn_ra_reporter2_t **reporter,
\r
1096 void **report_baton,
\r
1097 svn_revnum_t revision_to_switch_to,
\r
1098 const char *switch_target,
\r
1099 svn_boolean_t recurse,
\r
1100 const char *switch_url,
\r
1101 const svn_delta_editor_t *switch_editor,
\r
1102 void *switch_baton,
\r
1103 apr_pool_t *pool);
\r
1106 * Ask the RA layer to describe the status of a working copy with respect
\r
1107 * to @a revision of the repository (or HEAD, if @a revision is invalid).
\r
1109 * The client initially provides a @a status_editor/@a status_baton to the RA
\r
1110 * layer; this editor contains knowledge of where the change will
\r
1111 * begin in the working copy (when open_root() is called).
\r
1113 * In return, the client receives a @a reporter/@a report_baton. The
\r
1114 * client then describes its working copy by making calls into the
\r
1117 * When finished, the client calls @a reporter->finish_report(). The RA
\r
1118 * layer then does a complete drive of @a status_editor, ending with
\r
1119 * close_edit(), to report, essentially, what would be modified in
\r
1120 * the working copy were the client to call do_update().
\r
1121 * @a status_target is an optional single path component will restrict
\r
1122 * the scope of the status report to an entry in the directory
\r
1123 * represented by the @a session's URL, or empty if the entire directory
\r
1124 * is meant to be examined.
\r
1126 * Get status only as deeply as @a depth indicates.
\r
1128 * The caller may not perform any RA operations using @a session
\r
1129 * before finishing the report, and may not perform any RA operations
\r
1130 * using @a session from within the editing operations of @a status_editor.
\r
1132 * Use @a pool for memory allocation.
\r
1134 * @note The reporter provided by this function does NOT supply copy-
\r
1135 * from information to the diff editor callbacks.
\r
1137 * @note In order to prevent pre-1.5 servers from doing more work than
\r
1138 * needed, and sending too much data back, a pre-1.5 'recurse'
\r
1139 * directive may be sent to the server, based on @a depth.
\r
1141 * @since New in 1.5.
\r
1144 svn_ra_do_status2(svn_ra_session_t *session,
\r
1145 const svn_ra_reporter3_t **reporter,
\r
1146 void **report_baton,
\r
1147 const char *status_target,
\r
1148 svn_revnum_t revision,
\r
1149 svn_depth_t depth,
\r
1150 const svn_delta_editor_t *status_editor,
\r
1151 void *status_baton,
\r
1152 apr_pool_t *pool);
\r
1156 * Similar to svn_ra_do_status2(), but taking @c svn_ra_reporter2_t
\r
1157 * instead of @c svn_ra_reporter3_t, and therefore only able to report
\r
1158 * @c svn_depth_infinity for depths. The status operation itself is
\r
1159 * performed according to @a recurse: if TRUE, then @a depth is
\r
1160 * @c svn_depth_infinity, else it is @c svn_depth_immediates.
\r
1162 * @deprecated Provided for compatibility with the 1.4 API.
\r
1166 svn_ra_do_status(svn_ra_session_t *session,
\r
1167 const svn_ra_reporter2_t **reporter,
\r
1168 void **report_baton,
\r
1169 const char *status_target,
\r
1170 svn_revnum_t revision,
\r
1171 svn_boolean_t recurse,
\r
1172 const svn_delta_editor_t *status_editor,
\r
1173 void *status_baton,
\r
1174 apr_pool_t *pool);
\r
1177 * Ask the RA layer to 'diff' a working copy against @a versus_url;
\r
1178 * it's another form of svn_ra_do_update2().
\r
1180 * @note This function cannot be used to diff a single file, only a
\r
1181 * working copy directory. See the svn_ra_do_switch2() function
\r
1182 * for more details.
\r
1184 * The client initially provides a @a diff_editor/@a diff_baton to the RA
\r
1185 * layer; this editor contains knowledge of where the common diff
\r
1186 * root is in the working copy (when open_root() is called).
\r
1188 * In return, the client receives a @a reporter/@a report_baton. The
\r
1189 * client then describes its working copy by making calls into the
\r
1192 * When finished, the client calls @a reporter->finish_report(). The
\r
1193 * RA layer then does a complete drive of @a diff_editor, ending with
\r
1194 * close_edit(), to transmit the diff.
\r
1196 * @a diff_target is an optional single path component will restrict
\r
1197 * the scope of the diff to an entry in the directory represented by
\r
1198 * the @a session's URL, or empty if the entire directory is meant to be
\r
1199 * one of the diff paths.
\r
1201 * The working copy will be diffed against @a versus_url as it exists
\r
1202 * in revision @a revision, or as it is in head if @a revision is
\r
1203 * @c SVN_INVALID_REVNUM.
\r
1205 * Use @a ignore_ancestry to control whether or not items being
\r
1206 * diffed will be checked for relatedness first. Unrelated items
\r
1207 * are typically transmitted to the editor as a deletion of one thing
\r
1208 * and the addition of another, but if this flag is @c TRUE,
\r
1209 * unrelated items will be diffed as if they were related.
\r
1211 * Diff only as deeply as @a depth indicates.
\r
1213 * The caller may not perform any RA operations using @a session before
\r
1214 * finishing the report, and may not perform any RA operations using
\r
1215 * @a session from within the editing operations of @a diff_editor.
\r
1217 * @a text_deltas instructs the driver of the @a diff_editor to enable
\r
1218 * the generation of text deltas. If @a text_deltas is FALSE the window
\r
1219 * handler returned by apply_textdelta will be called once with a NULL
\r
1220 * @c svn_txdelta_window_t pointer.
\r
1222 * Use @a pool for memory allocation.
\r
1224 * @note The reporter provided by this function does NOT supply copy-
\r
1225 * from information to the diff editor callbacks.
\r
1227 * @note In order to prevent pre-1.5 servers from doing more work than
\r
1228 * needed, and sending too much data back, a pre-1.5 'recurse'
\r
1229 * directive may be sent to the server, based on @a depth.
\r
1231 * @since New in 1.5.
\r
1234 svn_ra_do_diff3(svn_ra_session_t *session,
\r
1235 const svn_ra_reporter3_t **reporter,
\r
1236 void **report_baton,
\r
1237 svn_revnum_t revision,
\r
1238 const char *diff_target,
\r
1239 svn_depth_t depth,
\r
1240 svn_boolean_t ignore_ancestry,
\r
1241 svn_boolean_t text_deltas,
\r
1242 const char *versus_url,
\r
1243 const svn_delta_editor_t *diff_editor,
\r
1245 apr_pool_t *pool);
\r
1248 * Similar to svn_ra_do_diff3(), but taking @c svn_ra_reporter2_t
\r
1249 * instead of @c svn_ra_reporter3_t, and therefore only able to report
\r
1250 * @c svn_depth_infinity for depths. Perform the diff according to
\r
1251 * @a recurse: if TRUE, then @a depth is @c svn_depth_infinity, else
\r
1252 * it is @c svn_depth_files.
\r
1254 * @deprecated Provided for compatibility with the 1.4 API.
\r
1258 svn_ra_do_diff2(svn_ra_session_t *session,
\r
1259 const svn_ra_reporter2_t **reporter,
\r
1260 void **report_baton,
\r
1261 svn_revnum_t revision,
\r
1262 const char *diff_target,
\r
1263 svn_boolean_t recurse,
\r
1264 svn_boolean_t ignore_ancestry,
\r
1265 svn_boolean_t text_deltas,
\r
1266 const char *versus_url,
\r
1267 const svn_delta_editor_t *diff_editor,
\r
1269 apr_pool_t *pool);
\r
1273 * Similar to svn_ra_do_diff2(), but with @a text_deltas set to @c TRUE.
\r
1275 * @deprecated Provided for backward compatibility with the 1.3 API.
\r
1279 svn_ra_do_diff(svn_ra_session_t *session,
\r
1280 const svn_ra_reporter2_t **reporter,
\r
1281 void **report_baton,
\r
1282 svn_revnum_t revision,
\r
1283 const char *diff_target,
\r
1284 svn_boolean_t recurse,
\r
1285 svn_boolean_t ignore_ancestry,
\r
1286 const char *versus_url,
\r
1287 const svn_delta_editor_t *diff_editor,
\r
1289 apr_pool_t *pool);
\r
1292 * Invoke @a receiver with @a receiver_baton on each log message from
\r
1293 * @a start to @a end. @a start may be greater or less than @a end;
\r
1294 * this just controls whether the log messages are processed in descending
\r
1295 * or ascending revision number order.
\r
1297 * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest.
\r
1299 * If @a paths is non-NULL and has one or more elements, then only show
\r
1300 * revisions in which at least one of @a paths was changed (i.e., if
\r
1301 * file, text or props changed; if dir, props changed or an entry
\r
1302 * was added or deleted). Each path is an <tt>const char *</tt>, relative
\r
1303 * to the @a session's common parent.
\r
1305 * If @a limit is non-zero only invoke @a receiver on the first @a limit
\r
1308 * If @a discover_changed_paths, then each call to receiver passes a
\r
1309 * <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
\r
1310 * the hash's keys are all the paths committed in that revision.
\r
1311 * Otherwise, each call to receiver passes NULL for @a changed_paths.
\r
1313 * If @a strict_node_history is set, copy history will not be traversed
\r
1314 * (if any exists) when harvesting the revision logs for each path.
\r
1316 * If @a include_merged_revisions is set, log information for revisions
\r
1317 * which have been merged to @a targets will also be returned.
\r
1319 * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
\r
1320 * revprops named in the array (i.e. retrieve none if the array is empty).
\r
1322 * If any invocation of @a receiver returns error, return that error
\r
1323 * immediately and without wrapping it.
\r
1325 * If @a start or @a end is a non-existent revision, return the error
\r
1326 * @c SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
\r
1328 * See also the documentation for @c svn_log_message_receiver_t.
\r
1330 * The caller may not invoke any RA operations using @a session from
\r
1331 * within @a receiver.
\r
1333 * Use @a pool for memory allocation.
\r
1335 * @note If @a paths is NULL or empty, the result depends on the
\r
1336 * server. Pre-1.5 servers will send nothing; 1.5 servers will
\r
1337 * effectively perform the log operation on the root of the
\r
1338 * repository. This behavior may be changed in the future to ensure
\r
1339 * consistency across all pedigrees of server.
\r
1341 * @note Pre-1.5 servers do not support custom revprop retrieval; if @a
\r
1342 * revprops is NULL or contains a revprop other than svn:author, svn:date,
\r
1343 * or svn:log, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
\r
1345 * @since New in 1.5.
\r
1349 svn_ra_get_log2(svn_ra_session_t *session,
\r
1350 const apr_array_header_t *paths,
\r
1351 svn_revnum_t start,
\r
1354 svn_boolean_t discover_changed_paths,
\r
1355 svn_boolean_t strict_node_history,
\r
1356 svn_boolean_t include_merged_revisions,
\r
1357 const apr_array_header_t *revprops,
\r
1358 svn_log_entry_receiver_t receiver,
\r
1359 void *receiver_baton,
\r
1360 apr_pool_t *pool);
\r
1363 * Similar to svn_ra_get_log2(), but uses @c svn_log_message_receiver_t
\r
1364 * instead of @c svn_log_entry_receiver_t. Also, @a
\r
1365 * include_merged_revisions is set to @c FALSE and @a revprops is
\r
1366 * svn:author, svn:date, and svn:log.
\r
1368 * @since New in 1.2.
\r
1369 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
1373 svn_ra_get_log(svn_ra_session_t *session,
\r
1374 const apr_array_header_t *paths,
\r
1375 svn_revnum_t start,
\r
1378 svn_boolean_t discover_changed_paths,
\r
1379 svn_boolean_t strict_node_history,
\r
1380 svn_log_message_receiver_t receiver,
\r
1381 void *receiver_baton,
\r
1382 apr_pool_t *pool);
\r
1385 * Set @a *kind to the node kind associated with @a path at @a revision.
\r
1386 * If @a path does not exist under @a revision, set @a *kind to
\r
1387 * @c svn_node_none. @a path is relative to the @a session's parent URL.
\r
1389 * Use @a pool for memory allocation.
\r
1391 * @since New in 1.2.
\r
1394 svn_ra_check_path(svn_ra_session_t *session,
\r
1396 svn_revnum_t revision,
\r
1397 svn_node_kind_t *kind,
\r
1398 apr_pool_t *pool);
\r
1401 * Set @a *dirent to an @c svn_dirent_t associated with @a path at @a
\r
1402 * revision. @a path is relative to the @a session's parent's URL.
\r
1403 * If @a path does not exist in @a revision, set @a *dirent to NULL.
\r
1405 * Use @a pool for memory allocation.
\r
1407 * @since New in 1.2.
\r
1410 svn_ra_stat(svn_ra_session_t *session,
\r
1412 svn_revnum_t revision,
\r
1413 svn_dirent_t **dirent,
\r
1414 apr_pool_t *pool);
\r
1418 * Set @a *uuid to the repository's UUID, allocated in @a pool.
\r
1420 * @since New in 1.5.
\r
1423 svn_ra_get_uuid2(svn_ra_session_t *session,
\r
1424 const char **uuid,
\r
1425 apr_pool_t *pool);
\r
1428 * Similar to svn_ra_get_uuid2(), but returns the value allocated in
\r
1429 * @a session's pool.
\r
1431 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
1432 * @since New in 1.2.
\r
1436 svn_ra_get_uuid(svn_ra_session_t *session,
\r
1437 const char **uuid,
\r
1438 apr_pool_t *pool);
\r
1441 * Set @a *url to the repository's root URL, allocated in @a pool.
\r
1442 * The value will not include a trailing '/'. The returned URL is
\r
1443 * guaranteed to be a prefix of the @a session's URL.
\r
1445 * @since New in 1.5.
\r
1448 svn_ra_get_repos_root2(svn_ra_session_t *session,
\r
1450 apr_pool_t *pool);
\r
1454 * Similar to svn_ra_get_repos_root2(), but returns the value
\r
1455 * allocated in @a session's pool.
\r
1457 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
1458 * @since New in 1.2.
\r
1462 svn_ra_get_repos_root(svn_ra_session_t *session,
\r
1464 apr_pool_t *pool);
\r
1467 * Set @a *locations to the locations (at the repository revisions
\r
1468 * @a location_revisions) of the file identified by @a path in
\r
1469 * @a peg_revision. @a path is relative to the URL to which
\r
1470 * @a session was opened. @a location_revisions is an array of
\r
1471 * @c svn_revnum_t's. @a *locations will be a mapping from the revisions to
\r
1472 * their appropriate absolute paths. If the file doesn't exist in a
\r
1473 * location_revision, that revision will be ignored.
\r
1475 * Use @a pool for all allocations.
\r
1477 * @since New in 1.2.
\r
1480 svn_ra_get_locations(svn_ra_session_t *session,
\r
1481 apr_hash_t **locations,
\r
1483 svn_revnum_t peg_revision,
\r
1484 apr_array_header_t *location_revisions,
\r
1485 apr_pool_t *pool);
\r
1489 * Call @a receiver (with @a receiver_baton) for each segment in the
\r
1490 * location history of @a path in @a peg_revision, working backwards in
\r
1491 * time from @a start_rev to @a end_rev.
\r
1493 * @a end_rev may be @c SVN_INVALID_REVNUM to indicate that you want
\r
1494 * to trace the history of the object to its origin.
\r
1496 * @a start_rev may be @c SVN_INVALID_REVNUM to indicate "the HEAD
\r
1497 * revision". Otherwise, @a start_rev must be younger than @a end_rev
\r
1498 * (unless @a end_rev is @c SVN_INVALID_REVNUM).
\r
1500 * @a peg_revision may be @c SVN_INVALID_REVNUM to indicate "the HEAD
\r
1501 * revision", and must evaluate to be at least as young as @a start_rev.
\r
1503 * Use @a pool for all allocations.
\r
1505 * @since New in 1.5.
\r
1508 svn_ra_get_location_segments(svn_ra_session_t *session,
\r
1510 svn_revnum_t peg_revision,
\r
1511 svn_revnum_t start_rev,
\r
1512 svn_revnum_t end_rev,
\r
1513 svn_location_segment_receiver_t receiver,
\r
1514 void *receiver_baton,
\r
1515 apr_pool_t *pool);
\r
1518 * Retrieve a subset of the interesting revisions of a file @a path
\r
1519 * as seen in revision @a end (see svn_fs_history_prev() for a
\r
1520 * definition of "interesting revisions"). Invoke @a handler with
\r
1521 * @a handler_baton as its first argument for each such revision.
\r
1522 * @a session is an open RA session. Use @a pool for all allocations.
\r
1524 * If there is an interesting revision of the file that is less than or
\r
1525 * equal to @a start, the iteration will begin at that revision.
\r
1526 * Else, the iteration will begin at the first revision of the file in
\r
1527 * the repository, which has to be less than or equal to @a end. Note
\r
1528 * that if the function succeeds, @a handler will have been called at
\r
1531 * In a series of calls to @a handler, the file contents for the first
\r
1532 * interesting revision will be provided as a text delta against the
\r
1533 * empty file. In the following calls, the delta will be against the
\r
1534 * fulltext contents for the previous call.
\r
1536 * If @a include_merged_revisions is TRUE, revisions which a included as a
\r
1537 * result of a merge between @a start and @a end will be included.
\r
1539 * @note This functionality is not available in pre-1.1 servers. If the
\r
1540 * server doesn't implement it, an alternative (but much slower)
\r
1541 * implementation based on svn_ra_get_log2() is used.
\r
1543 * @since New in 1.5.
\r
1546 svn_ra_get_file_revs2(svn_ra_session_t *session,
\r
1548 svn_revnum_t start,
\r
1550 svn_boolean_t include_merged_revisions,
\r
1551 svn_file_rev_handler_t handler,
\r
1552 void *handler_baton,
\r
1553 apr_pool_t *pool);
\r
1556 * Similiar to svn_ra_get_file_revs2(), but with @a include_merged_revisions
\r
1559 * @since New in 1.2.
\r
1560 * @deprecated Provided for backward compatibility with the 1.4 API.
\r
1564 svn_ra_get_file_revs(svn_ra_session_t *session,
\r
1566 svn_revnum_t start,
\r
1568 svn_ra_file_rev_handler_t handler,
\r
1569 void *handler_baton,
\r
1570 apr_pool_t *pool);
\r
1573 * Lock each path in @a path_revs, which is a hash whose keys are the
\r
1574 * paths to be locked, and whose values are the corresponding base
\r
1575 * revisions for each path.
\r
1577 * Note that locking is never anonymous, so any server implementing
\r
1578 * this function will have to "pull" a username from the client, if
\r
1579 * it hasn't done so already.
\r
1581 * @a comment is optional: it's either an xml-escapable string
\r
1582 * which describes the lock, or it is NULL.
\r
1584 * If any path is already locked by a different user, then call @a
\r
1585 * lock_func/@a lock_baton with an error. If @a steal_lock is TRUE,
\r
1586 * then "steal" the existing lock(s) anyway, even if the RA username
\r
1587 * does not match the current lock's owner. Delete any lock on the
\r
1588 * path, and unconditionally create a new lock.
\r
1590 * For each path, if its base revision (in @a path_revs) is a valid
\r
1591 * revnum, then do an out-of-dateness check. If the revnum is less
\r
1592 * than the last-changed-revision of any path (or if a path doesn't
\r
1593 * exist in HEAD), call @a lock_func/@a lock_baton with an
\r
1594 * SVN_ERR_RA_OUT_OF_DATE error.
\r
1596 * After successfully locking a file, @a lock_func is called with the
\r
1599 * Use @a pool for temporary allocations.
\r
1601 * @since New in 1.2.
\r
1604 svn_ra_lock(svn_ra_session_t *session,
\r
1605 apr_hash_t *path_revs,
\r
1606 const char *comment,
\r
1607 svn_boolean_t steal_lock,
\r
1608 svn_ra_lock_callback_t lock_func,
\r
1610 apr_pool_t *pool);
\r
1613 * Remove the repository lock for each path in @a path_tokens.
\r
1614 * @a path_tokens is a hash whose keys are the paths to be locked, and
\r
1615 * whose values are the corresponding lock tokens for each path. If
\r
1616 * the path has no corresponding lock token, or if @a break_lock is TRUE,
\r
1617 * then the corresponding value shall be "".
\r
1619 * Note that unlocking is never anonymous, so any server
\r
1620 * implementing this function will have to "pull" a username from
\r
1621 * the client, if it hasn't done so already.
\r
1623 * If @a token points to a lock, but the RA username doesn't match the
\r
1624 * lock's owner, call @a lock_func/@a lock_baton with an error. If @a
\r
1625 * break_lock is TRUE, however, instead allow the lock to be "broken"
\r
1628 * After successfully unlocking a path, @a lock_func is called with
\r
1629 * the @a lock_baton.
\r
1631 * Use @a pool for temporary allocations.
\r
1633 * @since New in 1.2.
\r
1636 svn_ra_unlock(svn_ra_session_t *session,
\r
1637 apr_hash_t *path_tokens,
\r
1638 svn_boolean_t break_lock,
\r
1639 svn_ra_lock_callback_t lock_func,
\r
1641 apr_pool_t *pool);
\r
1644 * If @a path is locked, set @a *lock to an svn_lock_t which
\r
1645 * represents the lock, allocated in @a pool. If @a path is not
\r
1646 * locked, set @a *lock to NULL.
\r
1648 * @since New in 1.2.
\r
1651 svn_ra_get_lock(svn_ra_session_t *session,
\r
1652 svn_lock_t **lock,
\r
1654 apr_pool_t *pool);
\r
1657 * Set @a *locks to a hashtable which represents all locks on or
\r
1660 * The hashtable maps (const char *) absolute fs paths to (const
\r
1661 * svn_lock_t *) structures. The hashtable -- and all keys and
\r
1662 * values -- are allocated in @a pool.
\r
1664 * @note It is not considered an error for @a path to not exist in HEAD.
\r
1665 * Such a search will simply return no locks.
\r
1667 * @note This functionality is not available in pre-1.2 servers. If the
\r
1668 * server doesn't implement it, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is
\r
1671 * @since New in 1.2.
\r
1674 svn_ra_get_locks(svn_ra_session_t *session,
\r
1675 apr_hash_t **locks,
\r
1677 apr_pool_t *pool);
\r
1681 * Replay the changes from a range of revisions between @a start_revision
\r
1682 * and @a end_revision.
\r
1684 * When receiving information for one revision, a callback @a revstart_func is
\r
1685 * called; this callback will provide an editor and baton through which the
\r
1686 * revision will be replayed.
\r
1687 * When replaying the revision is finished, callback @a revfinish_func will be
\r
1688 * called so the editor can be closed.
\r
1690 * Changes will be limited to those that occur under @a session's URL, and
\r
1691 * the server will assume that the client has no knowledge of revisions
\r
1692 * prior to @a low_water_mark. These two limiting factors define the portion
\r
1693 * of the tree that the server will assume the client already has knowledge of,
\r
1694 * and thus any copies of data from outside that part of the tree will be
\r
1695 * sent in their entirety, not as simple copies or deltas against a previous
\r
1698 * If @a send_deltas is @c TRUE, the actual text and property changes in
\r
1699 * the revision will be sent, otherwise dummy text deltas and NULL property
\r
1700 * changes will be sent instead.
\r
1702 * @a pool is used for all allocation.
\r
1704 * @since New in 1.5.
\r
1707 svn_ra_replay_range(svn_ra_session_t *session,
\r
1708 svn_revnum_t start_revision,
\r
1709 svn_revnum_t end_revision,
\r
1710 svn_revnum_t low_water_mark,
\r
1711 svn_boolean_t send_deltas,
\r
1712 svn_ra_replay_revstart_callback_t revstart_func,
\r
1713 svn_ra_replay_revfinish_callback_t revfinish_func,
\r
1714 void *replay_baton,
\r
1715 apr_pool_t *pool);
\r
1718 * Replay the changes from @a revision through @a editor and @a edit_baton.
\r
1720 * Changes will be limited to those that occur under @a session's URL, and
\r
1721 * the server will assume that the client has no knowledge of revisions
\r
1722 * prior to @a low_water_mark. These two limiting factors define the portion
\r
1723 * of the tree that the server will assume the client already has knowledge of,
\r
1724 * and thus any copies of data from outside that part of the tree will be
\r
1725 * sent in their entirety, not as simple copies or deltas against a previous
\r
1728 * If @a send_deltas is @c TRUE, the actual text and property changes in
\r
1729 * the revision will be sent, otherwise dummy text deltas and null property
\r
1730 * changes will be sent instead.
\r
1732 * @a pool is used for all allocation.
\r
1734 * @since New in 1.4.
\r
1737 svn_ra_replay(svn_ra_session_t *session,
\r
1738 svn_revnum_t revision,
\r
1739 svn_revnum_t low_water_mark,
\r
1740 svn_boolean_t send_deltas,
\r
1741 const svn_delta_editor_t *editor,
\r
1743 apr_pool_t *pool);
\r
1746 * Set @a *has to TRUE if the server represented by @a session has
\r
1747 * @a capability (one of the capabilities beginning with
\r
1748 * @c "SVN_RA_CAPABILITY_"), else set @a *has to FALSE.
\r
1750 * If @a capability isn't recognized, throw @c SVN_ERR_UNKNOWN_CAPABILITY,
\r
1751 * with the effect on @a *has undefined.
\r
1753 * Use @a pool for all allocation.
\r
1755 * @since New in 1.5.
\r
1758 svn_ra_has_capability(svn_ra_session_t *session,
\r
1759 svn_boolean_t *has,
\r
1760 const char *capability,
\r
1761 apr_pool_t *pool);
\r
1764 * Given @a path at revision @a peg_revision, set @a *revision_deleted to the
\r
1765 * revision @a path was first deleted, within the inclusive revision range
\r
1766 * defined by @a peg_revision and @a end_revision. @a path is relative
\r
1767 * to the URL in @a session.
\r
1769 * If @a path does not exist at @a peg_revision or was not deleted within
\r
1770 * the specified range, then set @a *revision_deleted to @c SVN_INVALID_REVNUM.
\r
1771 * If @a peg_revision or @a end_revision are invalid or if @a peg_revision is
\r
1772 * greater than @a end_revision, then return @c SVN_ERR_CLIENT_BAD_REVISION.
\r
1774 * Use @a pool for all allocations.
\r
1776 * @since New in 1.6.
\r
1779 svn_ra_get_deleted_rev(svn_ra_session_t *session,
\r
1781 svn_revnum_t peg_revision,
\r
1782 svn_revnum_t end_revision,
\r
1783 svn_revnum_t *revision_deleted,
\r
1784 apr_pool_t *pool);
\r
1787 * The capability of understanding @c svn_depth_t (e.g., the server
\r
1788 * understands what the client means when the client describes the
\r
1789 * depth of a working copy to the server.)
\r
1791 * @since New in 1.5.
\r
1793 #define SVN_RA_CAPABILITY_DEPTH "depth"
\r
1796 * The capability of doing the right thing with merge-tracking
\r
1797 * information. This capability should be reported bidirectionally,
\r
1798 * because some repositories may want to reject clients that do not
\r
1799 * self-report as knowing how to handle merge-tracking.
\r
1801 * @since New in 1.5.
\r
1803 #define SVN_RA_CAPABILITY_MERGEINFO "mergeinfo"
\r
1806 * The capability of retrieving arbitrary revprops in svn_ra_get_log2.
\r
1808 * @since New in 1.5.
\r
1810 #define SVN_RA_CAPABILITY_LOG_REVPROPS "log-revprops"
\r
1813 * The capability of replaying a directory in the repository (partial replay).
\r
1815 * @since New in 1.5.
\r
1817 #define SVN_RA_CAPABILITY_PARTIAL_REPLAY "partial-replay"
\r
1820 * The capability of including revision properties in a commit.
\r
1822 * @since New in 1.5.
\r
1824 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
\r
1826 /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
\r
1828 * RA layers generally fetch all capabilities when asked about any
\r
1829 * capability, to save future round trips. So if you add a new
\r
1830 * capability here, make sure to update the RA layers to remember
\r
1831 * it after any capabilities query.
\r
1833 * Also note that capability strings should not include colons,
\r
1834 * because we pass a list of client capabilities to the start-commit
\r
1835 * hook as a single, colon-separated string.
\r
1839 * Append a textual list of all available RA modules to the stringbuf
\r
1842 * @since New in 1.2.
\r
1845 svn_ra_print_modules(svn_stringbuf_t *output,
\r
1846 apr_pool_t *pool);
\r
1850 * Similar to svn_ra_print_modules().
\r
1851 * @a ra_baton is ignored.
\r
1853 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
1857 svn_ra_print_ra_libraries(svn_stringbuf_t **descriptions,
\r
1859 apr_pool_t *pool);
\r
1864 * Using this callback struct is similar to calling the newer public
\r
1865 * interface that is based on @c svn_ra_session_t.
\r
1867 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
1869 typedef struct svn_ra_plugin_t
\r
1871 /** The proper name of the RA library, (like "ra_neon" or "ra_local") */
\r
1874 /** Short doc string printed out by `svn --version` */
\r
1875 const char *description;
\r
1877 /* The vtable hooks */
\r
1879 /** Call svn_ra_open() and set @a session_baton to an object representing
\r
1880 * the new session. All other arguments are passed to svn_ra_open().
\r
1882 svn_error_t *(*open)(void **session_baton,
\r
1883 const char *repos_URL,
\r
1884 const svn_ra_callbacks_t *callbacks,
\r
1885 void *callback_baton,
\r
1886 apr_hash_t *config,
\r
1887 apr_pool_t *pool);
\r
1889 /** Call svn_ra_get_latest_revnum() with the session associated with
\r
1890 * @a session_baton and all other arguments.
\r
1892 svn_error_t *(*get_latest_revnum)(void *session_baton,
\r
1893 svn_revnum_t *latest_revnum,
\r
1894 apr_pool_t *pool);
\r
1896 /** Call svn_ra_get_dated_revision() with the session associated with
\r
1897 * @a session_baton and all other arguments.
\r
1899 svn_error_t *(*get_dated_revision)(void *session_baton,
\r
1900 svn_revnum_t *revision,
\r
1902 apr_pool_t *pool);
\r
1904 /** Call svn_ra_change_rev_prop() with the session associated with
\r
1905 * @a session_baton and all other arguments.
\r
1907 svn_error_t *(*change_rev_prop)(void *session_baton,
\r
1910 const svn_string_t *value,
\r
1911 apr_pool_t *pool);
\r
1913 /** Call svn_ra_rev_proplist() with the session associated with
\r
1914 * @a session_baton and all other arguments.
\r
1916 svn_error_t *(*rev_proplist)(void *session_baton,
\r
1918 apr_hash_t **props,
\r
1919 apr_pool_t *pool);
\r
1921 /** Call svn_ra_rev_prop() with the session associated with
\r
1922 * @a session_baton and all other arguments.
\r
1924 svn_error_t *(*rev_prop)(void *session_baton,
\r
1927 svn_string_t **value,
\r
1928 apr_pool_t *pool);
\r
1930 /** Call svn_ra_get_commit_editor() with the session associated with
\r
1931 * @a session_baton and all other arguments plus @a lock_tokens set to
\r
1932 * @c NULL and @a keep_locks set to @c TRUE.
\r
1934 svn_error_t *(*get_commit_editor)(void *session_baton,
\r
1935 const svn_delta_editor_t **editor,
\r
1936 void **edit_baton,
\r
1937 const char *log_msg,
\r
1938 svn_commit_callback_t callback,
\r
1939 void *callback_baton,
\r
1940 apr_pool_t *pool);
\r
1942 /** Call svn_ra_get_file() with the session associated with
\r
1943 * @a session_baton and all other arguments.
\r
1945 svn_error_t *(*get_file)(void *session_baton,
\r
1947 svn_revnum_t revision,
\r
1948 svn_stream_t *stream,
\r
1949 svn_revnum_t *fetched_rev,
\r
1950 apr_hash_t **props,
\r
1951 apr_pool_t *pool);
\r
1953 /** Call svn_ra_get_dir() with the session associated with
\r
1954 * @a session_baton and all other arguments.
\r
1956 svn_error_t *(*get_dir)(void *session_baton,
\r
1958 svn_revnum_t revision,
\r
1959 apr_hash_t **dirents,
\r
1960 svn_revnum_t *fetched_rev,
\r
1961 apr_hash_t **props,
\r
1962 apr_pool_t *pool);
\r
1964 /** Call svn_ra_do_update() with the session associated with
\r
1965 * @a session_baton and all other arguments.
\r
1967 svn_error_t *(*do_update)(void *session_baton,
\r
1968 const svn_ra_reporter_t **reporter,
\r
1969 void **report_baton,
\r
1970 svn_revnum_t revision_to_update_to,
\r
1971 const char *update_target,
\r
1972 svn_boolean_t recurse,
\r
1973 const svn_delta_editor_t *update_editor,
\r
1974 void *update_baton,
\r
1975 apr_pool_t *pool);
\r
1977 /** Call svn_ra_do_switch() with the session associated with
\r
1978 * @a session_baton and all other arguments.
\r
1980 svn_error_t *(*do_switch)(void *session_baton,
\r
1981 const svn_ra_reporter_t **reporter,
\r
1982 void **report_baton,
\r
1983 svn_revnum_t revision_to_switch_to,
\r
1984 const char *switch_target,
\r
1985 svn_boolean_t recurse,
\r
1986 const char *switch_url,
\r
1987 const svn_delta_editor_t *switch_editor,
\r
1988 void *switch_baton,
\r
1989 apr_pool_t *pool);
\r
1991 /** Call svn_ra_do_status() with the session associated with
\r
1992 * @a session_baton and all other arguments.
\r
1994 svn_error_t *(*do_status)(void *session_baton,
\r
1995 const svn_ra_reporter_t **reporter,
\r
1996 void **report_baton,
\r
1997 const char *status_target,
\r
1998 svn_revnum_t revision,
\r
1999 svn_boolean_t recurse,
\r
2000 const svn_delta_editor_t *status_editor,
\r
2001 void *status_baton,
\r
2002 apr_pool_t *pool);
\r
2004 /** Call svn_ra_do_diff() with the session associated with
\r
2005 * @a session_baton and all other arguments.
\r
2007 svn_error_t *(*do_diff)(void *session_baton,
\r
2008 const svn_ra_reporter_t **reporter,
\r
2009 void **report_baton,
\r
2010 svn_revnum_t revision,
\r
2011 const char *diff_target,
\r
2012 svn_boolean_t recurse,
\r
2013 svn_boolean_t ignore_ancestry,
\r
2014 const char *versus_url,
\r
2015 const svn_delta_editor_t *diff_editor,
\r
2017 apr_pool_t *pool);
\r
2019 /** Call svn_ra_get_log() with the session associated with
\r
2020 * @a session_baton and all other arguments. @a limit is set to 0.
\r
2022 svn_error_t *(*get_log)(void *session_baton,
\r
2023 const apr_array_header_t *paths,
\r
2024 svn_revnum_t start,
\r
2026 svn_boolean_t discover_changed_paths,
\r
2027 svn_boolean_t strict_node_history,
\r
2028 svn_log_message_receiver_t receiver,
\r
2029 void *receiver_baton,
\r
2030 apr_pool_t *pool);
\r
2032 /** Call svn_ra_check_path() with the session associated with
\r
2033 * @a session_baton and all other arguments.
\r
2035 svn_error_t *(*check_path)(void *session_baton,
\r
2037 svn_revnum_t revision,
\r
2038 svn_node_kind_t *kind,
\r
2039 apr_pool_t *pool);
\r
2041 /** Call svn_ra_get_uuid() with the session associated with
\r
2042 * @a session_baton and all other arguments.
\r
2044 svn_error_t *(*get_uuid)(void *session_baton,
\r
2045 const char **uuid,
\r
2046 apr_pool_t *pool);
\r
2048 /** Call svn_ra_get_repos_root() with the session associated with
\r
2049 * @a session_baton and all other arguments.
\r
2051 svn_error_t *(*get_repos_root)(void *session_baton,
\r
2053 apr_pool_t *pool);
\r
2056 * Call svn_ra_get_locations() with the session associated with
\r
2057 * @a session_baton and all other arguments.
\r
2059 * @since New in 1.1.
\r
2061 svn_error_t *(*get_locations)(void *session_baton,
\r
2062 apr_hash_t **locations,
\r
2064 svn_revnum_t peg_revision,
\r
2065 apr_array_header_t *location_revisions,
\r
2066 apr_pool_t *pool);
\r
2069 * Call svn_ra_get_file_revs() with the session associated with
\r
2070 * @a session_baton and all other arguments.
\r
2072 * @since New in 1.1.
\r
2074 svn_error_t *(*get_file_revs)(void *session_baton,
\r
2076 svn_revnum_t start,
\r
2078 svn_ra_file_rev_handler_t handler,
\r
2079 void *handler_baton,
\r
2080 apr_pool_t *pool);
\r
2083 * Return the plugin's version information.
\r
2085 * @since New in 1.1.
\r
2087 const svn_version_t *(*get_version)(void);
\r
2090 } svn_ra_plugin_t;
\r
2093 * All "ra_FOO" implementations *must* export a function named
\r
2094 * svn_ra_FOO_init() of type @c svn_ra_init_func_t.
\r
2096 * When called by libsvn_client, this routine adds an entry (or
\r
2097 * entries) to the hash table for any URL schemes it handles. The hash
\r
2098 * value must be of type (<tt>@c svn_ra_plugin_t *</tt>). @a pool is a
\r
2099 * pool for allocating configuration / one-time data.
\r
2101 * This type is defined to use the "C Calling Conventions" to ensure that
\r
2102 * abi_version is the first parameter. The RA plugin must check that value
\r
2103 * before accessing the other parameters.
\r
2105 * ### need to force this to be __cdecl on Windows... how??
\r
2107 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
2109 typedef svn_error_t *(*svn_ra_init_func_t)(int abi_version,
\r
2111 apr_hash_t *hash);
\r
2114 * The current ABI (Application Binary Interface) version for the
\r
2115 * RA plugin model. This version number will change when the ABI
\r
2116 * between the SVN core (e.g. libsvn_client) and the RA plugin changes.
\r
2118 * An RA plugin should verify that the passed version number is acceptable
\r
2119 * before accessing the rest of the parameters, and before returning any
\r
2122 * It is entirely acceptable for an RA plugin to accept multiple ABI
\r
2123 * versions. It can simply interpret the parameters based on the version,
\r
2124 * and it can return different plugin structures.
\r
2128 * VSN DATE REASON FOR CHANGE
\r
2129 * --- ---------- ------------------------------------------------
\r
2130 * 1 2001-02-17 Initial revision.
\r
2131 * 2 2004-06-29 Preparing for svn 1.1, which adds new RA vtable funcs.
\r
2132 * 2005-01-19 Rework the plugin interface and don't provide the vtable
\r
2133 * to the client. Separate ABI versions are no longer used.
\r
2136 * @deprecated Provided for backward compatibility with the 1.0 API.
\r
2138 #define SVN_RA_ABI_VERSION 2
\r
2140 /* Public RA implementations. */
\r
2142 /** Initialize libsvn_ra_neon.
\r
2144 * @deprecated Provided for backward compatibility with the 1.1 API. */
\r
2147 svn_ra_dav_init(int abi_version,
\r
2149 apr_hash_t *hash);
\r
2151 /** Initialize libsvn_ra_local.
\r
2153 * @deprecated Provided for backward compatibility with the 1.1 API. */
\r
2156 svn_ra_local_init(int abi_version,
\r
2158 apr_hash_t *hash);
\r
2160 /** Initialize libsvn_ra_svn.
\r
2162 * @deprecated Provided for backward compatibility with the 1.1 API. */
\r
2165 svn_ra_svn_init(int abi_version,
\r
2167 apr_hash_t *hash);
\r
2169 /** Initialize libsvn_ra_serf.
\r
2171 * @since New in 1.4.
\r
2172 * @deprecated Provided for backward compatibility with the 1.1 API. */
\r
2175 svn_ra_serf_init(int abi_version,
\r
2177 apr_hash_t *hash);
\r
2181 * Initialize the compatibility wrapper, using @a pool for any allocations.
\r
2182 * The caller must hold on to @a ra_baton as long as the RA library is used.
\r
2184 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
2188 svn_ra_init_ra_libs(void **ra_baton,
\r
2189 apr_pool_t *pool);
\r
2192 * Return an RA vtable-@a library which can handle URL. A number of
\r
2193 * svn_client_* routines will call this internally, but client apps might
\r
2194 * use it too. $a ra_baton is a baton obtained by a call to
\r
2195 * svn_ra_init_ra_libs().
\r
2197 * @deprecated Provided for backward compatibility with the 1.1 API.
\r
2201 svn_ra_get_ra_library(svn_ra_plugin_t **library,
\r
2204 apr_pool_t *pool);
\r
2206 #ifdef __cplusplus
\r
2208 #endif /* __cplusplus */
\r
2210 #endif /* SVN_RA_H */
\r