117680Spst/**
217680Spst * @copyright
317680Spst * ====================================================================
417680Spst *    Licensed to the Apache Software Foundation (ASF) under one
517680Spst *    or more contributor license agreements.  See the NOTICE file
617680Spst *    distributed with this work for additional information
717680Spst *    regarding copyright ownership.  The ASF licenses this file
817680Spst *    to you under the Apache License, Version 2.0 (the
917680Spst *    "License"); you may not use this file except in compliance
1017680Spst *    with the License.  You may obtain a copy of the License at
1117680Spst *
1217680Spst *      http://www.apache.org/licenses/LICENSE-2.0
1317680Spst *
1417680Spst *    Unless required by applicable law or agreed to in writing,
1517680Spst *    software distributed under the License is distributed on an
1617680Spst *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1717680Spst *    KIND, either express or implied.  See the License for the
1817680Spst *    specific language governing permissions and limitations
1917680Spst *    under the License.
2017680Spst * ====================================================================
2117680Spst * @endcopyright
2217680Spst *
2317680Spst * @file ra_loader.h
2417680Spst * @brief structures related to repository access, private to libsvn_ra and the
2517680Spst * RA implementation libraries.
2617680Spst */
2717680Spst
2817680Spst
2917680Spst
3017680Spst#ifndef LIBSVN_RA_RA_LOADER_H
3117680Spst#define LIBSVN_RA_RA_LOADER_H
3217680Spst
3317680Spst#include "svn_ra.h"
3417680Spst
3517680Spst#include "private/svn_ra_private.h"
3617680Spst
3717680Spst#ifdef __cplusplus
3817680Spstextern "C" {
3917680Spst#endif
4017680Spst
4117680Spst/* The RA layer vtable. */
4217680Spsttypedef struct svn_ra__vtable_t {
4317680Spst  /* This field should always remain first in the vtable. */
4417680Spst  const svn_version_t *(*get_version)(void);
4517680Spst
4617680Spst  /* Return a short description of the RA implementation, as a localized
4717680Spst   * string. */
4817680Spst  const char *(*get_description)(void);
4917680Spst
5017680Spst  /* Return a list of actual URI schemes supported by this implementation.
5117680Spst   * The returned array is NULL-terminated. */
5217680Spst  const char * const *(*get_schemes)(apr_pool_t *pool);
5317680Spst
5417680Spst  /* Implementations of the public API functions. */
5517680Spst
5617680Spst  /* See svn_ra_open4(). */
5717680Spst  /* All fields in SESSION, except priv, have been initialized by the
5817680Spst     time this is called.  SESSION->priv may be set by this function. */
5917680Spst  svn_error_t *(*open_session)(svn_ra_session_t *session,
6017680Spst                               const char **corrected_url,
6117680Spst                               const char *session_URL,
6217680Spst                               const svn_ra_callbacks2_t *callbacks,
6317680Spst                               void *callback_baton,
6417680Spst                               apr_hash_t *config,
6517680Spst                               apr_pool_t *pool);
6617680Spst  /* See svn_ra_reparent(). */
6717680Spst  /* URL is guaranteed to have what get_repos_root() returns as a prefix. */
6817680Spst  svn_error_t *(*reparent)(svn_ra_session_t *session,
6917680Spst                           const char *url,
7017680Spst                           apr_pool_t *pool);
7117680Spst  /* See svn_ra_get_session_url(). */
7217680Spst  svn_error_t *(*get_session_url)(svn_ra_session_t *session,
7317680Spst                                  const char **url,
7417680Spst                                  apr_pool_t *pool);
7517680Spst  /* See svn_ra_get_latest_revnum(). */
7617680Spst  svn_error_t *(*get_latest_revnum)(svn_ra_session_t *session,
7717680Spst                                    svn_revnum_t *latest_revnum,
7817680Spst                                    apr_pool_t *pool);
7917680Spst  /* See svn_ra_get_dated_revision(). */
8017680Spst  svn_error_t *(*get_dated_revision)(svn_ra_session_t *session,
8117680Spst                                     svn_revnum_t *revision,
8217680Spst                                     apr_time_t tm,
8317680Spst                                     apr_pool_t *pool);
8417680Spst  /* See svn_ra_change_rev_prop2(). */
8517680Spst  svn_error_t *(*change_rev_prop)(svn_ra_session_t *session,
8617680Spst                                  svn_revnum_t rev,
8717680Spst                                  const char *name,
8817680Spst                                  const svn_string_t *const *old_value_p,
8917680Spst                                  const svn_string_t *value,
9017680Spst                                  apr_pool_t *pool);
9117680Spst
9217680Spst  /* See svn_ra_rev_proplist(). */
9317680Spst  svn_error_t *(*rev_proplist)(svn_ra_session_t *session,
9417680Spst                               svn_revnum_t rev,
9517680Spst                               apr_hash_t **props,
9617680Spst                               apr_pool_t *pool);
9717680Spst  /* See svn_ra_rev_prop(). */
9817680Spst  svn_error_t *(*rev_prop)(svn_ra_session_t *session,
9917680Spst                           svn_revnum_t rev,
10017680Spst                           const char *name,
10117680Spst                           svn_string_t **value,
10217680Spst                           apr_pool_t *pool);
10317680Spst  /* See svn_ra_get_commit_editor3(). */
10417680Spst  svn_error_t *(*get_commit_editor)(svn_ra_session_t *session,
10517680Spst                                    const svn_delta_editor_t **editor,
10617680Spst                                    void **edit_baton,
10717680Spst                                    apr_hash_t *revprop_table,
10817680Spst                                    svn_commit_callback2_t callback,
10917680Spst                                    void *callback_baton,
11017680Spst                                    apr_hash_t *lock_tokens,
11117680Spst                                    svn_boolean_t keep_locks,
11217680Spst                                    apr_pool_t *pool);
11317680Spst  /* See svn_ra_get_file(). */
11417680Spst  svn_error_t *(*get_file)(svn_ra_session_t *session,
11517680Spst                           const char *path,
11617680Spst                           svn_revnum_t revision,
11717680Spst                           svn_stream_t *stream,
11817680Spst                           svn_revnum_t *fetched_rev,
11917680Spst                           apr_hash_t **props,
12017680Spst                           apr_pool_t *pool);
12117680Spst  /* See svn_ra_get_dir2(). */
12217680Spst  svn_error_t *(*get_dir)(svn_ra_session_t *session,
12317680Spst                          apr_hash_t **dirents,
12417680Spst                          svn_revnum_t *fetched_rev,
12517680Spst                          apr_hash_t **props,
12617680Spst                          const char *path,
12717680Spst                          svn_revnum_t revision,
12817680Spst                          apr_uint32_t dirent_fields,
12917680Spst                          apr_pool_t *pool);
13017680Spst  /* See svn_ra_get_mergeinfo(). */
13117680Spst  svn_error_t *(*get_mergeinfo)(svn_ra_session_t *session,
13217680Spst                                svn_mergeinfo_catalog_t *mergeinfo,
13317680Spst                                const apr_array_header_t *paths,
13417680Spst                                svn_revnum_t revision,
13517680Spst                                svn_mergeinfo_inheritance_t inherit,
13617680Spst                                svn_boolean_t include_merged_revisions,
13717680Spst                                apr_pool_t *pool);
13817680Spst  /* See svn_ra_do_update3(). */
13917680Spst  svn_error_t *(*do_update)(svn_ra_session_t *session,
14017680Spst                            const svn_ra_reporter3_t **reporter,
14117680Spst                            void **report_baton,
14217680Spst                            svn_revnum_t revision_to_update_to,
14317680Spst                            const char *update_target,
14417680Spst                            svn_depth_t depth,
14517680Spst                            svn_boolean_t send_copyfrom_args,
14617680Spst                            svn_boolean_t ignore_ancestry,
14717680Spst                            const svn_delta_editor_t *update_editor,
14817680Spst                            void *update_baton,
14917680Spst                            apr_pool_t *result_pool,
15017680Spst                            apr_pool_t *scratch_pool);
15117680Spst  /* See svn_ra_do_switch3(). */
15217680Spst  svn_error_t *(*do_switch)(svn_ra_session_t *session,
15317680Spst                            const svn_ra_reporter3_t **reporter,
15417680Spst                            void **report_baton,
15517680Spst                            svn_revnum_t revision_to_switch_to,
15617680Spst                            const char *switch_target,
15717680Spst                            svn_depth_t depth,
15817680Spst                            const char *switch_url,
15917680Spst                            svn_boolean_t send_copyfrom_args,
16017680Spst                            svn_boolean_t ignore_ancestry,
16117680Spst                            const svn_delta_editor_t *switch_editor,
16217680Spst                            void *switch_baton,
16317680Spst                            apr_pool_t *result_pool,
16417680Spst                            apr_pool_t *scratch_pool);
16517680Spst  /* See svn_ra_do_status2(). */
16617680Spst  svn_error_t *(*do_status)(svn_ra_session_t *session,
16717680Spst                            const svn_ra_reporter3_t **reporter,
16817680Spst                            void **report_baton,
16917680Spst                            const char *status_target,
17017680Spst                            svn_revnum_t revision,
17117680Spst                            svn_depth_t depth,
17217680Spst                            const svn_delta_editor_t *status_editor,
17317680Spst                            void *status_baton,
17417680Spst                            apr_pool_t *pool);
17517680Spst  /* See svn_ra_do_diff3(). */
17617680Spst  svn_error_t *(*do_diff)(svn_ra_session_t *session,
17717680Spst                          const svn_ra_reporter3_t **reporter,
17817680Spst                          void **report_baton,
17917680Spst                          svn_revnum_t revision,
18017680Spst                          const char *diff_target,
18117680Spst                          svn_depth_t depth,
18217680Spst                          svn_boolean_t ignore_ancestry,
18317680Spst                          svn_boolean_t text_deltas,
18417680Spst                          const char *versus_url,
18517680Spst                          const svn_delta_editor_t *diff_editor,
18617680Spst                          void *diff_baton,
18717680Spst                          apr_pool_t *pool);
18817680Spst  /* See svn_ra_get_log2(). */
18917680Spst  svn_error_t *(*get_log)(svn_ra_session_t *session,
19017680Spst                          const apr_array_header_t *paths,
19117680Spst                          svn_revnum_t start,
19217680Spst                          svn_revnum_t end,
19317680Spst                          int limit,
19417680Spst                          svn_boolean_t discover_changed_paths,
19517680Spst                          svn_boolean_t strict_node_history,
19617680Spst                          svn_boolean_t include_merged_revisions,
19717680Spst                          const apr_array_header_t *revprops,
19817680Spst                          svn_log_entry_receiver_t receiver,
19917680Spst                          void *receiver_baton,
20017680Spst                          apr_pool_t *pool);
20117680Spst  /* See svn_ra_check_path(). */
20217680Spst  svn_error_t *(*check_path)(svn_ra_session_t *session,
20317680Spst                             const char *path,
20417680Spst                             svn_revnum_t revision,
20517680Spst                             svn_node_kind_t *kind,
20617680Spst                             apr_pool_t *pool);
20717680Spst  /* See svn_ra_stat(). */
20817680Spst  svn_error_t *(*stat)(svn_ra_session_t *session,
20917680Spst                       const char *path,
21017680Spst                       svn_revnum_t revision,
21117680Spst                       svn_dirent_t **dirent,
21217680Spst                       apr_pool_t *pool);
21317680Spst  /* See svn_ra_get_uuid2(). */
21417680Spst  svn_error_t *(*get_uuid)(svn_ra_session_t *session,
21517680Spst                           const char **uuid,
21617680Spst                           apr_pool_t *pool);
21717680Spst  /* See svn_ra_get_repos_root2(). */
21817680Spst  svn_error_t *(*get_repos_root)(svn_ra_session_t *session,
21917680Spst                                 const char **url,
22017680Spst                                 apr_pool_t *pool);
22117680Spst  /* See svn_ra_get_locations(). */
22217680Spst  svn_error_t *(*get_locations)(svn_ra_session_t *session,
22317680Spst                                apr_hash_t **locations,
22417680Spst                                const char *path,
22517680Spst                                svn_revnum_t peg_revision,
22617680Spst                                const apr_array_header_t *location_revisions,
22717680Spst                                apr_pool_t *pool);
22817680Spst  /* See svn_ra_get_location_segments(). */
22917680Spst  svn_error_t *(*get_location_segments)(svn_ra_session_t *session,
23017680Spst                                        const char *path,
23117680Spst                                        svn_revnum_t peg_revision,
23217680Spst                                        svn_revnum_t start_rev,
23317680Spst                                        svn_revnum_t end_rev,
23417680Spst                                        svn_location_segment_receiver_t rcvr,
23517680Spst                                        void *receiver_baton,
23617680Spst                                        apr_pool_t *pool);
23717680Spst  /* See svn_ra_get_file_revs2(). */
23817680Spst  svn_error_t *(*get_file_revs)(svn_ra_session_t *session,
23917680Spst                                const char *path,
24017680Spst                                svn_revnum_t start,
24117680Spst                                svn_revnum_t end,
24217680Spst                                svn_boolean_t include_merged_revisions,
24317680Spst                                svn_file_rev_handler_t handler,
24417680Spst                                void *handler_baton,
24517680Spst                                apr_pool_t *pool);
24617680Spst  /* See svn_ra_lock(). */
24717680Spst  svn_error_t *(*lock)(svn_ra_session_t *session,
24817680Spst                       apr_hash_t *path_revs,
24917680Spst                       const char *comment,
25017680Spst                       svn_boolean_t force,
25117680Spst                       svn_ra_lock_callback_t lock_func,
25217680Spst                       void *lock_baton,
25317680Spst                       apr_pool_t *pool);
25417680Spst  /* See svn_ra_unlock(). */
25517680Spst  svn_error_t *(*unlock)(svn_ra_session_t *session,
25617680Spst                         apr_hash_t *path_tokens,
25717680Spst                         svn_boolean_t force,
25817680Spst                         svn_ra_lock_callback_t lock_func,
25917680Spst                         void *lock_baton,
26017680Spst                         apr_pool_t *pool);
26117680Spst  /* See svn_ra_get_lock(). */
26217680Spst  svn_error_t *(*get_lock)(svn_ra_session_t *session,
26317680Spst                           svn_lock_t **lock,
26417680Spst                           const char *path,
26517680Spst                           apr_pool_t *pool);
26617680Spst  /* See svn_ra_get_locks2(). */
26717680Spst  svn_error_t *(*get_locks)(svn_ra_session_t *session,
26817680Spst                            apr_hash_t **locks,
26917680Spst                            const char *path,
27017680Spst                            svn_depth_t depth,
27117680Spst                            apr_pool_t *pool);
27217680Spst  /* See svn_ra_replay(). */
27317680Spst  svn_error_t *(*replay)(svn_ra_session_t *session,
27417680Spst                         svn_revnum_t revision,
27517680Spst                         svn_revnum_t low_water_mark,
27617680Spst                         svn_boolean_t text_deltas,
27717680Spst                         const svn_delta_editor_t *editor,
27817680Spst                         void *edit_baton,
27917680Spst                         apr_pool_t *pool);
28017680Spst  /* See svn_ra_has_capability(). */
28117680Spst  svn_error_t *(*has_capability)(svn_ra_session_t *session,
28217680Spst                                 svn_boolean_t *has,
28317680Spst                                 const char *capability,
28417680Spst                                 apr_pool_t *pool);
28517680Spst  /* See svn_ra_replay_range(). */
28617680Spst  svn_error_t *
28717680Spst  (*replay_range)(svn_ra_session_t *session,
28817680Spst                  svn_revnum_t start_revision,
28917680Spst                  svn_revnum_t end_revision,
29017680Spst                  svn_revnum_t low_water_mark,
29117680Spst                  svn_boolean_t text_deltas,
29217680Spst                  svn_ra_replay_revstart_callback_t revstart_func,
29317680Spst                  svn_ra_replay_revfinish_callback_t revfinish_func,
29417680Spst                  void *replay_baton,
29517680Spst                  apr_pool_t *pool);
29617680Spst  /* See svn_ra_get_deleted_rev(). */
29717680Spst  svn_error_t *(*get_deleted_rev)(svn_ra_session_t *session,
29817680Spst                                  const char *path,
29917680Spst                                  svn_revnum_t peg_revision,
30017680Spst                                  svn_revnum_t end_revision,
30117680Spst                                  svn_revnum_t *revision_deleted,
30217680Spst                                  apr_pool_t *pool);
30317680Spst
30417680Spst  /* See svn_ra__register_editor_shim_callbacks() */
30517680Spst  svn_error_t *(*register_editor_shim_callbacks)(svn_ra_session_t *session,
30617680Spst                                    svn_delta_shim_callbacks_t *callbacks);
30717680Spst  /* See svn_ra_get_inherited_props(). */
30817680Spst  svn_error_t *(*get_inherited_props)(svn_ra_session_t *session,
30917680Spst                                      apr_array_header_t **iprops,
31017680Spst                                      const char *path,
31117680Spst                                      svn_revnum_t revision,
31217680Spst                                      apr_pool_t *result_pool,
31317680Spst                                      apr_pool_t *scratch_pool);
31417680Spst  /* See svn_ra__get_commit_ev2()  */
31517680Spst  svn_error_t *(*get_commit_ev2)(
31617680Spst    svn_editor_t **editor,
31717680Spst    svn_ra_session_t *session,
31817680Spst    apr_hash_t *revprop_table,
31917680Spst    svn_commit_callback2_t callback,
32017680Spst    void *callback_baton,
32117680Spst    apr_hash_t *lock_tokens,
32217680Spst    svn_boolean_t keep_locks,
32317680Spst    svn_ra__provide_base_cb_t provide_base_cb,
32417680Spst    svn_ra__provide_props_cb_t provide_props_cb,
32517680Spst    svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
32617680Spst    void *cb_baton,
32717680Spst    svn_cancel_func_t cancel_func,
32817680Spst    void *cancel_baton,
32917680Spst    apr_pool_t *result_pool,
33017680Spst    apr_pool_t *scratch_pool);
33117680Spst
33217680Spst  /* See svn_ra__replay_range_ev2() */
33317680Spst  svn_error_t *(*replay_range_ev2)(
33417680Spst    svn_ra_session_t *session,
33517680Spst    svn_revnum_t start_revision,
33617680Spst    svn_revnum_t end_revision,
33717680Spst    svn_revnum_t low_water_mark,
33817680Spst    svn_boolean_t send_deltas,
33917680Spst    svn_ra__replay_revstart_ev2_callback_t revstart_func,
34017680Spst    svn_ra__replay_revfinish_ev2_callback_t revfinish_func,
34117680Spst    void *replay_baton,
34217680Spst    apr_pool_t *scratch_pool);
34317680Spst
34417680Spst} svn_ra__vtable_t;
34517680Spst
34617680Spst/* The RA session object. */
34717680Spststruct svn_ra_session_t {
34817680Spst  const svn_ra__vtable_t *vtable;
34917680Spst
35017680Spst  /* Cancellation handlers consumers may want to use. */
35117680Spst  svn_cancel_func_t cancel_func;
35217680Spst  void *cancel_baton;
35317680Spst
35417680Spst  /* Pool used to manage this session. */
35517680Spst  apr_pool_t *pool;
35617680Spst
35717680Spst  /* Private data for the RA implementation. */
35817680Spst  void *priv;
35917680Spst};
36017680Spst
36117680Spst/* Each libsvn_ra_foo defines a function named svn_ra_foo__init of this type.
36217680Spst *
36317680Spst * The LOADER_VERSION parameter must remain first in the list, and the
36417680Spst * function must use the C calling convention on all platforms, so that
36517680Spst * the init functions can safely read the version parameter.
36617680Spst *
36717680Spst * POOL will be available as long as this module is being used.
36817680Spst *
36917680Spst * ### need to force this to be __cdecl on Windows... how??
37017680Spst */
37117680Spsttypedef svn_error_t *
37217680Spst(*svn_ra__init_func_t)(const svn_version_t *loader_version,
37317680Spst                       const svn_ra__vtable_t **vtable,
37417680Spst                       apr_pool_t *pool);
37517680Spst
37617680Spst/* Declarations of the init functions for the available RA libraries. */
37717680Spstsvn_error_t *svn_ra_local__init(const svn_version_t *loader_version,
37817680Spst                                const svn_ra__vtable_t **vtable,
37917680Spst                                apr_pool_t *pool);
38017680Spstsvn_error_t *svn_ra_svn__init(const svn_version_t *loader_version,
38117680Spst                              const svn_ra__vtable_t **vtable,
38217680Spst                              apr_pool_t *pool);
38317680Spstsvn_error_t *svn_ra_serf__init(const svn_version_t *loader_version,
38417680Spst                               const svn_ra__vtable_t **vtable,
38517680Spst                               apr_pool_t *pool);
38617680Spst
38717680Spst
38817680Spst
38917680Spst/*** Compat Functions ***/
39017680Spst
39117680Spst/**
39217680Spst * Set *LOCATIONS to the locations (at the repository revisions
39317680Spst * LOCATION_REVISIONS) of the file identified by PATH in PEG_REVISION.
39417680Spst * PATH is relative to the URL to which SESSION was opened.
39517680Spst * LOCATION_REVISIONS is an array of svn_revnum_t's.  *LOCATIONS will
39617680Spst * be a mapping from the revisions to their appropriate absolute
39717680Spst * paths.  If the file doesn't exist in a location_revision, that
39817680Spst * revision will be ignored.
39917680Spst *
40017680Spst * Use POOL for all allocations.
40117680Spst *
40217680Spst * NOTE: This function uses the RA get_log interfaces to do its work,
40317680Spst * as a fallback mechanism for servers which don't support the native
40417680Spst * get_locations API.
40517680Spst */
40617680Spstsvn_error_t *
40717680Spstsvn_ra__locations_from_log(svn_ra_session_t *session,
40817680Spst                           apr_hash_t **locations_p,
40917680Spst                           const char *path,
41017680Spst                           svn_revnum_t peg_revision,
41117680Spst                           const apr_array_header_t *location_revisions,
41217680Spst                           apr_pool_t *pool);
41317680Spst
41417680Spst/**
41517680Spst * Call RECEIVER (with RECEIVER_BATON) for each segment in the
41617680Spst * location history of PATH in START_REV, working backwards in time
41717680Spst * from START_REV to END_REV.
41817680Spst *
41917680Spst * END_REV may be SVN_INVALID_REVNUM to indicate that you want to
42017680Spst * trace the history of the object to its origin.
42117680Spst *
42217680Spst * START_REV may be SVN_INVALID_REVNUM to indicate that you want to
42317680Spst * trace the history of the object beginning in the HEAD revision.
42417680Spst * Otherwise, START_REV must be younger than END_REV (unless END_REV
42517680Spst * is SVN_INVALID_REVNUM).
42617680Spst *
42717680Spst * Use POOL for all allocations.
42817680Spst *
42917680Spst * NOTE: This function uses the RA get_log interfaces to do its work,
43017680Spst * as a fallback mechanism for servers which don't support the native
43117680Spst * get_location_segments API.
43217680Spst */
43317680Spstsvn_error_t *
43417680Spstsvn_ra__location_segments_from_log(svn_ra_session_t *session,
43517680Spst                                   const char *path,
43617680Spst                                   svn_revnum_t peg_revision,
43717680Spst                                   svn_revnum_t start_rev,
43817680Spst                                   svn_revnum_t end_rev,
43917680Spst                                   svn_location_segment_receiver_t receiver,
44017680Spst                                   void *receiver_baton,
44117680Spst                                   apr_pool_t *pool);
44217680Spst
44317680Spst/**
44417680Spst * Retrieve a subset of the interesting revisions of a file PATH
44517680Spst * as seen in revision END (see svn_fs_history_prev() for a
44617680Spst * definition of "interesting revisions").  Invoke HANDLER with
44717680Spst * @a handler_baton as its first argument for each such revision.
44817680Spst * @a session is an open RA session.  Use POOL for all allocations.
44917680Spst *
45017680Spst * If there is an interesting revision of the file that is less than or
45117680Spst * equal to START, the iteration will begin at that revision.
45217680Spst * Else, the iteration will begin at the first revision of the file in
45317680Spst * the repository, which has to be less than or equal to END.  Note
45417680Spst * that if the function succeeds, HANDLER will have been called at
45517680Spst * least once.
45617680Spst *
45717680Spst * In a series of calls to HANDLER, the file contents for the first
45817680Spst * interesting revision will be provided as a text delta against the
45917680Spst * empty file.  In the following calls, the delta will be against the
46017680Spst * fulltext contents for the previous call.
46117680Spst *
46217680Spst * NOTE: This function uses the RA get_log interfaces to do its work,
46317680Spst * as a fallback mechanism for servers which don't support the native
46417680Spst * get_location_segments API.
46517680Spst */
46617680Spstsvn_error_t *
46717680Spstsvn_ra__file_revs_from_log(svn_ra_session_t *session,
46817680Spst                           const char *path,
46917680Spst                           svn_revnum_t start,
47017680Spst                           svn_revnum_t end,
47117680Spst                           svn_file_rev_handler_t handler,
47217680Spst                           void *handler_baton,
47317680Spst                           apr_pool_t *pool);
47417680Spst
47517680Spst
47617680Spst/**
47717680Spst * Given a path REL_DELETED_PATH, relative to the URL of SESSION, which
47817680Spst * exists at PEG_REVISION, and an END_REVISION > PEG_REVISION at which
47917680Spst * REL_DELETED_PATH no longer exists, set *REVISION_DELETED to the revision
48017680Spst * REL_DELETED_PATH was first deleted or replaced, within the inclusive
48117680Spst * revision range defined by PEG_REVISION and END_REVISION.
48217680Spst *
48317680Spst * If REL_DELETED_PATH does not exist at PEG_REVISION or was not deleted prior
48417680Spst * to END_REVISION within the specified range, then set *REVISION_DELETED to
48517680Spst * SVN_INVALID_REVNUM.  If PEG_REVISION or END_REVISION are invalid or if
48617680Spst * END_REVISION <= PEG_REVISION, then return SVN_ERR_CLIENT_BAD_REVISION.
48717680Spst *
48817680Spst * Use POOL for all allocations.
48917680Spst *
49017680Spst * NOTE: This function uses the RA get_log interfaces to do its work,
49117680Spst * as a fallback mechanism for servers which don't support the native
49217680Spst * get_deleted_rev API.
49317680Spst */
49417680Spstsvn_error_t *
49517680Spstsvn_ra__get_deleted_rev_from_log(svn_ra_session_t *session,
49617680Spst                                 const char *rel_deleted_path,
49717680Spst                                 svn_revnum_t peg_revision,
49817680Spst                                 svn_revnum_t end_revision,
49917680Spst                                 svn_revnum_t *revision_deleted,
50017680Spst                                 apr_pool_t *pool);
50117680Spst
50217680Spst
50317680Spst/**
50417680Spst * Fallback logic for svn_ra_get_inherited_props() when that API
50517680Spst * need to find PATH's inherited properties on a legacy server that
50617680Spst * doesn't have the SVN_RA_CAPABILITY_INHERITED_PROPS capability.
50717680Spst *
50817680Spst * All arguments are as per svn_ra_get_inherited_props().
50917680Spst */
51017680Spstsvn_error_t *
51117680Spstsvn_ra__get_inherited_props_walk(svn_ra_session_t *session,
51217680Spst                                 const char *path,
51317680Spst                                 svn_revnum_t revision,
51417680Spst                                 apr_array_header_t **inherited_props,
51517680Spst                                 apr_pool_t *result_pool,
51617680Spst                                 apr_pool_t *scratch_pool);
51717680Spst
51817680Spst/* Utility function to provide a shim between a returned Ev2 and an RA
51917680Spst   provider's Ev1-based commit editor.
52017680Spst
52117680Spst   See svn_ra__get_commit_ev2() for parameter semantics.  */
52217680Spstsvn_error_t *
52317680Spstsvn_ra__use_commit_shim(svn_editor_t **editor,
52417680Spst                        svn_ra_session_t *session,
52517680Spst                        apr_hash_t *revprop_table,
52617680Spst                        svn_commit_callback2_t callback,
52717680Spst                        void *callback_baton,
52817680Spst                        apr_hash_t *lock_tokens,
52917680Spst                        svn_boolean_t keep_locks,
53017680Spst                        svn_ra__provide_base_cb_t provide_base_cb,
53117680Spst                        svn_ra__provide_props_cb_t provide_props_cb,
53217680Spst                        svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
53317680Spst                        void *cb_baton,
53417680Spst                        svn_cancel_func_t cancel_func,
53517680Spst                        void *cancel_baton,
53617680Spst                        apr_pool_t *result_pool,
53717680Spst                        apr_pool_t *scratch_pool);
53817680Spst
53917680Spst/* Utility function to provide a shim between a returned Ev2 and an RA
54017680Spst   provider's Ev1-based commit editor.
54117680Spst
54217680Spst   See svn_ra__replay_range_ev2() for parameter semantics.  */
54317680Spstsvn_error_t *
54417680Spstsvn_ra__use_replay_range_shim(svn_ra_session_t *session,
54517680Spst                              svn_revnum_t start_revision,
54617680Spst                              svn_revnum_t end_revision,
54717680Spst                              svn_revnum_t low_water_mark,
54817680Spst                              svn_boolean_t send_deltas,
54917680Spst                              svn_ra__replay_revstart_ev2_callback_t revstart_func,
55017680Spst                              svn_ra__replay_revfinish_ev2_callback_t revfinish_func,
55117680Spst                              void *replay_baton,
55217680Spst                              svn_ra__provide_base_cb_t provide_base_cb,
55317680Spst                              svn_ra__provide_props_cb_t provide_props_cb,
55417680Spst                              void *cb_baton,
55517680Spst                              apr_pool_t *scratch_pool);
55617680Spst
55717680Spst
55817680Spst#ifdef __cplusplus
55917680Spst}
56017680Spst#endif
56117680Spst
56217680Spst#endif
56317680Spst