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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
20 * ====================================================================
24 * @brief Repository Access
31 #include <apr_pools.h>
33 #include <apr_tables.h>
35 #include <apr_file_io.h> /* for apr_file_t */
37 #include "svn_types.h"
38 #include "svn_string.h"
39 #include "svn_delta.h"
41 #include "svn_mergeinfo.h"
45 #endif /* __cplusplus */
49 /* Misc. declarations */
52 * Get libsvn_ra version information.
60 /** This is a function type which allows the RA layer to fetch working
61 * copy (WC) properties.
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.
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.
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.
73 typedef svn_error_t *(*svn_ra_get_wc_prop_func_t)(void *baton,
76 const svn_string_t **value,
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.
85 typedef svn_error_t *(*svn_ra_set_wc_prop_func_t)(void *baton,
88 const svn_string_t *value,
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.
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.
105 typedef svn_error_t *(*svn_ra_push_wc_prop_func_t)(void *baton,
108 const svn_string_t *value,
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.
115 * Unlike @c svn_ra_push_wc_prop_func_t, this has immediate effect. If
116 * it returns success, the wcprops have been removed.
118 typedef svn_error_t *(*svn_ra_invalidate_wc_props_func_t)(void *baton,
123 /** This is a function type which allows the RA layer to fetch the
124 * cached pristine file contents whose checksum is @a checksum, if
125 * any. @a *contents will be a read stream containing those contents
126 * if they are found; NULL otherwise.
130 typedef svn_error_t *
131 (*svn_ra_get_wc_contents_func_t)(void *baton,
132 svn_stream_t **contents,
133 const svn_checksum_t *checksum,
137 /** A function type for retrieving the youngest revision from a repos.
138 * @deprecated Provided for backward compatibility with the 1.8 API.
140 /* ### It seems this type was never used by the API, since 1.0.0. */
141 typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)(
143 svn_revnum_t *latest_revnum);
145 /** A function type which allows the RA layer to ask about any
146 * customizations to the client name string. This is primarily used
147 * by HTTP-based RA layers wishing to extend the string reported to
148 * Apache/mod_dav_svn via the User-agent HTTP header.
152 typedef svn_error_t *(*svn_ra_get_client_string_func_t)(void *baton,
159 * A callback function type for use in @c get_file_revs.
160 * @a baton is provided by the caller, @a path is the pathname of the file
161 * in revision @a rev and @a rev_props are the revision properties.
162 * If @a delta_handler and @a delta_baton are non-NULL, they may be set to a
163 * handler/baton which will be called with the delta between the previous
164 * revision and this one after the return of this callback. They may be
166 * @a prop_diffs is an array of svn_prop_t elements indicating the property
167 * delta for this and the previous revision.
168 * @a pool may be used for temporary allocations, but you can't rely
169 * on objects allocated to live outside of this particular call and the
170 * immediately following calls to @a *delta_handler, if any.
174 typedef svn_error_t *(*svn_ra_file_rev_handler_t)(
178 apr_hash_t *rev_props,
179 svn_txdelta_window_handler_t *delta_handler,
181 apr_array_header_t *prop_diffs,
185 * Callback function type for locking and unlocking actions.
189 * @a do_lock is TRUE when locking @a path, and FALSE
192 * @a lock is a lock for @a path or NULL if @a do_lock is FALSE or @a ra_err is
195 * @a ra_err is NULL unless the ra layer encounters a locking related
196 * error which it passes back for notification purposes. The caller
197 * is responsible for clearing @a ra_err after the callback is run.
199 * @a baton is a closure object; it should be provided by the
200 * implementation, and passed by the caller. @a pool may be used for
201 * temporary allocation.
203 typedef svn_error_t *(*svn_ra_lock_callback_t)(void *baton,
205 svn_boolean_t do_lock,
206 const svn_lock_t *lock,
211 * Callback function type for progress notification.
213 * @a progress is the number of bytes already transferred, @a total is
214 * the total number of bytes to transfer or -1 if it's not known, @a
215 * baton is the callback baton.
219 typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
225 * Callback function type for replay_range actions.
227 * This callback function should provide replay_range with an editor which
228 * will be driven with the received replay reports from the master repository.
230 * @a revision is the target revision number of the received replay report.
232 * @a editor and @a edit_baton should provided by the callback implementation.
234 * @a replay_baton is the baton as originally passed to replay_range.
236 * @a revprops contains key/value pairs for each revision properties for this
241 typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)(
242 svn_revnum_t revision,
244 const svn_delta_editor_t **editor,
246 apr_hash_t *rev_props,
250 * Callback function type for replay_range actions.
252 * This callback function should close the editor.
254 * @a revision is the target revision number of the received replay report.
256 * @a editor and @a edit_baton should provided by the callback implementation.
258 * @a replay_baton is the baton as originally passed to replay_range.
260 * @a revprops contains key/value pairs for each revision properties for this
265 typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)(
266 svn_revnum_t revision,
268 const svn_delta_editor_t *editor,
270 apr_hash_t *rev_props,
275 * Callback function that checks if an ra_svn tunnel called
276 * @a tunnel_name is handled by the callbakcs or the default
279 * @a tunnel_baton is the baton as originally passed to ra_open.
283 typedef svn_boolean_t (*svn_ra_check_tunnel_func_t)(
284 void *tunnel_baton, const char *tunnel_name);
287 * Callback function for closing a tunnel in ra_svn.
289 * This function will be called when the pool that owns the tunnel
290 * connection is cleared or destroyed.
292 * @a close_baton is the baton as returned from the
293 * svn_ra_open_tunnel_func_t.
295 * @a tunnel_baton was returned by the open-tunnel callback.
299 typedef void (*svn_ra_close_tunnel_func_t)(
300 void *close_baton, void *tunnel_baton);
303 * Callback function for opening a tunnel in ra_svn.
305 * Given the @a tunnel_name, tunnel @a user and server @a hostname and
306 * @a port, open a tunnel to the server and return its file handles,
307 * which are owned by @a pool, in @a request and @a response.
309 * @a request and @a response represent the standard input and output,
310 * respectively, of the process on the other end of the tunnel.
312 * If @a *close_func is set it will be called with @a close_baton when
313 * the tunnel is closed.
315 * The optional @a cancel_func callback can be invoked as usual to allow
316 * the user to preempt potentially lengthy operations.
318 * @a tunnel_baton is the baton as set in the callbacks.
322 typedef svn_error_t *(*svn_ra_open_tunnel_func_t)(
323 svn_stream_t **request, svn_stream_t **response,
324 svn_ra_close_tunnel_func_t *close_func, void **close_baton,
326 const char *tunnel_name, const char *user,
327 const char *hostname, int port,
328 svn_cancel_func_t cancel_func, void *cancel_baton,
333 * The update Reporter.
335 * A vtable structure which allows a working copy to describe a subset
336 * (or possibly all) of its working-copy to an RA layer, for the
337 * purposes of an update, switch, status, or diff operation.
339 * Paths for report calls are relative to the target (not the anchor)
340 * of the operation. Report calls must be made in depth-first order:
341 * parents before children, all children of a parent before any
342 * siblings of the parent. The first report call must be a set_path
343 * with a @a path argument of "" and a valid revision. (If the target
344 * of the operation is locally deleted or missing, use the anchor's
345 * revision.) If the target of the operation is deleted or switched
346 * relative to the anchor, follow up the initial set_path call with a
347 * link_path or delete_path call with a @a path argument of "" to
348 * indicate that. In no other case may there be two report
349 * descriptions for the same path. If the target of the operation is
350 * a locally added file or directory (which previously did not exist),
351 * it may be reported as having revision 0 or as having the parent
352 * directory's revision.
356 typedef struct svn_ra_reporter3_t
358 /** Describe a working copy @a path as being at a particular
359 * @a revision and having depth @a depth.
361 * @a revision may be SVN_INVALID_REVNUM if (for example) @a path
362 * represents a locally-added path with no revision number, or @a
363 * depth is @c svn_depth_exclude.
365 * @a path may not be underneath a path on which set_path() was
366 * previously called with @c svn_depth_exclude in this report.
368 * If @a start_empty is set and @a path is a directory, the
369 * implementor should assume the directory has no entries or props.
371 * This will *override* any previous set_path() calls made on parent
372 * paths. @a path is relative to the URL specified in svn_ra_open4().
374 * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
376 * All temporary allocations are done in @a pool.
378 svn_error_t *(*set_path)(void *report_baton,
380 svn_revnum_t revision,
382 svn_boolean_t start_empty,
383 const char *lock_token,
386 /** Describing a working copy @a path as missing.
388 * @a path may not be underneath a path on which set_path() was
389 * previously called with @c svn_depth_exclude in this report.
391 * All temporary allocations are done in @a pool.
393 svn_error_t *(*delete_path)(void *report_baton,
397 /** Like set_path(), but differs in that @a path in the working copy
398 * (relative to the root of the report driver) isn't a reflection of
399 * @a path in the repository (relative to the URL specified when
400 * opening the RA layer), but is instead a reflection of a different
401 * repository @a url at @a revision, and has depth @a depth.
403 * @a path may not be underneath a path on which set_path() was
404 * previously called with @c svn_depth_exclude in this report.
406 * If @a start_empty is set and @a path is a directory,
407 * the implementor should assume the directory has no entries or props.
409 * If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
411 * All temporary allocations are done in @a pool.
413 svn_error_t *(*link_path)(void *report_baton,
416 svn_revnum_t revision,
418 svn_boolean_t start_empty,
419 const char *lock_token,
422 /** WC calls this when the state report is finished; any directories
423 * or files not explicitly `set' are assumed to be at the
424 * baseline revision originally passed into do_update(). No other
425 * reporting functions, including abort_report, should be called after
426 * calling this function.
428 svn_error_t *(*finish_report)(void *report_baton,
431 /** If an error occurs during a report, this routine should cause the
432 * filesystem transaction to be aborted & cleaned up. No other reporting
433 * functions should be called after calling this function.
435 svn_error_t *(*abort_report)(void *report_baton,
438 } svn_ra_reporter3_t;
441 * Similar to @c svn_ra_reporter3_t, but without support for depths.
443 * @deprecated Provided for backward compatibility with the 1.4 API.
445 typedef struct svn_ra_reporter2_t
447 /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
448 * with @a depth always set to @c svn_depth_infinity. */
449 svn_error_t *(*set_path)(void *report_baton,
451 svn_revnum_t revision,
452 svn_boolean_t start_empty,
453 const char *lock_token,
456 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
457 svn_error_t *(*delete_path)(void *report_baton,
461 /** Similar to the corresponding field in @c svn_ra_reporter3_t, but
462 * with @a depth always set to @c svn_depth_infinity. */
463 svn_error_t *(*link_path)(void *report_baton,
466 svn_revnum_t revision,
467 svn_boolean_t start_empty,
468 const char *lock_token,
471 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
472 svn_error_t *(*finish_report)(void *report_baton,
475 /** Same as the corresponding field in @c svn_ra_reporter3_t. */
476 svn_error_t *(*abort_report)(void *report_baton,
479 } svn_ra_reporter2_t;
482 * Similar to @c svn_ra_reporter2_t, but without support for lock tokens.
484 * @deprecated Provided for backward compatibility with the 1.1 API.
486 typedef struct svn_ra_reporter_t
488 /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
489 * with @a lock_token always set to NULL. */
490 svn_error_t *(*set_path)(void *report_baton,
492 svn_revnum_t revision,
493 svn_boolean_t start_empty,
496 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
497 svn_error_t *(*delete_path)(void *report_baton,
501 /** Similar to the corresponding field in @c svn_ra_reporter2_t, but
502 * with @a lock_token always set to NULL. */
503 svn_error_t *(*link_path)(void *report_baton,
506 svn_revnum_t revision,
507 svn_boolean_t start_empty,
510 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
511 svn_error_t *(*finish_report)(void *report_baton,
514 /** Same as the corresponding field in @c svn_ra_reporter2_t. */
515 svn_error_t *(*abort_report)(void *report_baton,
520 /** A collection of callbacks implemented by libsvn_client which allows
521 * an RA layer to "pull" information from the client application, or
522 * possibly store information. libsvn_client passes this vtable to
525 * Each routine takes a @a callback_baton originally provided with the
528 * Clients must use svn_ra_create_callbacks() to allocate and
529 * initialize this structure.
533 typedef struct svn_ra_callbacks2_t
535 /** Open a unique temporary file for writing in the working copy.
536 * This file will be automatically deleted when @a fp is closed.
538 * @deprecated This callback should no longer be used by RA layers.
540 svn_error_t *(*open_tmp_file)(apr_file_t **fp,
541 void *callback_baton,
544 /** An authentication baton, created by the application, which is
545 * capable of retrieving all known types of credentials.
547 svn_auth_baton_t *auth_baton;
549 /*** The following items may be set to NULL to disallow the RA layer
550 to perform the respective operations of the vtable functions.
551 Perhaps WC props are not defined or are in invalid for this
552 session, or perhaps the commit operation this RA session will
553 perform is a server-side only one that shouldn't do post-commit
554 processing on a working copy path. ***/
556 /** Fetch working copy properties.
558 *<pre> ### we might have a problem if the RA layer ever wants a property
559 * ### that corresponds to a different revision of the file than
560 * ### what is in the WC. we'll cross that bridge one day...</pre>
562 svn_ra_get_wc_prop_func_t get_wc_prop;
564 /** Immediately set new values for working copy properties. */
565 svn_ra_set_wc_prop_func_t set_wc_prop;
567 /** Schedule new values for working copy properties. */
568 svn_ra_push_wc_prop_func_t push_wc_prop;
570 /** Invalidate working copy properties. */
571 svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
573 /** Notification callback used for progress information.
574 * May be NULL if not used.
576 svn_ra_progress_notify_func_t progress_func;
578 /** Notification callback baton, used with progress_func. */
579 void *progress_baton;
581 /** Cancellation function
583 * As its baton, the general callback baton is used
587 svn_cancel_func_t cancel_func;
589 /** Client string customization callback function
592 svn_ra_get_client_string_func_t get_client_string;
594 /** Working copy file content fetching function.
597 svn_ra_get_wc_contents_func_t get_wc_contents;
599 /** Check-tunnel callback
601 * If not @c NULL, and open_tunnel_func is also not @c NULL, this
602 * callback will be invoked to check if open_tunnel_func should be
603 * used to create a specific tunnel, or if the default tunnel
604 * implementation (either built-in or configured in the client
605 * configuration file) should be used instead.
608 svn_ra_check_tunnel_func_t check_tunnel_func;
610 /** Open-tunnel callback
612 * If not @c NULL, this callback will be invoked to create a tunnel
613 * for a ra_svn connection that needs one, overriding any tunnel
614 * definitions in the client config file. This callback is used only
615 * for ra_svn and ignored by the other RA modules.
618 svn_ra_open_tunnel_func_t open_tunnel_func;
620 /** A baton used with open_tunnel_func and close_tunnel_func.
624 } svn_ra_callbacks2_t;
626 /** Similar to svn_ra_callbacks2_t, except that the progress
627 * notification function and baton is missing.
629 * @deprecated Provided for backward compatibility with the 1.2 API.
631 typedef struct svn_ra_callbacks_t
633 svn_error_t *(*open_tmp_file)(apr_file_t **fp,
634 void *callback_baton,
637 svn_auth_baton_t *auth_baton;
639 svn_ra_get_wc_prop_func_t get_wc_prop;
641 svn_ra_set_wc_prop_func_t set_wc_prop;
643 svn_ra_push_wc_prop_func_t push_wc_prop;
645 svn_ra_invalidate_wc_props_func_t invalidate_wc_props;
647 } svn_ra_callbacks_t;
651 /*----------------------------------------------------------------------*/
653 /* Public Interfaces. */
656 * Initialize the RA library. This function must be called before using
657 * any function in this header, except the deprecated APIs based on
658 * @c svn_ra_plugin_t, or svn_ra_version(). This function must not be called
659 * simultaneously in multiple threads. @a pool must live
660 * longer than any open RA sessions.
665 svn_ra_initialize(apr_pool_t *pool);
667 /** Initialize a callback structure.
668 * Set @a *callbacks to a ra callbacks object, allocated in @a pool.
670 * Clients must use this function to allocate and initialize @c
671 * svn_ra_callbacks2_t structures.
676 svn_ra_create_callbacks(svn_ra_callbacks2_t **callbacks,
680 * A repository access session. This object is used to perform requests
681 * to a repository, identified by a URL.
685 typedef struct svn_ra_session_t svn_ra_session_t;
688 * Open a repository access session to the repository at @a repos_URL,
689 * or inform the caller regarding a correct URL by which to access
692 * If @a repos_URL can be used successfully to access the repository,
693 * set @a *session_p to an opaque object representing a repository
694 * session for the repository and (if @a corrected_url is non-NULL)
695 * set @a *corrected_url to NULL. If there's a better URL that the
696 * caller should try and @a corrected_url is non-NULL, set
697 * @a *session_p to NULL and @a *corrected_url to the corrected URL. If
698 * there's a better URL that the caller should try, and @a
699 * corrected_url is NULL, return an #SVN_ERR_RA_SESSION_URL_MISMATCH
700 * error. Allocate all returned items in @a pool.
702 * The @a repos_URL need not point to the root of the repository: subject
703 * to authorization, it may point to any path within the repository, even
704 * a path at which no node exists in the repository. The session will
705 * remember this URL as its "session URL" (also called "session root URL"),
706 * until changed by svn_ra_reparent(). Many RA functions take or return
707 * paths that are relative to the session URL.
709 * If a @a corrected_url is returned, it will point to the same path
710 * within the new repository root URL that @a repos_URL pointed to within
711 * the old repository root URL.
713 * Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
714 * to the UUID of the repository at @c repos_URL.
716 * @a callbacks/@a callback_baton is a table of callbacks provided by the
717 * client; see @c svn_ra_callbacks2_t.
719 * @a config is a hash mapping <tt>const char *</tt> keys to
720 * @c svn_config_t * values. For example, the @c svn_config_t for the
721 * "~/.subversion/config" file is under the key "config". @a config may
722 * be NULL. This function examines some config settings under the
723 * "servers" key (if present) before loading the required RA module, and
724 * the RA module may also examine any config settings.
726 * All RA requests require a session; they will continue to
727 * use @a pool for memory allocation.
729 * @see svn_client_open_ra_session().
734 svn_ra_open4(svn_ra_session_t **session_p,
735 const char **corrected_url,
736 const char *repos_URL,
738 const svn_ra_callbacks2_t *callbacks,
739 void *callback_baton,
743 /** Similar to svn_ra_open4(), but with @a corrected_url always passed
747 * @deprecated Provided for backward compatibility with the 1.6 API.
751 svn_ra_open3(svn_ra_session_t **session_p,
752 const char *repos_URL,
754 const svn_ra_callbacks2_t *callbacks,
755 void *callback_baton,
760 * Similar to svn_ra_open3(), but with @a uuid set to @c NULL.
763 * @deprecated Provided for backward compatibility with the 1.4 API.
767 svn_ra_open2(svn_ra_session_t **session_p,
768 const char *repos_URL,
769 const svn_ra_callbacks2_t *callbacks,
770 void *callback_baton,
775 * @see svn_ra_open2().
777 * @deprecated Provided for backward compatibility with the 1.2 API.
781 svn_ra_open(svn_ra_session_t **session_p,
782 const char *repos_URL,
783 const svn_ra_callbacks_t *callbacks,
784 void *callback_baton,
788 /** Change the root URL of an open @a ra_session to point to a new path in the
789 * same repository. @a url is the new root URL. Use @a pool for
790 * temporary allocations.
792 * If @a url has a different repository root than the current session
793 * URL, return @c SVN_ERR_RA_ILLEGAL_URL.
798 svn_ra_reparent(svn_ra_session_t *ra_session,
802 /** Set @a *url to the session URL -- the URL to which @a ra_session was
803 * opened or most recently reparented.
808 svn_ra_get_session_url(svn_ra_session_t *ra_session,
813 /** Convert @a url into a path relative to the session URL of @a ra_session,
814 * setting @a *rel_path to that value. If @a url is not
815 * a child of the session URL, return @c SVN_ERR_RA_ILLEGAL_URL.
817 * The returned path is uri decoded to allow using it with the ra or other
818 * apis as a valid relpath.
823 svn_ra_get_path_relative_to_session(svn_ra_session_t *ra_session,
824 const char **rel_path,
828 /** Convert @a url into a path relative to the repository root URL of
829 * the repository with which @a ra_session is associated, setting @a
830 * *rel_path to that value. If @a url is not a child of repository
831 * root URL, return @c SVN_ERR_RA_ILLEGAL_URL.
833 * The returned path is uri decoded to allow using it with the ra or other
834 * apis as a valid relpath.
839 svn_ra_get_path_relative_to_root(svn_ra_session_t *ra_session,
840 const char **rel_path,
845 * Get the latest revision number from the repository of @a session.
847 * Use @a pool for memory allocation.
852 svn_ra_get_latest_revnum(svn_ra_session_t *session,
853 svn_revnum_t *latest_revnum,
857 * Get the latest revision number at time @a tm in the repository of
860 * Use @a pool for memory allocation.
865 svn_ra_get_dated_revision(svn_ra_session_t *session,
866 svn_revnum_t *revision,
871 * Set the property @a name to @a value on revision @a rev in the repository
874 * If @a value is @c NULL, delete the named revision property.
876 * If the server advertises the #SVN_RA_CAPABILITY_ATOMIC_REVPROPS capability
877 * and @a old_value_p is not @c NULL, then changing the property will fail with
878 * an error chain that contains #SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the
879 * present value of the property is not @a *old_value_p. (This is an atomic
881 * @a *old_value_p may be @c NULL, representing that the property must be not
884 * If the capability is not advertised, then @a old_value_p MUST be @c NULL.
886 * Please note that properties attached to revisions are @em unversioned.
888 * Use @a pool for memory allocation.
890 * @see svn_fs_change_rev_prop2(), svn_error_find_cause().
895 svn_ra_change_rev_prop2(svn_ra_session_t *session,
898 const svn_string_t *const *old_value_p,
899 const svn_string_t *value,
903 * Similar to svn_ra_change_rev_prop2(), but with @a old_value_p set
907 * @deprecated Provided for backward compatibility with the 1.6 API.
911 svn_ra_change_rev_prop(svn_ra_session_t *session,
914 const svn_string_t *value,
918 * Set @a *props to the list of unversioned properties attached to revision
919 * @a rev in the repository of @a session. The hash maps
920 * (<tt>const char *</tt>) names to (<tt>@c svn_string_t *</tt>) values.
922 * Use @a pool for memory allocation.
927 svn_ra_rev_proplist(svn_ra_session_t *session,
933 * Set @a *value to the value of unversioned property @a name attached to
934 * revision @a rev in the repository of @a session. If @a rev has no
935 * property by that name, set @a *value to @c NULL.
937 * Use @a pool for memory allocation.
942 svn_ra_rev_prop(svn_ra_session_t *session,
945 svn_string_t **value,
949 * Set @a *editor and @a *edit_baton to an editor for committing
950 * changes to the repository of @a session, setting the revision
951 * properties from @a revprop_table. The revisions being committed
952 * against are passed to the editor functions, starting with the rev
953 * argument to @c open_root. The path root of the commit is the @a
956 * @a revprop_table is a hash mapping <tt>const char *</tt> property
957 * names to @c svn_string_t property values. The commit log message
958 * is expected to be in the @c SVN_PROP_REVISION_LOG element. @a
959 * revprop_table can not contain either of @c SVN_PROP_REVISION_DATE
960 * or @c SVN_PROP_REVISION_AUTHOR.
962 * Before @c close_edit returns, but after the commit has succeeded,
963 * it will invoke @a commit_callback (if non-NULL) with filled-in
964 * #svn_commit_info_t *, @a commit_baton, and @a pool or some subpool
965 * thereof as arguments. If @a commit_callback returns an error, that error
966 * will be returned from @c * close_edit, otherwise @c close_edit will return
967 * successfully (unless it encountered an error before invoking
968 * @a commit_callback).
970 * The callback will not be called if the commit was a no-op
971 * (i.e. nothing was committed);
973 * @a lock_tokens, if non-NULL, is a hash mapping <tt>const char
974 * *</tt> paths (relative to the URL of @a session) to <tt>
975 * const char *</tt> lock tokens. The server checks that the
976 * correct token is provided for each committed, locked path. @a lock_tokens
977 * must live during the whole commit operation.
979 * If @a keep_locks is @c TRUE, then do not release locks on
980 * committed objects. Else, automatically release such locks.
982 * The caller may not perform any RA operations using @a session before
983 * finishing the edit.
985 * Use @a pool for memory allocation.
989 * @note Like most commit editors, the returned editor requires that the
990 * @c copyfrom_path parameter passed to its @c add_file and @c add_directory
991 * methods is a URL, not a relative path.
994 svn_ra_get_commit_editor3(svn_ra_session_t *session,
995 const svn_delta_editor_t **editor,
997 apr_hash_t *revprop_table,
998 svn_commit_callback2_t commit_callback,
1000 apr_hash_t *lock_tokens,
1001 svn_boolean_t keep_locks,
1005 * Same as svn_ra_get_commit_editor3(), but with @c revprop_table set
1006 * to a hash containing the @c SVN_PROP_REVISION_LOG property set
1007 * to the value of @a log_msg.
1009 * @since New in 1.4.
1011 * @deprecated Provided for backward compatibility with the 1.4 API.
1015 svn_ra_get_commit_editor2(svn_ra_session_t *session,
1016 const svn_delta_editor_t **editor,
1018 const char *log_msg,
1019 svn_commit_callback2_t commit_callback,
1021 apr_hash_t *lock_tokens,
1022 svn_boolean_t keep_locks,
1026 * Same as svn_ra_get_commit_editor2(), but uses @c svn_commit_callback_t.
1028 * @since New in 1.2.
1030 * @deprecated Provided for backward compatibility with the 1.3 API.
1034 svn_ra_get_commit_editor(svn_ra_session_t *session,
1035 const svn_delta_editor_t **editor,
1037 const char *log_msg,
1038 svn_commit_callback_t callback,
1039 void *callback_baton,
1040 apr_hash_t *lock_tokens,
1041 svn_boolean_t keep_locks,
1045 * Fetch the contents and properties of file @a path at @a revision.
1046 * @a revision may be SVN_INVALID_REVNUM, indicating that the HEAD
1047 * revision should be used. Interpret @a path relative to the URL in
1048 * @a session. Use @a pool for all allocations.
1050 * If @a revision is @c SVN_INVALID_REVNUM and @a fetched_rev is not
1051 * @c NULL, then set @a *fetched_rev to the actual revision that was
1054 * If @a stream is non @c NULL, push the contents of the file at @a
1055 * stream, do not call svn_stream_close() when finished.
1057 * If @a props is non @c NULL, set @a *props to contain the properties of
1058 * the file. This means @em all properties: not just ones controlled by
1059 * the user and stored in the repository fs, but non-tweakable ones
1060 * generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
1061 * etc.) The keys are <tt>const char *</tt>, values are
1062 * <tt>@c svn_string_t *</tt>.
1064 * The stream handlers for @a stream may not perform any RA
1065 * operations using @a session.
1067 * @since New in 1.2.
1070 svn_ra_get_file(svn_ra_session_t *session,
1072 svn_revnum_t revision,
1073 svn_stream_t *stream,
1074 svn_revnum_t *fetched_rev,
1079 * If @a dirents is non @c NULL, set @a *dirents to contain all the entries
1080 * of directory @a path at @a revision. The keys of @a dirents will be
1081 * entry names (<tt>const char *</tt>), and the values dirents
1082 * (<tt>@c svn_dirent_t *</tt>). Use @a pool for all allocations.
1084 * @a dirent_fields controls which portions of the <tt>@c svn_dirent_t</tt>
1085 * objects are filled in. To have them completely filled in just pass
1086 * @c SVN_DIRENT_ALL, otherwise pass the bitwise OR of all the @c SVN_DIRENT_
1087 * fields you would like to have returned to you.
1089 * @a path is interpreted relative to the URL in @a session.
1091 * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
1092 * @a *fetched_rev is not @c NULL, then this function will set
1093 * @a *fetched_rev to the actual revision that was retrieved. (Some
1094 * callers want to know, and some don't.)
1096 * If @a props is non @c NULL, set @a *props to contain the properties of
1097 * the directory, including properties that are non-tweakable and
1098 * generated by the SCM system itself (such as #svn_prop_wc_kind and
1099 * #svn_prop_entry_kind properties). The keys are <tt>const char *</tt>,
1100 * values are <tt>@c svn_string_t *</tt>.
1102 * @since New in 1.4.
1105 svn_ra_get_dir2(svn_ra_session_t *session,
1106 apr_hash_t **dirents,
1107 svn_revnum_t *fetched_rev,
1110 svn_revnum_t revision,
1111 apr_uint32_t dirent_fields,
1115 * Similar to @c svn_ra_get_dir2, but with @c SVN_DIRENT_ALL for the
1116 * @a dirent_fields parameter.
1118 * @since New in 1.2.
1120 * @deprecated Provided for compatibility with the 1.3 API.
1124 svn_ra_get_dir(svn_ra_session_t *session,
1126 svn_revnum_t revision,
1127 apr_hash_t **dirents,
1128 svn_revnum_t *fetched_rev,
1133 * Set @a *catalog to a mergeinfo catalog for the paths in @a paths.
1134 * If no mergeinfo is available, set @a *catalog to @c NULL. The
1135 * requested mergeinfo hashes are for @a paths (which are relative to
1136 * @a session's URL) in @a revision. If one of the paths does not exist
1137 * in that revision, return SVN_ERR_FS_NOT_FOUND.
1139 * @a inherit indicates whether explicit, explicit or inherited, or
1140 * only inherited mergeinfo for @a paths is retrieved.
1142 * If @a include_descendants is TRUE, then additionally return the
1143 * mergeinfo for any descendant of any element of @a paths which has
1144 * the @c SVN_PROP_MERGEINFO property explicitly set on it. (Note
1145 * that inheritance is only taken into account for the elements in @a
1146 * paths; descendants of the elements in @a paths which get their
1147 * mergeinfo via inheritance are not included in @a *catalog.)
1149 * Allocate the returned values in @a pool.
1151 * If @a revision is @c SVN_INVALID_REVNUM, it defaults to youngest.
1153 * If the server doesn't support retrieval of mergeinfo (which can
1154 * happen even for file:// URLs, if the repository itself hasn't been
1155 * upgraded), return @c SVN_ERR_UNSUPPORTED_FEATURE in preference to
1156 * any other error that might otherwise be returned.
1158 * @since New in 1.5.
1161 svn_ra_get_mergeinfo(svn_ra_session_t *session,
1162 svn_mergeinfo_catalog_t *catalog,
1163 const apr_array_header_t *paths,
1164 svn_revnum_t revision,
1165 svn_mergeinfo_inheritance_t inherit,
1166 svn_boolean_t include_descendants,
1170 * Ask the RA layer to update a working copy to a new revision.
1172 * The client initially provides an @a update_editor/@a update_baton to the
1173 * RA layer; this editor contains knowledge of where the change will
1174 * begin in the working copy (when @c open_root() is called).
1176 * In return, the client receives a @a reporter/@a report_baton. The
1177 * client then describes its working copy by making calls into the
1180 * When finished, the client calls @a reporter->finish_report(). The
1181 * RA layer then does a complete drive of @a update_editor, ending with
1182 * @a update_editor->close_edit(), to update the working copy.
1184 * @a update_target is an optional single path component to restrict
1185 * the scope of the update to just that entry (in the directory
1186 * represented by the @a session's URL). If @a update_target is the
1187 * empty string, the entire directory is updated.
1189 * Update the target only as deeply as @a depth indicates.
1191 * If @a send_copyfrom_args is TRUE, then ask the server to send
1192 * copyfrom arguments to add_file() and add_directory() when possible.
1193 * (Note: this means that any subsequent txdeltas coming from the
1194 * server are presumed to apply against the copied file!)
1196 * Use @a ignore_ancestry to control whether or not items being
1197 * updated will be checked for relatedness first. Unrelated items
1198 * are typically transmitted to the editor as a deletion of one thing
1199 * and the addition of another, but if this flag is @c TRUE,
1200 * unrelated items will be diffed as if they were related.
1202 * The working copy will be updated to @a revision_to_update_to, or the
1203 * "latest" revision if this arg is invalid.
1205 * The caller may not perform any RA operations using @a session before
1206 * finishing the report, and may not perform any RA operations using
1207 * @a session from within the editing operations of @a update_editor.
1209 * Allocate @a *reporter and @a *report_baton in @a result_pool. Use
1210 * @a scratch_pool for temporary allocations.
1212 * @note The reporter provided by this function does NOT supply copy-
1213 * from information to the diff editor callbacks.
1215 * @note In order to prevent pre-1.5 servers from doing more work than
1216 * needed, and sending too much data back, a pre-1.5 'recurse'
1217 * directive may be sent to the server, based on @a depth.
1219 * @note Pre Subversion 1.8 svnserve based servers never ignore ancestry.
1221 * @note This differs from calling svn_ra_do_switch3() with the current
1222 * URL of the target node. Update changes only the revision numbers,
1223 * leaving any switched subtrees still switched, whereas switch changes
1224 * every node in the tree to a child of the same URL.
1226 * @since New in 1.8.
1229 svn_ra_do_update3(svn_ra_session_t *session,
1230 const svn_ra_reporter3_t **reporter,
1231 void **report_baton,
1232 svn_revnum_t revision_to_update_to,
1233 const char *update_target,
1235 svn_boolean_t send_copyfrom_args,
1236 svn_boolean_t ignore_ancestry,
1237 const svn_delta_editor_t *update_editor,
1239 apr_pool_t *result_pool,
1240 apr_pool_t *scratch_pool);
1243 * Similar to svn_ra_do_update3(), but always ignoring ancestry.
1245 * @since New in 1.5.
1246 * @deprecated Provided for compatibility with the 1.4 API.
1250 svn_ra_do_update2(svn_ra_session_t *session,
1251 const svn_ra_reporter3_t **reporter,
1252 void **report_baton,
1253 svn_revnum_t revision_to_update_to,
1254 const char *update_target,
1256 svn_boolean_t send_copyfrom_args,
1257 const svn_delta_editor_t *update_editor,
1262 * Similar to svn_ra_do_update2(), but taking @c svn_ra_reporter2_t
1263 * instead of @c svn_ra_reporter3_t; if @a recurse is true, pass @c
1264 * svn_depth_infinity for @a depth, else pass @c svn_depth_files; and
1265 * with @a send_copyfrom_args always false.
1267 * @deprecated Provided for compatibility with the 1.4 API.
1271 svn_ra_do_update(svn_ra_session_t *session,
1272 const svn_ra_reporter2_t **reporter,
1273 void **report_baton,
1274 svn_revnum_t revision_to_update_to,
1275 const char *update_target,
1276 svn_boolean_t recurse,
1277 const svn_delta_editor_t *update_editor,
1283 * Ask the RA layer to switch a working copy to a new revision and URL.
1285 * This is similar to svn_ra_do_update3(), but also changes the URL of
1286 * every node in the target tree to a child of the @a switch_url. In
1287 * contrast, update changes only the revision numbers, leaving any
1288 * switched subtrees still switched.
1290 * @note Pre Subversion 1.8 svnserve based servers always ignore ancestry
1291 * and never send copyfrom data.
1293 * @since New in 1.8.
1296 svn_ra_do_switch3(svn_ra_session_t *session,
1297 const svn_ra_reporter3_t **reporter,
1298 void **report_baton,
1299 svn_revnum_t revision_to_switch_to,
1300 const char *switch_target,
1302 const char *switch_url,
1303 svn_boolean_t send_copyfrom_args,
1304 svn_boolean_t ignore_ancestry,
1305 const svn_delta_editor_t *switch_editor,
1307 apr_pool_t *result_pool,
1308 apr_pool_t *scratch_pool);
1311 * Similar to svn_ra_do_switch3(), but always ignoring ancestry and
1312 * never sending copyfrom_args.
1314 * @since New in 1.5.
1315 * @deprecated Provided for compatibility with the 1.7 API.
1319 svn_ra_do_switch2(svn_ra_session_t *session,
1320 const svn_ra_reporter3_t **reporter,
1321 void **report_baton,
1322 svn_revnum_t revision_to_switch_to,
1323 const char *switch_target,
1325 const char *switch_url,
1326 const svn_delta_editor_t *switch_editor,
1331 * Similar to svn_ra_do_switch2(), but taking @c svn_ra_reporter2_t
1332 * instead of @c svn_ra_reporter3_t, and therefore only able to report
1333 * @c svn_depth_infinity for depths. The switch itself is performed
1334 * according to @a recurse: if TRUE, then use @c svn_depth_infinity
1335 * for @a depth, else use @c svn_depth_files.
1337 * @deprecated Provided for compatibility with the 1.4 API.
1341 svn_ra_do_switch(svn_ra_session_t *session,
1342 const svn_ra_reporter2_t **reporter,
1343 void **report_baton,
1344 svn_revnum_t revision_to_switch_to,
1345 const char *switch_target,
1346 svn_boolean_t recurse,
1347 const char *switch_url,
1348 const svn_delta_editor_t *switch_editor,
1353 * Ask the RA layer to describe the status of a working copy with respect
1354 * to @a revision of the repository (or HEAD, if @a revision is invalid).
1356 * The client initially provides a @a status_editor/@a status_baton to the RA
1357 * layer; this editor contains knowledge of where the change will
1358 * begin in the working copy (when open_root() is called).
1360 * In return, the client receives a @a reporter/@a report_baton. The
1361 * client then describes its working copy by making calls into the
1364 * When finished, the client calls @a reporter->finish_report(). The RA
1365 * layer then does a complete drive of @a status_editor, ending with
1366 * close_edit(), to report, essentially, what would be modified in
1367 * the working copy were the client to call do_update().
1368 * @a status_target is an optional single path component will restrict
1369 * the scope of the status report to an entry in the directory
1370 * represented by the @a session's URL, or empty if the entire directory
1371 * is meant to be examined.
1373 * Get status as deeply as @a depth indicates. If @a depth is
1374 * #svn_depth_unknown, get the status down to the ambient depth of the
1375 * working copy. If @a depth is deeper than the working copy, include changes
1376 * that would be needed to populate the working copy to that depth.
1378 * The caller may not perform any RA operations using @a session
1379 * before finishing the report, and may not perform any RA operations
1380 * using @a session from within the editing operations of @a status_editor.
1382 * Use @a pool for memory allocation.
1384 * @note The reporter provided by this function does NOT supply copy-
1385 * from information to the diff editor callbacks.
1387 * @note In order to prevent pre-1.5 servers from doing more work than
1388 * needed, and sending too much data back, a pre-1.5 'recurse'
1389 * directive may be sent to the server, based on @a depth.
1391 * @since New in 1.5.
1394 svn_ra_do_status2(svn_ra_session_t *session,
1395 const svn_ra_reporter3_t **reporter,
1396 void **report_baton,
1397 const char *status_target,
1398 svn_revnum_t revision,
1400 const svn_delta_editor_t *status_editor,
1406 * Similar to svn_ra_do_status2(), but taking @c svn_ra_reporter2_t
1407 * instead of @c svn_ra_reporter3_t, and therefore only able to report
1408 * @c svn_depth_infinity for depths. The status operation itself is
1409 * performed according to @a recurse: if TRUE, then @a depth is
1410 * @c svn_depth_infinity, else it is @c svn_depth_immediates.
1412 * @deprecated Provided for compatibility with the 1.4 API.
1416 svn_ra_do_status(svn_ra_session_t *session,
1417 const svn_ra_reporter2_t **reporter,
1418 void **report_baton,
1419 const char *status_target,
1420 svn_revnum_t revision,
1421 svn_boolean_t recurse,
1422 const svn_delta_editor_t *status_editor,
1427 * Ask the RA layer to 'diff' a working copy against @a versus_url;
1428 * it's another form of svn_ra_do_update2().
1430 * @note This function cannot be used to diff a single file, only a
1431 * working copy directory. See the svn_ra_do_switch3() function
1434 * The client initially provides a @a diff_editor/@a diff_baton to the RA
1435 * layer; this editor contains knowledge of where the common diff
1436 * root is in the working copy (when open_root() is called).
1438 * In return, the client receives a @a reporter/@a report_baton. The
1439 * client then describes its working copy by making calls into the
1442 * When finished, the client calls @a reporter->finish_report(). The
1443 * RA layer then does a complete drive of @a diff_editor, ending with
1444 * close_edit(), to transmit the diff.
1446 * @a diff_target is an optional single path component will restrict
1447 * the scope of the diff to an entry in the directory represented by
1448 * the @a session's URL, or empty if the entire directory is meant to be
1449 * one of the diff paths.
1451 * The working copy will be diffed against @a versus_url as it exists
1452 * in revision @a revision, or as it is in head if @a revision is
1453 * @c SVN_INVALID_REVNUM.
1455 * Use @a ignore_ancestry to control whether or not items being
1456 * diffed will be checked for relatedness first. Unrelated items
1457 * are typically transmitted to the editor as a deletion of one thing
1458 * and the addition of another, but if this flag is @c TRUE,
1459 * unrelated items will be diffed as if they were related.
1461 * Diff only as deeply as @a depth indicates.
1463 * The caller may not perform any RA operations using @a session before
1464 * finishing the report, and may not perform any RA operations using
1465 * @a session from within the editing operations of @a diff_editor.
1467 * @a text_deltas instructs the driver of the @a diff_editor to enable
1468 * the generation of text deltas. If @a text_deltas is FALSE the window
1469 * handler returned by apply_textdelta will be called once with a NULL
1470 * @c svn_txdelta_window_t pointer.
1472 * Use @a pool for memory allocation.
1474 * @note The reporter provided by this function does NOT supply copy-
1475 * from information to the diff editor callbacks.
1477 * @note In order to prevent pre-1.5 servers from doing more work than
1478 * needed, and sending too much data back, a pre-1.5 'recurse'
1479 * directive may be sent to the server, based on @a depth.
1481 * @since New in 1.5.
1484 svn_ra_do_diff3(svn_ra_session_t *session,
1485 const svn_ra_reporter3_t **reporter,
1486 void **report_baton,
1487 svn_revnum_t revision,
1488 const char *diff_target,
1490 svn_boolean_t ignore_ancestry,
1491 svn_boolean_t text_deltas,
1492 const char *versus_url,
1493 const svn_delta_editor_t *diff_editor,
1498 * Similar to svn_ra_do_diff3(), but taking @c svn_ra_reporter2_t
1499 * instead of @c svn_ra_reporter3_t, and therefore only able to report
1500 * @c svn_depth_infinity for depths. Perform the diff according to
1501 * @a recurse: if TRUE, then @a depth is @c svn_depth_infinity, else
1502 * it is @c svn_depth_files.
1504 * @deprecated Provided for compatibility with the 1.4 API.
1508 svn_ra_do_diff2(svn_ra_session_t *session,
1509 const svn_ra_reporter2_t **reporter,
1510 void **report_baton,
1511 svn_revnum_t revision,
1512 const char *diff_target,
1513 svn_boolean_t recurse,
1514 svn_boolean_t ignore_ancestry,
1515 svn_boolean_t text_deltas,
1516 const char *versus_url,
1517 const svn_delta_editor_t *diff_editor,
1523 * Similar to svn_ra_do_diff2(), but with @a text_deltas set to @c TRUE.
1525 * @deprecated Provided for backward compatibility with the 1.3 API.
1529 svn_ra_do_diff(svn_ra_session_t *session,
1530 const svn_ra_reporter2_t **reporter,
1531 void **report_baton,
1532 svn_revnum_t revision,
1533 const char *diff_target,
1534 svn_boolean_t recurse,
1535 svn_boolean_t ignore_ancestry,
1536 const char *versus_url,
1537 const svn_delta_editor_t *diff_editor,
1542 * Invoke @a receiver with @a receiver_baton on each log message from
1543 * @a start to @a end. @a start may be greater or less than @a end;
1544 * this just controls whether the log messages are processed in descending
1545 * or ascending revision number order.
1547 * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest.
1549 * If @a paths is non-NULL and has one or more elements, then only show
1550 * revisions in which at least one of @a paths was changed (i.e., if
1551 * file, text or props changed; if dir, props changed or an entry
1552 * was added or deleted). Each path is an <tt>const char *</tt>, relative
1553 * to the @a session's common parent.
1555 * If @a limit is greater than zero only invoke @a receiver on the first
1558 * If @a discover_changed_paths, then each call to @a receiver passes a
1559 * <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
1560 * the hash's keys are all the paths committed in that revision, the hash's
1561 * values are <tt>const svn_log_changed_path2_t *</tt> for each committed
1562 * path. Otherwise, each call to receiver passes NULL for @a changed_paths.
1564 * If @a strict_node_history is set, copy history will not be traversed
1565 * (if any exists) when harvesting the revision logs for each path.
1567 * If @a include_merged_revisions is set, log information for revisions
1568 * which have been merged to @a targets will also be returned.
1570 * If @a revprops is NULL, retrieve all revision properties; else, retrieve
1571 * only the revision properties named by the (const char *) array elements
1572 * (i.e. retrieve none if the array is empty).
1574 * If any invocation of @a receiver returns error, return that error
1575 * immediately and without wrapping it.
1577 * If @a start or @a end is a non-existent revision, return the error
1578 * @c SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
1580 * See also the documentation for @c svn_log_message_receiver_t.
1582 * The caller may not invoke any RA operations using @a session from
1583 * within @a receiver.
1585 * Use @a pool for memory allocation.
1587 * @note If @a paths is NULL or empty, the result depends on the
1588 * server. Pre-1.5 servers will send nothing; 1.5 servers will
1589 * effectively perform the log operation on the root of the
1590 * repository. This behavior may be changed in the future to ensure
1591 * consistency across all pedigrees of server.
1593 * @note Pre-1.5 servers do not support custom revprop retrieval; if @a
1594 * revprops is NULL or contains a revprop other than svn:author, svn:date,
1595 * or svn:log, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is returned.
1597 * @since New in 1.5.
1600 svn_ra_get_log2(svn_ra_session_t *session,
1601 const apr_array_header_t *paths,
1605 svn_boolean_t discover_changed_paths,
1606 svn_boolean_t strict_node_history,
1607 svn_boolean_t include_merged_revisions,
1608 const apr_array_header_t *revprops,
1609 svn_log_entry_receiver_t receiver,
1610 void *receiver_baton,
1614 * Similar to svn_ra_get_log2(), but uses @c svn_log_message_receiver_t
1615 * instead of @c svn_log_entry_receiver_t. Also, @a
1616 * include_merged_revisions is set to @c FALSE and @a revprops is
1617 * svn:author, svn:date, and svn:log.
1619 * @since New in 1.2.
1620 * @deprecated Provided for backward compatibility with the 1.4 API.
1624 svn_ra_get_log(svn_ra_session_t *session,
1625 const apr_array_header_t *paths,
1629 svn_boolean_t discover_changed_paths,
1630 svn_boolean_t strict_node_history,
1631 svn_log_message_receiver_t receiver,
1632 void *receiver_baton,
1636 * Set @a *kind to the node kind associated with @a path at @a revision.
1637 * If @a path does not exist under @a revision, set @a *kind to
1638 * @c svn_node_none. @a path is relative to the @a session's parent URL.
1640 * Use @a pool for memory allocation.
1642 * @since New in 1.2.
1645 svn_ra_check_path(svn_ra_session_t *session,
1647 svn_revnum_t revision,
1648 svn_node_kind_t *kind,
1652 * Set @a *dirent to an @c svn_dirent_t associated with @a path at @a
1653 * revision. @a path is relative to the @a session's parent's URL.
1654 * If @a path does not exist in @a revision, set @a *dirent to NULL.
1656 * Use @a pool for memory allocation.
1658 * @since New in 1.2.
1661 svn_ra_stat(svn_ra_session_t *session,
1663 svn_revnum_t revision,
1664 svn_dirent_t **dirent,
1669 * Set @a *uuid to the repository's UUID, allocated in @a pool.
1671 * @since New in 1.5.
1674 svn_ra_get_uuid2(svn_ra_session_t *session,
1679 * Similar to svn_ra_get_uuid2(), but returns the value allocated in
1680 * @a session's pool.
1682 * @deprecated Provided for backward compatibility with the 1.4 API.
1683 * @since New in 1.2.
1687 svn_ra_get_uuid(svn_ra_session_t *session,
1692 * Set @a *url to the repository's root URL, allocated in @a pool.
1693 * The value will not include a trailing '/'. The returned URL is
1694 * guaranteed to be a prefix of the @a session's URL.
1696 * @since New in 1.5.
1699 svn_ra_get_repos_root2(svn_ra_session_t *session,
1705 * Similar to svn_ra_get_repos_root2(), but returns the value
1706 * allocated in @a session's pool.
1708 * @deprecated Provided for backward compatibility with the 1.4 API.
1709 * @since New in 1.2.
1713 svn_ra_get_repos_root(svn_ra_session_t *session,
1718 * Set @a *locations to the locations (at the repository revisions
1719 * @a location_revisions) of the file identified by @a path in
1720 * @a peg_revision. @a path is relative to the URL to which
1721 * @a session was opened. @a location_revisions is an array of
1722 * @c svn_revnum_t's. @a *locations will be a mapping from the revisions to
1723 * their appropriate absolute paths. If the file doesn't exist in a
1724 * location_revision, that revision will be ignored.
1726 * Use @a pool for all allocations.
1728 * @since New in 1.2.
1731 svn_ra_get_locations(svn_ra_session_t *session,
1732 apr_hash_t **locations,
1734 svn_revnum_t peg_revision,
1735 const apr_array_header_t *location_revisions,
1740 * Call @a receiver (with @a receiver_baton) for each segment in the
1741 * location history of @a path in @a peg_revision, working backwards in
1742 * time from @a start_rev to @a end_rev.
1744 * @a end_rev may be @c SVN_INVALID_REVNUM to indicate that you want
1745 * to trace the history of the object to its origin.
1747 * @a start_rev may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1748 * revision". Otherwise, @a start_rev must be younger than @a end_rev
1749 * (unless @a end_rev is @c SVN_INVALID_REVNUM).
1751 * @a peg_revision may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1752 * revision", and must evaluate to be at least as young as @a start_rev.
1754 * Use @a pool for all allocations.
1756 * @since New in 1.5.
1759 svn_ra_get_location_segments(svn_ra_session_t *session,
1761 svn_revnum_t peg_revision,
1762 svn_revnum_t start_rev,
1763 svn_revnum_t end_rev,
1764 svn_location_segment_receiver_t receiver,
1765 void *receiver_baton,
1769 * Retrieve a subset of the interesting revisions of a file @a path
1770 * as seen in revision @a end (see svn_fs_history_prev() for a
1771 * definition of "interesting revisions"). Invoke @a handler with
1772 * @a handler_baton as its first argument for each such revision.
1773 * @a session is an open RA session. Use @a pool for all allocations.
1775 * If there is an interesting revision of the file that is less than or
1776 * equal to @a start, the iteration will begin at that revision.
1777 * Else, the iteration will begin at the first revision of the file in
1778 * the repository, which has to be less than or equal to @a end. Note
1779 * that if the function succeeds, @a handler will have been called at
1782 * In a series of calls to @a handler, the file contents for the first
1783 * interesting revision will be provided as a text delta against the
1784 * empty file. In the following calls, the delta will be against the
1785 * fulltext contents for the previous call.
1787 * If @a include_merged_revisions is TRUE, revisions which are
1788 * included as a result of a merge between @a start and @a end will be
1791 * @note This functionality is not available in pre-1.1 servers. If the
1792 * server doesn't implement it, an alternative (but much slower)
1793 * implementation based on svn_ra_get_log2() is used.
1795 * On subversion 1.8 and newer servers this function has been enabled
1796 * to support reversion of the revision range for @a include_merged_revision
1797 * @c FALSE reporting by switching @a end with @a start.
1799 * @note Prior to Subversion 1.9, this function may request delta handlers
1800 * from @a handler even for empty text deltas. Starting with 1.9, the
1801 * delta handler / baton return arguments passed to @a handler will be
1802 * #NULL unless there is an actual difference in the file contents between
1803 * the current and the previous call.
1805 * @since New in 1.5.
1808 svn_ra_get_file_revs2(svn_ra_session_t *session,
1812 svn_boolean_t include_merged_revisions,
1813 svn_file_rev_handler_t handler,
1814 void *handler_baton,
1818 * Similar to svn_ra_get_file_revs2(), but with @a include_merged_revisions
1821 * @since New in 1.2.
1822 * @deprecated Provided for backward compatibility with the 1.4 API.
1826 svn_ra_get_file_revs(svn_ra_session_t *session,
1830 svn_ra_file_rev_handler_t handler,
1831 void *handler_baton,
1835 * Lock each path in @a path_revs, which is a hash whose keys are the
1836 * paths to be locked, and whose values are the corresponding base
1837 * revisions for each path. The keys are (const char *) and the
1838 * revisions are (svn_revnum_t *).
1840 * Note that locking is never anonymous, so any server implementing
1841 * this function will have to "pull" a username from the client, if
1842 * it hasn't done so already.
1844 * @a comment is optional: it's either an xml-escapable string
1845 * which describes the lock, or it is NULL.
1847 * If any path is already locked by a different user, then call @a
1848 * lock_func/@a lock_baton with an error. If @a steal_lock is TRUE,
1849 * then "steal" the existing lock(s) anyway, even if the RA username
1850 * does not match the current lock's owner. Delete any lock on the
1851 * path, and unconditionally create a new lock.
1853 * For each path, if its base revision (in @a path_revs) is a valid
1854 * revnum, then do an out-of-dateness check. If the revnum is less
1855 * than the last-changed-revision of any path (or if a path doesn't
1856 * exist in HEAD), call @a lock_func/@a lock_baton with an
1857 * SVN_ERR_RA_OUT_OF_DATE error.
1859 * After successfully locking a file, @a lock_func is called with the
1862 * Use @a pool for temporary allocations.
1864 * @since New in 1.2.
1867 svn_ra_lock(svn_ra_session_t *session,
1868 apr_hash_t *path_revs,
1869 const char *comment,
1870 svn_boolean_t steal_lock,
1871 svn_ra_lock_callback_t lock_func,
1876 * Remove the repository lock for each path in @a path_tokens.
1877 * @a path_tokens is a hash whose keys are the paths to be locked, and
1878 * whose values are the corresponding lock tokens for each path. If
1879 * the path has no corresponding lock token, or if @a break_lock is TRUE,
1880 * then the corresponding value shall be "".
1882 * Note that unlocking is never anonymous, so any server
1883 * implementing this function will have to "pull" a username from
1884 * the client, if it hasn't done so already.
1886 * If @a token points to a lock, but the RA username doesn't match the
1887 * lock's owner, call @a lock_func/@a lock_baton with an error. If @a
1888 * break_lock is TRUE, however, instead allow the lock to be "broken"
1891 * After successfully unlocking a path, @a lock_func is called with
1892 * the @a lock_baton.
1894 * Use @a pool for temporary allocations.
1896 * @since New in 1.2.
1899 svn_ra_unlock(svn_ra_session_t *session,
1900 apr_hash_t *path_tokens,
1901 svn_boolean_t break_lock,
1902 svn_ra_lock_callback_t lock_func,
1907 * If @a path is locked, set @a *lock to an svn_lock_t which
1908 * represents the lock, allocated in @a pool.
1910 * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
1912 * @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
1913 * when @a path didn't exist in HEAD on specific ra layers.
1915 * @since New in 1.2.
1918 svn_ra_get_lock(svn_ra_session_t *session,
1924 * Set @a *locks to a hashtable which represents all locks on or
1927 * @a depth limits the returned locks to those associated with paths
1928 * within the specified depth of @a path, and must be one of the
1929 * following values: #svn_depth_empty, #svn_depth_files,
1930 * #svn_depth_immediates, or #svn_depth_infinity.
1932 * The hashtable maps (const char *) absolute fs paths to (const
1933 * svn_lock_t *) structures. The hashtable -- and all keys and
1934 * values -- are allocated in @a pool.
1936 * @note It is not considered an error for @a path to not exist in HEAD.
1937 * Such a search will simply return no locks.
1939 * @note This functionality is not available in pre-1.2 servers. If the
1940 * server doesn't implement it, an @c SVN_ERR_RA_NOT_IMPLEMENTED error is
1943 * @since New in 1.7.
1946 svn_ra_get_locks2(svn_ra_session_t *session,
1953 * Similar to svn_ra_get_locks2(), but with @a depth always passed as
1954 * #svn_depth_infinity.
1956 * @since New in 1.2.
1957 * @deprecated Provided for backward compatibility with the 1.6 API.
1961 svn_ra_get_locks(svn_ra_session_t *session,
1968 * Replay the changes from a range of revisions between @a start_revision
1969 * and @a end_revision.
1971 * When receiving information for one revision, a callback @a revstart_func is
1972 * called; this callback will provide an editor and baton through which the
1973 * revision will be replayed.
1974 * When replaying the revision is finished, callback @a revfinish_func will be
1975 * called so the editor can be closed.
1977 * Changes will be limited to those that occur under @a session's URL, and
1978 * the server will assume that the client has no knowledge of revisions
1979 * prior to @a low_water_mark. These two limiting factors define the portion
1980 * of the tree that the server will assume the client already has knowledge of,
1981 * and thus any copies of data from outside that part of the tree will be
1982 * sent in their entirety, not as simple copies or deltas against a previous
1985 * If @a send_deltas is @c TRUE, the actual text and property changes in
1986 * the revision will be sent, otherwise dummy text deltas and NULL property
1987 * changes will be sent instead.
1989 * @a pool is used for all allocation.
1991 * @since New in 1.5.
1994 svn_ra_replay_range(svn_ra_session_t *session,
1995 svn_revnum_t start_revision,
1996 svn_revnum_t end_revision,
1997 svn_revnum_t low_water_mark,
1998 svn_boolean_t send_deltas,
1999 svn_ra_replay_revstart_callback_t revstart_func,
2000 svn_ra_replay_revfinish_callback_t revfinish_func,
2005 * Replay the changes from @a revision through @a editor and @a edit_baton.
2007 * Changes will be limited to those that occur under @a session's URL, and
2008 * the server will assume that the client has no knowledge of revisions
2009 * prior to @a low_water_mark. These two limiting factors define the portion
2010 * of the tree that the server will assume the client already has knowledge of,
2011 * and thus any copies of data from outside that part of the tree will be
2012 * sent in their entirety, not as simple copies or deltas against a previous
2015 * If @a send_deltas is @c TRUE, the actual text and property changes in
2016 * the revision will be sent, otherwise dummy text deltas and null property
2017 * changes will be sent instead.
2019 * @a pool is used for all allocation.
2021 * @since New in 1.4.
2024 svn_ra_replay(svn_ra_session_t *session,
2025 svn_revnum_t revision,
2026 svn_revnum_t low_water_mark,
2027 svn_boolean_t send_deltas,
2028 const svn_delta_editor_t *editor,
2033 * Given @a path at revision @a peg_revision, set @a *revision_deleted to the
2034 * revision @a path was first deleted, within the inclusive revision range
2035 * defined by @a peg_revision and @a end_revision. @a path is relative
2036 * to the URL in @a session.
2038 * If @a path does not exist at @a peg_revision or was not deleted within
2039 * the specified range, then set @a *revision_deleted to @c SVN_INVALID_REVNUM.
2040 * If @a peg_revision or @a end_revision are invalid or if @a peg_revision is
2041 * greater than @a end_revision, then return @c SVN_ERR_CLIENT_BAD_REVISION.
2043 * Use @a pool for all allocations.
2045 * @since New in 1.6.
2048 svn_ra_get_deleted_rev(svn_ra_session_t *session,
2050 svn_revnum_t peg_revision,
2051 svn_revnum_t end_revision,
2052 svn_revnum_t *revision_deleted,
2056 * Set @a *inherited_props to a depth-first ordered array of
2057 * #svn_prop_inherited_item_t * structures representing the properties
2058 * inherited by @a path at @a revision (or the 'head' revision if
2059 * @a revision is @c SVN_INVALID_REVNUM). Interpret @a path relative to
2060 * the URL in @a session. Use @a pool for all allocations. If no
2061 * inheritable properties are found, then set @a *inherited_props to
2064 * The #svn_prop_inherited_item_t->path_or_url members of the
2065 * #svn_prop_inherited_item_t * structures in @a *inherited_props are
2066 * paths relative to the repository root URL (of the repository which
2067 * @a ra_session is associated).
2069 * Allocate @a *inherited_props in @a result_pool. Use @a scratch_pool
2070 * for temporary allocations.
2072 * @since New in 1.8.
2075 svn_ra_get_inherited_props(svn_ra_session_t *session,
2076 apr_array_header_t **inherited_props,
2078 svn_revnum_t revision,
2079 apr_pool_t *result_pool,
2080 apr_pool_t *scratch_pool);
2083 * @defgroup Capabilities Dynamically query the server's capabilities.
2089 * Set @a *has to TRUE if the server represented by @a session has
2090 * @a capability (one of the capabilities beginning with
2091 * @c "SVN_RA_CAPABILITY_"), else set @a *has to FALSE.
2093 * If @a capability isn't recognized, throw @c SVN_ERR_UNKNOWN_CAPABILITY,
2094 * with the effect on @a *has undefined.
2096 * Use @a pool for all allocation.
2098 * @since New in 1.5.
2101 svn_ra_has_capability(svn_ra_session_t *session,
2103 const char *capability,
2107 * The capability of understanding @c svn_depth_t (e.g., the server
2108 * understands what the client means when the client describes the
2109 * depth of a working copy to the server.)
2111 * @since New in 1.5.
2113 #define SVN_RA_CAPABILITY_DEPTH "depth"
2116 * The capability of doing the right thing with merge-tracking
2117 * information. This capability should be reported bidirectionally,
2118 * because some repositories may want to reject clients that do not
2119 * self-report as knowing how to handle merge-tracking.
2121 * @since New in 1.5.
2123 #define SVN_RA_CAPABILITY_MERGEINFO "mergeinfo"
2126 * The capability of retrieving arbitrary revprops in svn_ra_get_log2.
2128 * @since New in 1.5.
2130 #define SVN_RA_CAPABILITY_LOG_REVPROPS "log-revprops"
2133 * The capability of replaying a directory in the repository (partial replay).
2135 * @since New in 1.5.
2137 #define SVN_RA_CAPABILITY_PARTIAL_REPLAY "partial-replay"
2140 * The capability of including revision properties in a commit.
2142 * @since New in 1.5.
2144 #define SVN_RA_CAPABILITY_COMMIT_REVPROPS "commit-revprops"
2147 * The capability of specifying (and atomically verifying) expected
2148 * preexisting values when modifying revprops.
2150 * @since New in 1.7.
2152 #define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
2155 * The capability to get inherited properties.
2157 * @since New in 1.8.
2159 #define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props"
2162 * The capability of a server to automatically remove transaction
2163 * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX.
2165 * @since New in 1.8.
2167 #define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
2170 * The capability of a server to walk revisions backwards in
2171 * svn_ra_get_file_revs2
2173 * @since New in 1.8.
2175 #define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE "get-file-revs-reversed"
2178 /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
2180 * RA layers generally fetch all capabilities when asked about any
2181 * capability, to save future round trips. So if you add a new
2182 * capability here, make sure to update the RA layers to remember
2183 * it after any capabilities query.
2185 * Also note that capability strings should not include colons,
2186 * because we pass a list of client capabilities to the start-commit
2187 * hook as a single, colon-separated string.
2194 * Append a textual list of all available RA modules to the stringbuf
2197 * @since New in 1.2.
2200 svn_ra_print_modules(svn_stringbuf_t *output,
2205 * Similar to svn_ra_print_modules().
2206 * @a ra_baton is ignored.
2208 * @deprecated Provided for backward compatibility with the 1.1 API.
2212 svn_ra_print_ra_libraries(svn_stringbuf_t **descriptions,
2219 * Using this callback struct is similar to calling the newer public
2220 * interface that is based on @c svn_ra_session_t.
2222 * @deprecated Provided for backward compatibility with the 1.1 API.
2224 typedef struct svn_ra_plugin_t
2226 /** The proper name of the RA library, (like "ra_serf" or "ra_local") */
2229 /** Short doc string printed out by `svn --version` */
2230 const char *description;
2232 /* The vtable hooks */
2234 /** Call svn_ra_open() and set @a session_baton to an object representing
2235 * the new session. All other arguments are passed to svn_ra_open().
2237 svn_error_t *(*open)(void **session_baton,
2238 const char *repos_URL,
2239 const svn_ra_callbacks_t *callbacks,
2240 void *callback_baton,
2244 /** Call svn_ra_get_latest_revnum() with the session associated with
2245 * @a session_baton and all other arguments.
2247 svn_error_t *(*get_latest_revnum)(void *session_baton,
2248 svn_revnum_t *latest_revnum,
2251 /** Call svn_ra_get_dated_revision() with the session associated with
2252 * @a session_baton and all other arguments.
2254 svn_error_t *(*get_dated_revision)(void *session_baton,
2255 svn_revnum_t *revision,
2259 /** Call svn_ra_change_rev_prop() with the session associated with
2260 * @a session_baton and all other arguments.
2262 svn_error_t *(*change_rev_prop)(void *session_baton,
2265 const svn_string_t *value,
2268 /** Call svn_ra_rev_proplist() with the session associated with
2269 * @a session_baton and all other arguments.
2271 svn_error_t *(*rev_proplist)(void *session_baton,
2276 /** Call svn_ra_rev_prop() with the session associated with
2277 * @a session_baton and all other arguments.
2279 svn_error_t *(*rev_prop)(void *session_baton,
2282 svn_string_t **value,
2285 /** Call svn_ra_get_commit_editor() with the session associated with
2286 * @a session_baton and all other arguments plus @a lock_tokens set to
2287 * @c NULL and @a keep_locks set to @c TRUE.
2289 svn_error_t *(*get_commit_editor)(void *session_baton,
2290 const svn_delta_editor_t **editor,
2292 const char *log_msg,
2293 svn_commit_callback_t callback,
2294 void *callback_baton,
2297 /** Call svn_ra_get_file() with the session associated with
2298 * @a session_baton and all other arguments.
2300 svn_error_t *(*get_file)(void *session_baton,
2302 svn_revnum_t revision,
2303 svn_stream_t *stream,
2304 svn_revnum_t *fetched_rev,
2308 /** Call svn_ra_get_dir() with the session associated with
2309 * @a session_baton and all other arguments.
2311 svn_error_t *(*get_dir)(void *session_baton,
2313 svn_revnum_t revision,
2314 apr_hash_t **dirents,
2315 svn_revnum_t *fetched_rev,
2319 /** Call svn_ra_do_update() with the session associated with
2320 * @a session_baton and all other arguments.
2322 svn_error_t *(*do_update)(void *session_baton,
2323 const svn_ra_reporter_t **reporter,
2324 void **report_baton,
2325 svn_revnum_t revision_to_update_to,
2326 const char *update_target,
2327 svn_boolean_t recurse,
2328 const svn_delta_editor_t *update_editor,
2332 /** Call svn_ra_do_switch() with the session associated with
2333 * @a session_baton and all other arguments.
2335 svn_error_t *(*do_switch)(void *session_baton,
2336 const svn_ra_reporter_t **reporter,
2337 void **report_baton,
2338 svn_revnum_t revision_to_switch_to,
2339 const char *switch_target,
2340 svn_boolean_t recurse,
2341 const char *switch_url,
2342 const svn_delta_editor_t *switch_editor,
2346 /** Call svn_ra_do_status() with the session associated with
2347 * @a session_baton and all other arguments.
2349 svn_error_t *(*do_status)(void *session_baton,
2350 const svn_ra_reporter_t **reporter,
2351 void **report_baton,
2352 const char *status_target,
2353 svn_revnum_t revision,
2354 svn_boolean_t recurse,
2355 const svn_delta_editor_t *status_editor,
2359 /** Call svn_ra_do_diff() with the session associated with
2360 * @a session_baton and all other arguments.
2362 svn_error_t *(*do_diff)(void *session_baton,
2363 const svn_ra_reporter_t **reporter,
2364 void **report_baton,
2365 svn_revnum_t revision,
2366 const char *diff_target,
2367 svn_boolean_t recurse,
2368 svn_boolean_t ignore_ancestry,
2369 const char *versus_url,
2370 const svn_delta_editor_t *diff_editor,
2374 /** Call svn_ra_get_log() with the session associated with
2375 * @a session_baton and all other arguments. @a limit is set to 0.
2377 svn_error_t *(*get_log)(void *session_baton,
2378 const apr_array_header_t *paths,
2381 svn_boolean_t discover_changed_paths,
2382 svn_boolean_t strict_node_history,
2383 svn_log_message_receiver_t receiver,
2384 void *receiver_baton,
2387 /** Call svn_ra_check_path() with the session associated with
2388 * @a session_baton and all other arguments.
2390 svn_error_t *(*check_path)(void *session_baton,
2392 svn_revnum_t revision,
2393 svn_node_kind_t *kind,
2396 /** Call svn_ra_get_uuid() with the session associated with
2397 * @a session_baton and all other arguments.
2399 svn_error_t *(*get_uuid)(void *session_baton,
2403 /** Call svn_ra_get_repos_root() with the session associated with
2404 * @a session_baton and all other arguments.
2406 svn_error_t *(*get_repos_root)(void *session_baton,
2411 * Call svn_ra_get_locations() with the session associated with
2412 * @a session_baton and all other arguments.
2414 * @since New in 1.1.
2416 svn_error_t *(*get_locations)(void *session_baton,
2417 apr_hash_t **locations,
2419 svn_revnum_t peg_revision,
2420 apr_array_header_t *location_revisions,
2424 * Call svn_ra_get_file_revs() with the session associated with
2425 * @a session_baton and all other arguments.
2427 * @since New in 1.1.
2429 svn_error_t *(*get_file_revs)(void *session_baton,
2433 svn_ra_file_rev_handler_t handler,
2434 void *handler_baton,
2438 * Return the plugin's version information.
2440 * @since New in 1.1.
2442 const svn_version_t *(*get_version)(void);
2448 * All "ra_FOO" implementations *must* export a function named
2449 * svn_ra_FOO_init() of type @c svn_ra_init_func_t.
2451 * When called by libsvn_client, this routine adds an entry (or
2452 * entries) to the hash table for any URL schemes it handles. The hash
2453 * value must be of type (<tt>@c svn_ra_plugin_t *</tt>). @a pool is a
2454 * pool for allocating configuration / one-time data.
2456 * This type is defined to use the "C Calling Conventions" to ensure that
2457 * abi_version is the first parameter. The RA plugin must check that value
2458 * before accessing the other parameters.
2460 * ### need to force this to be __cdecl on Windows... how??
2462 * @deprecated Provided for backward compatibility with the 1.1 API.
2464 typedef svn_error_t *(*svn_ra_init_func_t)(int abi_version,
2469 * The current ABI (Application Binary Interface) version for the
2470 * RA plugin model. This version number will change when the ABI
2471 * between the SVN core (e.g. libsvn_client) and the RA plugin changes.
2473 * An RA plugin should verify that the passed version number is acceptable
2474 * before accessing the rest of the parameters, and before returning any
2477 * It is entirely acceptable for an RA plugin to accept multiple ABI
2478 * versions. It can simply interpret the parameters based on the version,
2479 * and it can return different plugin structures.
2483 * VSN DATE REASON FOR CHANGE
2484 * --- ---------- ------------------------------------------------
2485 * 1 2001-02-17 Initial revision.
2486 * 2 2004-06-29 Preparing for svn 1.1, which adds new RA vtable funcs.
2487 * 2005-01-19 Rework the plugin interface and don't provide the vtable
2488 * to the client. Separate ABI versions are no longer used.
2491 * @deprecated Provided for backward compatibility with the 1.0 API.
2493 #define SVN_RA_ABI_VERSION 2
2495 /* Public RA implementations. */
2497 /** Initialize libsvn_ra_serf.
2499 * @deprecated Provided for backward compatibility with the 1.1 API. */
2502 svn_ra_dav_init(int abi_version,
2506 /** Initialize libsvn_ra_local.
2508 * @deprecated Provided for backward compatibility with the 1.1 API. */
2511 svn_ra_local_init(int abi_version,
2515 /** Initialize libsvn_ra_svn.
2517 * @deprecated Provided for backward compatibility with the 1.1 API. */
2520 svn_ra_svn_init(int abi_version,
2524 /** Initialize libsvn_ra_serf.
2526 * @since New in 1.4.
2527 * @deprecated Provided for backward compatibility with the 1.1 API. */
2530 svn_ra_serf_init(int abi_version,
2536 * Initialize the compatibility wrapper, using @a pool for any allocations.
2537 * The caller must hold on to @a ra_baton as long as the RA library is used.
2539 * @deprecated Provided for backward compatibility with the 1.1 API.
2543 svn_ra_init_ra_libs(void **ra_baton,
2547 * Return an RA vtable-@a library which can handle URL. A number of
2548 * svn_client_* routines will call this internally, but client apps might
2549 * use it too. $a ra_baton is a baton obtained by a call to
2550 * svn_ra_init_ra_libs().
2552 * @deprecated Provided for backward compatibility with the 1.1 API.
2556 svn_ra_get_ra_library(svn_ra_plugin_t **library,
2563 #endif /* __cplusplus */
2565 #endif /* SVN_RA_H */