GME  13
svn_repos.h
Go to the documentation of this file.
00001 
00027 #ifndef SVN_REPOS_H
00028 #define SVN_REPOS_H
00029 
00030 #include <apr_pools.h>
00031 #include <apr_hash.h>
00032 #include <apr_tables.h>
00033 #include <apr_time.h>
00034 
00035 #include "svn_types.h"
00036 #include "svn_string.h"
00037 #include "svn_delta.h"
00038 #include "svn_fs.h"
00039 #include "svn_io.h"
00040 #include "svn_mergeinfo.h"
00041 
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif /* __cplusplus */
00046 
00047 /* ---------------------------------------------------------------*/
00048 
00054 const svn_version_t *
00055 svn_repos_version(void);
00056 
00057 
00058 /* Some useful enums.  They need to be declared here for the notification
00059    system to pick them up. */
00061 enum svn_node_action
00062 {
00063   svn_node_action_change,
00064   svn_node_action_add,
00065   svn_node_action_delete,
00066   svn_node_action_replace
00067 };
00068 
00070 enum svn_repos_load_uuid
00071 {
00073   svn_repos_load_uuid_default,
00075   svn_repos_load_uuid_ignore,
00077   svn_repos_load_uuid_force
00078 };
00079 
00080 
00101 typedef svn_error_t *(*svn_repos_authz_func_t)(svn_boolean_t *allowed,
00102                                                svn_fs_root_t *root,
00103                                                const char *path,
00104                                                void *baton,
00105                                                apr_pool_t *pool);
00106 
00107 
00112 typedef enum svn_repos_authz_access_t
00113 {
00115   svn_authz_none = 0,
00116 
00118   svn_authz_read = 1,
00119 
00121   svn_authz_write = 2,
00122 
00124   svn_authz_recursive = 4
00125 } svn_repos_authz_access_t;
00126 
00127 
00162 typedef svn_error_t *(*svn_repos_authz_callback_t)
00163   (svn_repos_authz_access_t required,
00164    svn_boolean_t *allowed,
00165    svn_fs_root_t *root,
00166    const char *path,
00167    void *baton,
00168    apr_pool_t *pool);
00169 
00177 typedef svn_error_t *(*svn_repos_file_rev_handler_t)
00178   (void *baton,
00179    const char *path,
00180    svn_revnum_t rev,
00181    apr_hash_t *rev_props,
00182    svn_txdelta_window_handler_t *delta_handler,
00183    void **delta_baton,
00184    apr_array_header_t *prop_diffs,
00185    apr_pool_t *pool);
00186 
00187 
00188 /* Notification system. */
00189 
00194 typedef enum svn_repos_notify_action_t
00195 {
00197   svn_repos_notify_warning = 0,
00198 
00200   svn_repos_notify_dump_rev_end,
00201 
00203   svn_repos_notify_verify_rev_end,
00204 
00206   svn_repos_notify_dump_end,
00207 
00209   svn_repos_notify_verify_end,
00210 
00212   svn_repos_notify_pack_shard_start,
00213 
00215   svn_repos_notify_pack_shard_end,
00216 
00218   svn_repos_notify_pack_shard_start_revprop,
00219 
00221   svn_repos_notify_pack_shard_end_revprop,
00222 
00224   svn_repos_notify_load_txn_start,
00225 
00227   svn_repos_notify_load_txn_committed,
00228 
00230   svn_repos_notify_load_node_start,
00231 
00233   svn_repos_notify_load_node_done,
00234 
00236   svn_repos_notify_load_copied_node,
00237 
00239   svn_repos_notify_load_normalized_mergeinfo,
00240 
00242   svn_repos_notify_mutex_acquired,
00243 
00245   svn_repos_notify_recover_start,
00246 
00248   svn_repos_notify_upgrade_start,
00249 
00251   svn_repos_notify_load_skipped_rev,
00252 
00254   svn_repos_notify_verify_rev_structure
00255 
00256 } svn_repos_notify_action_t;
00257 
00262 typedef enum svn_repos_notify_warning_t
00263 {
00266   svn_repos_notify_warning_found_old_reference,
00267 
00270   svn_repos_notify_warning_found_old_mergeinfo,
00271 
00274   /* ### TODO(doxygen): make that a proper doxygen link */
00275   /* See svn_fs__path_valid(). */
00276   svn_repos_notify_warning_invalid_fspath
00277 
00278 } svn_repos_notify_warning_t;
00279 
00292 typedef struct svn_repos_notify_t
00293 {
00295   svn_repos_notify_action_t action;
00296 
00299   svn_revnum_t revision;
00300 
00303   const char *warning_str;
00304   svn_repos_notify_warning_t warning;
00305 
00310   apr_int64_t shard;
00311 
00313   svn_revnum_t new_revision;
00314 
00318   svn_revnum_t old_revision;
00319 
00322   enum svn_node_action node_action;
00323 
00325   const char *path;
00326 
00327   /* NOTE: Add new fields at the end to preserve binary compatibility.
00328      Also, if you add fields here, you have to update
00329      svn_repos_notify_create(). */
00330 } svn_repos_notify_t;
00331 
00337 typedef void (*svn_repos_notify_func_t)(void *baton,
00338                                         const svn_repos_notify_t *notify,
00339                                         apr_pool_t *scratch_pool);
00340 
00347 svn_repos_notify_t *
00348 svn_repos_notify_create(svn_repos_notify_action_t action,
00349                         apr_pool_t *result_pool);
00350 
00351 
00353 typedef struct svn_repos_t svn_repos_t;
00354 
00355 /* Opening and creating repositories. */
00356 
00357 
00364 const char *
00365 svn_repos_find_root_path(const char *path,
00366                          apr_pool_t *pool);
00367 
00380 svn_error_t *
00381 svn_repos_open2(svn_repos_t **repos_p,
00382                 const char *path,
00383                 apr_hash_t *fs_config,
00384                 apr_pool_t *pool);
00385 
00390 SVN_DEPRECATED
00391 svn_error_t *
00392 svn_repos_open(svn_repos_t **repos_p,
00393                const char *path,
00394                apr_pool_t *pool);
00395 
00407 svn_error_t *
00408 svn_repos_create(svn_repos_t **repos_p,
00409                  const char *path,
00410                  const char *unused_1,
00411                  const char *unused_2,
00412                  apr_hash_t *config,
00413                  apr_hash_t *fs_config,
00414                  apr_pool_t *pool);
00415 
00453 svn_error_t *
00454 svn_repos_upgrade2(const char *path,
00455                    svn_boolean_t nonblocking,
00456                    svn_repos_notify_func_t notify_func,
00457                    void *notify_baton,
00458                    apr_pool_t *pool);
00459 
00467 SVN_DEPRECATED
00468 svn_error_t *
00469 svn_repos_upgrade(const char *path,
00470                   svn_boolean_t nonblocking,
00471                   svn_error_t *(*start_callback)(void *baton),
00472                   void *start_callback_baton,
00473                   apr_pool_t *pool);
00474 
00478 svn_error_t *
00479 svn_repos_delete(const char *path,
00480                  apr_pool_t *pool);
00481 
00494 svn_error_t *
00495 svn_repos_has_capability(svn_repos_t *repos,
00496                          svn_boolean_t *has,
00497                          const char *capability,
00498                          apr_pool_t *pool);
00499 
00508 #define SVN_REPOS_CAPABILITY_MERGEINFO "mergeinfo"
00509 /*       *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
00510  *
00511  * @c SVN_REPOS_CAPABILITY_foo strings should not include colons, to
00512  * be consistent with @c SVN_RA_CAPABILITY_foo strings, which forbid
00513  * colons for their own reasons.  While this RA limitation has no
00514  * direct impact on repository capabilities, there's no reason to be
00515  * gratuitously different either.
00516  *
00517  * If you add a capability, update svn_repos_capabilities().
00518  */
00519 
00520 
00522 svn_fs_t *
00523 svn_repos_fs(svn_repos_t *repos);
00524 
00525 
00541 svn_error_t *
00542 svn_repos_hotcopy2(const char *src_path,
00543                    const char *dst_path,
00544                    svn_boolean_t clean_logs,
00545                    svn_boolean_t incremental,
00546                    svn_cancel_func_t cancel_func,
00547                    void *cancel_baton,
00548                    apr_pool_t *pool);
00549 
00556 SVN_DEPRECATED
00557 svn_error_t *
00558 svn_repos_hotcopy(const char *src_path,
00559                   const char *dst_path,
00560                   svn_boolean_t clean_logs,
00561                   apr_pool_t *pool);
00562 
00563 
00570 svn_error_t *
00571 svn_repos_fs_pack2(svn_repos_t *repos,
00572                    svn_repos_notify_func_t notify_func,
00573                    void *notify_baton,
00574                    svn_cancel_func_t cancel_func,
00575                    void *cancel_baton,
00576                    apr_pool_t *pool);
00577 
00585 SVN_DEPRECATED
00586 svn_error_t *
00587 svn_repos_fs_pack(svn_repos_t *repos,
00588                   svn_fs_pack_notify_t notify_func,
00589                   void *notify_baton,
00590                   svn_cancel_func_t cancel_func,
00591                   void *cancel_baton,
00592                   apr_pool_t *pool);
00593 
00621 svn_error_t *
00622 svn_repos_recover4(const char *path,
00623                    svn_boolean_t nonblocking,
00624                    svn_repos_notify_func_t notify_func,
00625                    void *notify_baton,
00626                    svn_cancel_func_t cancel_func,
00627                    void * cancel_baton,
00628                    apr_pool_t *pool);
00629 
00637 SVN_DEPRECATED
00638 svn_error_t *
00639 svn_repos_recover3(const char *path,
00640                    svn_boolean_t nonblocking,
00641                    svn_error_t *(*start_callback)(void *baton),
00642                    void *start_callback_baton,
00643                    svn_cancel_func_t cancel_func,
00644                    void * cancel_baton,
00645                    apr_pool_t *pool);
00646 
00652 SVN_DEPRECATED
00653 svn_error_t *
00654 svn_repos_recover2(const char *path,
00655                    svn_boolean_t nonblocking,
00656                    svn_error_t *(*start_callback)(void *baton),
00657                    void *start_callback_baton,
00658                    apr_pool_t *pool);
00659 
00666 SVN_DEPRECATED
00667 svn_error_t *
00668 svn_repos_recover(const char *path,
00669                   apr_pool_t *pool);
00670 
00676 typedef svn_error_t *(*svn_repos_freeze_func_t)(void *baton, apr_pool_t *pool);
00677 
00693 svn_error_t *
00694 svn_repos_freeze(apr_array_header_t *paths,
00695                  svn_repos_freeze_func_t freeze_func,
00696                  void *freeze_baton,
00697                  apr_pool_t *pool);
00698 
00704 svn_error_t *
00705 svn_repos_db_logfiles(apr_array_header_t **logfiles,
00706                       const char *path,
00707                       svn_boolean_t only_unused,
00708                       apr_pool_t *pool);
00709 
00710 
00711 
00712 /* Repository Paths */
00713 
00715 const char *
00716 svn_repos_path(svn_repos_t *repos,
00717                apr_pool_t *pool);
00718 
00722 const char *
00723 svn_repos_db_env(svn_repos_t *repos,
00724                  apr_pool_t *pool);
00725 
00727 const char *
00728 svn_repos_conf_dir(svn_repos_t *repos,
00729                    apr_pool_t *pool);
00730 
00732 const char *
00733 svn_repos_svnserve_conf(svn_repos_t *repos,
00734                         apr_pool_t *pool);
00735 
00737 const char *
00738 svn_repos_lock_dir(svn_repos_t *repos,
00739                    apr_pool_t *pool);
00740 
00742 const char *
00743 svn_repos_db_lockfile(svn_repos_t *repos,
00744                       apr_pool_t *pool);
00745 
00747 const char *
00748 svn_repos_db_logs_lockfile(svn_repos_t *repos,
00749                            apr_pool_t *pool);
00750 
00752 const char *
00753 svn_repos_hook_dir(svn_repos_t *repos,
00754                    apr_pool_t *pool);
00755 
00757 const char *
00758 svn_repos_start_commit_hook(svn_repos_t *repos,
00759                             apr_pool_t *pool);
00760 
00762 const char *
00763 svn_repos_pre_commit_hook(svn_repos_t *repos,
00764                           apr_pool_t *pool);
00765 
00767 const char *
00768 svn_repos_post_commit_hook(svn_repos_t *repos,
00769                            apr_pool_t *pool);
00770 
00774 const char *
00775 svn_repos_pre_revprop_change_hook(svn_repos_t *repos,
00776                                   apr_pool_t *pool);
00777 
00781 const char *
00782 svn_repos_post_revprop_change_hook(svn_repos_t *repos,
00783                                    apr_pool_t *pool);
00784 
00785 
00791 const char *
00792 svn_repos_pre_lock_hook(svn_repos_t *repos,
00793                         apr_pool_t *pool);
00794 
00796 const char *
00797 svn_repos_post_lock_hook(svn_repos_t *repos,
00798                          apr_pool_t *pool);
00799 
00801 const char *
00802 svn_repos_pre_unlock_hook(svn_repos_t *repos,
00803                           apr_pool_t *pool);
00804 
00806 const char *
00807 svn_repos_post_unlock_hook(svn_repos_t *repos,
00808                            apr_pool_t *pool);
00809 
00826 svn_error_t *
00827 svn_repos_hooks_setenv(svn_repos_t *repos,
00828                        const char *hooks_env_path,
00829                        apr_pool_t *scratch_pool);
00830 
00833 /* ---------------------------------------------------------------*/
00834 
00835 /* Reporting the state of a working copy, for updates. */
00836 
00837 
00921 svn_error_t *
00922 svn_repos_begin_report3(void **report_baton,
00923                         svn_revnum_t revnum,
00924                         svn_repos_t *repos,
00925                         const char *fs_base,
00926                         const char *target,
00927                         const char *tgt_path,
00928                         svn_boolean_t text_deltas,
00929                         svn_depth_t depth,
00930                         svn_boolean_t ignore_ancestry,
00931                         svn_boolean_t send_copyfrom_args,
00932                         const svn_delta_editor_t *editor,
00933                         void *edit_baton,
00934                         svn_repos_authz_func_t authz_read_func,
00935                         void *authz_read_baton,
00936                         apr_size_t zero_copy_limit,
00937                         apr_pool_t *pool);
00938 
00946 SVN_DEPRECATED
00947 svn_error_t *
00948 svn_repos_begin_report2(void **report_baton,
00949                         svn_revnum_t revnum,
00950                         svn_repos_t *repos,
00951                         const char *fs_base,
00952                         const char *target,
00953                         const char *tgt_path,
00954                         svn_boolean_t text_deltas,
00955                         svn_depth_t depth,
00956                         svn_boolean_t ignore_ancestry,
00957                         svn_boolean_t send_copyfrom_args,
00958                         const svn_delta_editor_t *editor,
00959                         void *edit_baton,
00960                         svn_repos_authz_func_t authz_read_func,
00961                         void *authz_read_baton,
00962                         apr_pool_t *pool);
00963 
00977 SVN_DEPRECATED
00978 svn_error_t *
00979 svn_repos_begin_report(void **report_baton,
00980                        svn_revnum_t revnum,
00981                        const char *username,
00982                        svn_repos_t *repos,
00983                        const char *fs_base,
00984                        const char *target,
00985                        const char *tgt_path,
00986                        svn_boolean_t text_deltas,
00987                        svn_boolean_t recurse,
00988                        svn_boolean_t ignore_ancestry,
00989                        const svn_delta_editor_t *editor,
00990                        void *edit_baton,
00991                        svn_repos_authz_func_t authz_read_func,
00992                        void *authz_read_baton,
00993                        apr_pool_t *pool);
00994 
00995 
01030 svn_error_t *
01031 svn_repos_set_path3(void *report_baton,
01032                     const char *path,
01033                     svn_revnum_t revision,
01034                     svn_depth_t depth,
01035                     svn_boolean_t start_empty,
01036                     const char *lock_token,
01037                     apr_pool_t *pool);
01038 
01045 SVN_DEPRECATED
01046 svn_error_t *
01047 svn_repos_set_path2(void *report_baton,
01048                     const char *path,
01049                     svn_revnum_t revision,
01050                     svn_boolean_t start_empty,
01051                     const char *lock_token,
01052                     apr_pool_t *pool);
01053 
01059 SVN_DEPRECATED
01060 svn_error_t *
01061 svn_repos_set_path(void *report_baton,
01062                    const char *path,
01063                    svn_revnum_t revision,
01064                    svn_boolean_t start_empty,
01065                    apr_pool_t *pool);
01066 
01094 svn_error_t *
01095 svn_repos_link_path3(void *report_baton,
01096                      const char *path,
01097                      const char *link_path,
01098                      svn_revnum_t revision,
01099                      svn_depth_t depth,
01100                      svn_boolean_t start_empty,
01101                      const char *lock_token,
01102                      apr_pool_t *pool);
01103 
01110 SVN_DEPRECATED
01111 svn_error_t *
01112 svn_repos_link_path2(void *report_baton,
01113                      const char *path,
01114                      const char *link_path,
01115                      svn_revnum_t revision,
01116                      svn_boolean_t start_empty,
01117                      const char *lock_token,
01118                      apr_pool_t *pool);
01119 
01125 SVN_DEPRECATED
01126 svn_error_t *
01127 svn_repos_link_path(void *report_baton,
01128                     const char *path,
01129                     const char *link_path,
01130                     svn_revnum_t revision,
01131                     svn_boolean_t start_empty,
01132                     apr_pool_t *pool);
01133 
01145 svn_error_t *
01146 svn_repos_delete_path(void *report_baton,
01147                       const char *path,
01148                       apr_pool_t *pool);
01149 
01162 svn_error_t *
01163 svn_repos_finish_report(void *report_baton,
01164                         apr_pool_t *pool);
01165 
01166 
01174 svn_error_t *
01175 svn_repos_abort_report(void *report_baton,
01176                        apr_pool_t *pool);
01177 
01178 
01179 /* ---------------------------------------------------------------*/
01180 
01181 /* The magical dir_delta update routines. */
01182 
01251 svn_error_t *
01252 svn_repos_dir_delta2(svn_fs_root_t *src_root,
01253                      const char *src_parent_dir,
01254                      const char *src_entry,
01255                      svn_fs_root_t *tgt_root,
01256                      const char *tgt_path,
01257                      const svn_delta_editor_t *editor,
01258                      void *edit_baton,
01259                      svn_repos_authz_func_t authz_read_func,
01260                      void *authz_read_baton,
01261                      svn_boolean_t text_deltas,
01262                      svn_depth_t depth,
01263                      svn_boolean_t entry_props,
01264                      svn_boolean_t ignore_ancestry,
01265                      apr_pool_t *pool);
01266 
01274 SVN_DEPRECATED
01275 svn_error_t *
01276 svn_repos_dir_delta(svn_fs_root_t *src_root,
01277                     const char *src_parent_dir,
01278                     const char *src_entry,
01279                     svn_fs_root_t *tgt_root,
01280                     const char *tgt_path,
01281                     const svn_delta_editor_t *editor,
01282                     void *edit_baton,
01283                     svn_repos_authz_func_t authz_read_func,
01284                     void *authz_read_baton,
01285                     svn_boolean_t text_deltas,
01286                     svn_boolean_t recurse,
01287                     svn_boolean_t entry_props,
01288                     svn_boolean_t ignore_ancestry,
01289                     apr_pool_t *pool);
01290 
01291 
01324 svn_error_t *
01325 svn_repos_replay2(svn_fs_root_t *root,
01326                   const char *base_dir,
01327                   svn_revnum_t low_water_mark,
01328                   svn_boolean_t send_deltas,
01329                   const svn_delta_editor_t *editor,
01330                   void *edit_baton,
01331                   svn_repos_authz_func_t authz_read_func,
01332                   void *authz_read_baton,
01333                   apr_pool_t *pool);
01334 
01343 SVN_DEPRECATED
01344 svn_error_t *
01345 svn_repos_replay(svn_fs_root_t *root,
01346                  const svn_delta_editor_t *editor,
01347                  void *edit_baton,
01348                  apr_pool_t *pool);
01349 
01350 /* ---------------------------------------------------------------*/
01351 
01352 /* Making commits. */
01353 
01401 svn_error_t *
01402 svn_repos_get_commit_editor5(const svn_delta_editor_t **editor,
01403                              void **edit_baton,
01404                              svn_repos_t *repos,
01405                              svn_fs_txn_t *txn,
01406                              const char *repos_url,
01407                              const char *base_path,
01408                              apr_hash_t *revprop_table,
01409                              svn_commit_callback2_t commit_callback,
01410                              void *commit_baton,
01411                              svn_repos_authz_callback_t authz_callback,
01412                              void *authz_baton,
01413                              apr_pool_t *pool);
01414 
01425 SVN_DEPRECATED
01426 svn_error_t *
01427 svn_repos_get_commit_editor4(const svn_delta_editor_t **editor,
01428                              void **edit_baton,
01429                              svn_repos_t *repos,
01430                              svn_fs_txn_t *txn,
01431                              const char *repos_url,
01432                              const char *base_path,
01433                              const char *user,
01434                              const char *log_msg,
01435                              svn_commit_callback2_t commit_callback,
01436                              void *commit_baton,
01437                              svn_repos_authz_callback_t authz_callback,
01438                              void *authz_baton,
01439                              apr_pool_t *pool);
01440 
01449 SVN_DEPRECATED
01450 svn_error_t *
01451 svn_repos_get_commit_editor3(const svn_delta_editor_t **editor,
01452                              void **edit_baton,
01453                              svn_repos_t *repos,
01454                              svn_fs_txn_t *txn,
01455                              const char *repos_url,
01456                              const char *base_path,
01457                              const char *user,
01458                              const char *log_msg,
01459                              svn_commit_callback_t callback,
01460                              void *callback_baton,
01461                              svn_repos_authz_callback_t authz_callback,
01462                              void *authz_baton,
01463                              apr_pool_t *pool);
01464 
01471 SVN_DEPRECATED
01472 svn_error_t *
01473 svn_repos_get_commit_editor2(const svn_delta_editor_t **editor,
01474                              void **edit_baton,
01475                              svn_repos_t *repos,
01476                              svn_fs_txn_t *txn,
01477                              const char *repos_url,
01478                              const char *base_path,
01479                              const char *user,
01480                              const char *log_msg,
01481                              svn_commit_callback_t callback,
01482                              void *callback_baton,
01483                              apr_pool_t *pool);
01484 
01485 
01492 SVN_DEPRECATED
01493 svn_error_t *
01494 svn_repos_get_commit_editor(const svn_delta_editor_t **editor,
01495                             void **edit_baton,
01496                             svn_repos_t *repos,
01497                             const char *repos_url,
01498                             const char *base_path,
01499                             const char *user,
01500                             const char *log_msg,
01501                             svn_commit_callback_t callback,
01502                             void *callback_baton,
01503                             apr_pool_t *pool);
01504 
01505 /* ---------------------------------------------------------------*/
01506 
01507 /* Finding particular revisions. */
01508 
01512 svn_error_t *
01513 svn_repos_dated_revision(svn_revnum_t *revision,
01514                          svn_repos_t *repos,
01515                          apr_time_t tm,
01516                          apr_pool_t *pool);
01517 
01518 
01532 svn_error_t *
01533 svn_repos_get_committed_info(svn_revnum_t *committed_rev,
01534                              const char **committed_date,
01535                              const char **last_author,
01536                              svn_fs_root_t *root,
01537                              const char *path,
01538                              apr_pool_t *pool);
01539 
01540 
01548 svn_error_t *
01549 svn_repos_stat(svn_dirent_t **dirent,
01550                svn_fs_root_t *root,
01551                const char *path,
01552                apr_pool_t *pool);
01553 
01554 
01565 svn_error_t *
01566 svn_repos_deleted_rev(svn_fs_t *fs,
01567                       const char *path,
01568                       svn_revnum_t start,
01569                       svn_revnum_t end,
01570                       svn_revnum_t *deleted,
01571                       apr_pool_t *pool);
01572 
01573 
01586 typedef svn_error_t *(*svn_repos_history_func_t)(void *baton,
01587                                                  const char *path,
01588                                                  svn_revnum_t revision,
01589                                                  apr_pool_t *pool);
01590 
01611 svn_error_t *
01612 svn_repos_history2(svn_fs_t *fs,
01613                    const char *path,
01614                    svn_repos_history_func_t history_func,
01615                    void *history_baton,
01616                    svn_repos_authz_func_t authz_read_func,
01617                    void *authz_read_baton,
01618                    svn_revnum_t start,
01619                    svn_revnum_t end,
01620                    svn_boolean_t cross_copies,
01621                    apr_pool_t *pool);
01622 
01629 SVN_DEPRECATED
01630 svn_error_t *
01631 svn_repos_history(svn_fs_t *fs,
01632                   const char *path,
01633                   svn_repos_history_func_t history_func,
01634                   void *history_baton,
01635                   svn_revnum_t start,
01636                   svn_revnum_t end,
01637                   svn_boolean_t cross_copies,
01638                   apr_pool_t *pool);
01639 
01640 
01661 svn_error_t *
01662 svn_repos_trace_node_locations(svn_fs_t *fs,
01663                                apr_hash_t **locations,
01664                                const char *fs_path,
01665                                svn_revnum_t peg_revision,
01666                                const apr_array_header_t *location_revisions,
01667                                svn_repos_authz_func_t authz_read_func,
01668                                void *authz_read_baton,
01669                                apr_pool_t *pool);
01670 
01671 
01700 svn_error_t *
01701 svn_repos_node_location_segments(svn_repos_t *repos,
01702                                  const char *path,
01703                                  svn_revnum_t peg_revision,
01704                                  svn_revnum_t start_rev,
01705                                  svn_revnum_t end_rev,
01706                                  svn_location_segment_receiver_t receiver,
01707                                  void *receiver_baton,
01708                                  svn_repos_authz_func_t authz_read_func,
01709                                  void *authz_read_baton,
01710                                  apr_pool_t *pool);
01711 
01712 
01713 /* ### other queries we can do someday --
01714 
01715      * fetch the last revision created by <user>
01716          (once usernames become revision properties!)
01717      * fetch the last revision where <path> was modified
01718 
01719 */
01720 
01721 
01722 
01723 /* ---------------------------------------------------------------*/
01724 
01725 /* Retrieving log messages. */
01726 
01727 
01787 svn_error_t *
01788 svn_repos_get_logs4(svn_repos_t *repos,
01789                     const apr_array_header_t *paths,
01790                     svn_revnum_t start,
01791                     svn_revnum_t end,
01792                     int limit,
01793                     svn_boolean_t discover_changed_paths,
01794                     svn_boolean_t strict_node_history,
01795                     svn_boolean_t include_merged_revisions,
01796                     const apr_array_header_t *revprops,
01797                     svn_repos_authz_func_t authz_read_func,
01798                     void *authz_read_baton,
01799                     svn_log_entry_receiver_t receiver,
01800                     void *receiver_baton,
01801                     apr_pool_t *pool);
01802 
01813 SVN_DEPRECATED
01814 svn_error_t *
01815 svn_repos_get_logs3(svn_repos_t *repos,
01816                     const apr_array_header_t *paths,
01817                     svn_revnum_t start,
01818                     svn_revnum_t end,
01819                     int limit,
01820                     svn_boolean_t discover_changed_paths,
01821                     svn_boolean_t strict_node_history,
01822                     svn_repos_authz_func_t authz_read_func,
01823                     void *authz_read_baton,
01824                     svn_log_message_receiver_t receiver,
01825                     void *receiver_baton,
01826                     apr_pool_t *pool);
01827 
01828 
01834 SVN_DEPRECATED
01835 svn_error_t *
01836 svn_repos_get_logs2(svn_repos_t *repos,
01837                     const apr_array_header_t *paths,
01838                     svn_revnum_t start,
01839                     svn_revnum_t end,
01840                     svn_boolean_t discover_changed_paths,
01841                     svn_boolean_t strict_node_history,
01842                     svn_repos_authz_func_t authz_read_func,
01843                     void *authz_read_baton,
01844                     svn_log_message_receiver_t receiver,
01845                     void *receiver_baton,
01846                     apr_pool_t *pool);
01847 
01854 SVN_DEPRECATED
01855 svn_error_t *
01856 svn_repos_get_logs(svn_repos_t *repos,
01857                    const apr_array_header_t *paths,
01858                    svn_revnum_t start,
01859                    svn_revnum_t end,
01860                    svn_boolean_t discover_changed_paths,
01861                    svn_boolean_t strict_node_history,
01862                    svn_log_message_receiver_t receiver,
01863                    void *receiver_baton,
01864                    apr_pool_t *pool);
01865 
01866 
01867 
01868 /* ---------------------------------------------------------------*/
01869 
01870 /* Retrieving mergeinfo. */
01871 
01900 svn_error_t *
01901 svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *catalog,
01902                            svn_repos_t *repos,
01903                            const apr_array_header_t *paths,
01904                            svn_revnum_t revision,
01905                            svn_mergeinfo_inheritance_t inherit,
01906                            svn_boolean_t include_descendants,
01907                            svn_repos_authz_func_t authz_read_func,
01908                            void *authz_read_baton,
01909                            apr_pool_t *pool);
01910 
01911 
01912 /* ---------------------------------------------------------------*/
01913 
01914 /* Retrieving multiple revisions of a file. */
01915 
01952 svn_error_t *
01953 svn_repos_get_file_revs2(svn_repos_t *repos,
01954                          const char *path,
01955                          svn_revnum_t start,
01956                          svn_revnum_t end,
01957                          svn_boolean_t include_merged_revisions,
01958                          svn_repos_authz_func_t authz_read_func,
01959                          void *authz_read_baton,
01960                          svn_file_rev_handler_t handler,
01961                          void *handler_baton,
01962                          apr_pool_t *pool);
01963 
01971 SVN_DEPRECATED
01972 svn_error_t *
01973 svn_repos_get_file_revs(svn_repos_t *repos,
01974                         const char *path,
01975                         svn_revnum_t start,
01976                         svn_revnum_t end,
01977                         svn_repos_authz_func_t authz_read_func,
01978                         void *authz_read_baton,
01979                         svn_repos_file_rev_handler_t handler,
01980                         void *handler_baton,
01981                         apr_pool_t *pool);
01982 
01983 
01984 /* ---------------------------------------------------------------*/
01985 
02016 svn_error_t *
02017 svn_repos_fs_commit_txn(const char **conflict_p,
02018                         svn_repos_t *repos,
02019                         svn_revnum_t *new_rev,
02020                         svn_fs_txn_t *txn,
02021                         apr_pool_t *pool);
02022 
02039 svn_error_t *
02040 svn_repos_fs_begin_txn_for_commit2(svn_fs_txn_t **txn_p,
02041                                    svn_repos_t *repos,
02042                                    svn_revnum_t rev,
02043                                    apr_hash_t *revprop_table,
02044                                    apr_pool_t *pool);
02045 
02046 
02055 SVN_DEPRECATED
02056 svn_error_t *
02057 svn_repos_fs_begin_txn_for_commit(svn_fs_txn_t **txn_p,
02058                                   svn_repos_t *repos,
02059                                   svn_revnum_t rev,
02060                                   const char *author,
02061                                   const char *log_msg,
02062                                   apr_pool_t *pool);
02063 
02064 
02076 SVN_DEPRECATED
02077 svn_error_t *
02078 svn_repos_fs_begin_txn_for_update(svn_fs_txn_t **txn_p,
02079                                   svn_repos_t *repos,
02080                                   svn_revnum_t rev,
02081                                   const char *author,
02082                                   apr_pool_t *pool);
02083 
02084 
02107 svn_error_t *
02108 svn_repos_fs_lock(svn_lock_t **lock,
02109                   svn_repos_t *repos,
02110                   const char *path,
02111                   const char *token,
02112                   const char *comment,
02113                   svn_boolean_t is_dav_comment,
02114                   apr_time_t expiration_date,
02115                   svn_revnum_t current_rev,
02116                   svn_boolean_t steal_lock,
02117                   apr_pool_t *pool);
02118 
02119 
02132 svn_error_t *
02133 svn_repos_fs_unlock(svn_repos_t *repos,
02134                     const char *path,
02135                     const char *token,
02136                     svn_boolean_t break_lock,
02137                     apr_pool_t *pool);
02138 
02139 
02140 
02155 svn_error_t *
02156 svn_repos_fs_get_locks2(apr_hash_t **locks,
02157                         svn_repos_t *repos,
02158                         const char *path,
02159                         svn_depth_t depth,
02160                         svn_repos_authz_func_t authz_read_func,
02161                         void *authz_read_baton,
02162                         apr_pool_t *pool);
02163 
02171 SVN_DEPRECATED
02172 svn_error_t *
02173 svn_repos_fs_get_locks(apr_hash_t **locks,
02174                        svn_repos_t *repos,
02175                        const char *path,
02176                        svn_repos_authz_func_t authz_read_func,
02177                        void *authz_read_baton,
02178                        apr_pool_t *pool);
02179 
02207 svn_error_t *
02208 svn_repos_fs_change_rev_prop4(svn_repos_t *repos,
02209                               svn_revnum_t rev,
02210                               const char *author,
02211                               const char *name,
02212                               const svn_string_t *const *old_value_p,
02213                               const svn_string_t *new_value,
02214                               svn_boolean_t
02215                               use_pre_revprop_change_hook,
02216                               svn_boolean_t
02217                               use_post_revprop_change_hook,
02218                               svn_repos_authz_func_t
02219                               authz_read_func,
02220                               void *authz_read_baton,
02221                               apr_pool_t *pool);
02222 
02231 SVN_DEPRECATED
02232 svn_error_t *
02233 svn_repos_fs_change_rev_prop3(svn_repos_t *repos,
02234                               svn_revnum_t rev,
02235                               const char *author,
02236                               const char *name,
02237                               const svn_string_t *new_value,
02238                               svn_boolean_t
02239                               use_pre_revprop_change_hook,
02240                               svn_boolean_t
02241                               use_post_revprop_change_hook,
02242                               svn_repos_authz_func_t
02243                               authz_read_func,
02244                               void *authz_read_baton,
02245                               apr_pool_t *pool);
02246 
02254 SVN_DEPRECATED
02255 svn_error_t *
02256 svn_repos_fs_change_rev_prop2(svn_repos_t *repos,
02257                               svn_revnum_t rev,
02258                               const char *author,
02259                               const char *name,
02260                               const svn_string_t *new_value,
02261                               svn_repos_authz_func_t
02262                               authz_read_func,
02263                               void *authz_read_baton,
02264                               apr_pool_t *pool);
02265 
02272 SVN_DEPRECATED
02273 svn_error_t *
02274 svn_repos_fs_change_rev_prop(svn_repos_t *repos,
02275                              svn_revnum_t rev,
02276                              const char *author,
02277                              const char *name,
02278                              const svn_string_t *new_value,
02279                              apr_pool_t *pool);
02280 
02281 
02282 
02298 svn_error_t *
02299 svn_repos_fs_revision_prop(svn_string_t **value_p,
02300                            svn_repos_t *repos,
02301                            svn_revnum_t rev,
02302                            const char *propname,
02303                            svn_repos_authz_func_t
02304                            authz_read_func,
02305                            void *authz_read_baton,
02306                            apr_pool_t *pool);
02307 
02308 
02325 svn_error_t *
02326 svn_repos_fs_revision_proplist(apr_hash_t **table_p,
02327                                svn_repos_t *repos,
02328                                svn_revnum_t rev,
02329                                svn_repos_authz_func_t
02330                                authz_read_func,
02331                                void *authz_read_baton,
02332                                apr_pool_t *pool);
02333 
02334 
02335 
02336 /* ---------------------------------------------------------------*/
02337 
02338 /* Prop-changing wrappers for libsvn_fs routines. */
02339 
02340 /* NOTE: svn_repos_fs_change_rev_prop() also exists, but is located
02341    above with the hook-related functions. */
02342 
02343 
02356 svn_error_t *
02357 svn_repos_fs_change_node_prop(svn_fs_root_t *root,
02358                               const char *path,
02359                               const char *name,
02360                               const svn_string_t *value,
02361                               apr_pool_t *pool);
02362 
02367 svn_error_t *
02368 svn_repos_fs_change_txn_prop(svn_fs_txn_t *txn,
02369                              const char *name,
02370                              const svn_string_t *value,
02371                              apr_pool_t *pool);
02372 
02379 svn_error_t *
02380 svn_repos_fs_change_txn_props(svn_fs_txn_t *txn,
02381                               const apr_array_header_t *props,
02382                               apr_pool_t *pool);
02383 
02384 
02385 /* ---------------------------------------------------------------*/
02386 
02405 typedef struct svn_repos_node_t
02406 {
02408   svn_node_kind_t kind;
02409 
02411   char action;
02412 
02414   svn_boolean_t text_mod;
02415 
02417   svn_boolean_t prop_mod;
02418 
02420   const char *name;
02421 
02423   svn_revnum_t copyfrom_rev;
02424 
02426   const char *copyfrom_path;
02427 
02429   struct svn_repos_node_t *sibling;
02430 
02432   struct svn_repos_node_t *child;
02433 
02435   struct svn_repos_node_t *parent;
02436 
02437 } svn_repos_node_t;
02438 
02439 
02458 svn_error_t *
02459 svn_repos_node_editor(const svn_delta_editor_t **editor,
02460                       void **edit_baton,
02461                       svn_repos_t *repos,
02462                       svn_fs_root_t *base_root,
02463                       svn_fs_root_t *root,
02464                       apr_pool_t *node_pool,
02465                       apr_pool_t *pool);
02466 
02471 svn_repos_node_t *
02472 svn_repos_node_from_baton(void *edit_baton);
02473 
02476 /* ---------------------------------------------------------------*/
02477 
02501 /* The RFC822-style headers in our dumpfile format. */
02502 #define SVN_REPOS_DUMPFILE_MAGIC_HEADER            "SVN-fs-dump-format-version"
02503 #define SVN_REPOS_DUMPFILE_FORMAT_VERSION           3
02504 #define SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS    3
02505 #define SVN_REPOS_DUMPFILE_UUID                      "UUID"
02506 #define SVN_REPOS_DUMPFILE_CONTENT_LENGTH            "Content-length"
02507 
02508 #define SVN_REPOS_DUMPFILE_REVISION_NUMBER           "Revision-number"
02509 
02510 #define SVN_REPOS_DUMPFILE_NODE_PATH                 "Node-path"
02511 #define SVN_REPOS_DUMPFILE_NODE_KIND                 "Node-kind"
02512 #define SVN_REPOS_DUMPFILE_NODE_ACTION               "Node-action"
02513 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH        "Node-copyfrom-path"
02514 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV         "Node-copyfrom-rev"
02515 
02516 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5      "Text-copy-source-md5"
02517 
02518 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1     "Text-copy-source-sha1"
02519 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM \
02520                                         SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
02521 
02522 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5          "Text-content-md5"
02523 
02524 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1         "Text-content-sha1"
02525 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM     \
02526                                         SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
02527 
02528 #define SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH       "Prop-content-length"
02529 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH       "Text-content-length"
02530 
02532 #define SVN_REPOS_DUMPFILE_PROP_DELTA                "Prop-delta"
02533 
02534 #define SVN_REPOS_DUMPFILE_TEXT_DELTA                "Text-delta"
02535 
02536 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5       "Text-delta-base-md5"
02537 
02538 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1      "Text-delta-base-sha1"
02539 
02540 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM  \
02541                                         SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
02542 
02563 svn_error_t *
02564 svn_repos_verify_fs2(svn_repos_t *repos,
02565                      svn_revnum_t start_rev,
02566                      svn_revnum_t end_rev,
02567                      svn_repos_notify_func_t notify_func,
02568                      void *notify_baton,
02569                      svn_cancel_func_t cancel,
02570                      void *cancel_baton,
02571                      apr_pool_t *scratch_pool);
02572 
02580 SVN_DEPRECATED
02581 svn_error_t *
02582 svn_repos_verify_fs(svn_repos_t *repos,
02583                     svn_stream_t *feedback_stream,
02584                     svn_revnum_t start_rev,
02585                     svn_revnum_t end_rev,
02586                     svn_cancel_func_t cancel_func,
02587                     void *cancel_baton,
02588                     apr_pool_t *pool);
02589 
02623 svn_error_t *
02624 svn_repos_dump_fs3(svn_repos_t *repos,
02625                    svn_stream_t *dumpstream,
02626                    svn_revnum_t start_rev,
02627                    svn_revnum_t end_rev,
02628                    svn_boolean_t incremental,
02629                    svn_boolean_t use_deltas,
02630                    svn_repos_notify_func_t notify_func,
02631                    void *notify_baton,
02632                    svn_cancel_func_t cancel_func,
02633                    void *cancel_baton,
02634                    apr_pool_t *scratch_pool);
02635 
02643 SVN_DEPRECATED
02644 svn_error_t *
02645 svn_repos_dump_fs2(svn_repos_t *repos,
02646                    svn_stream_t *dumpstream,
02647                    svn_stream_t *feedback_stream,
02648                    svn_revnum_t start_rev,
02649                    svn_revnum_t end_rev,
02650                    svn_boolean_t incremental,
02651                    svn_boolean_t use_deltas,
02652                    svn_cancel_func_t cancel_func,
02653                    void *cancel_baton,
02654                    apr_pool_t *pool);
02655 
02662 SVN_DEPRECATED
02663 svn_error_t *
02664 svn_repos_dump_fs(svn_repos_t *repos,
02665                   svn_stream_t *dumpstream,
02666                   svn_stream_t *feedback_stream,
02667                   svn_revnum_t start_rev,
02668                   svn_revnum_t end_rev,
02669                   svn_boolean_t incremental,
02670                   svn_cancel_func_t cancel_func,
02671                   void *cancel_baton,
02672                   apr_pool_t *pool);
02673 
02674 
02722 svn_error_t *
02723 svn_repos_load_fs4(svn_repos_t *repos,
02724                    svn_stream_t *dumpstream,
02725                    svn_revnum_t start_rev,
02726                    svn_revnum_t end_rev,
02727                    enum svn_repos_load_uuid uuid_action,
02728                    const char *parent_dir,
02729                    svn_boolean_t use_pre_commit_hook,
02730                    svn_boolean_t use_post_commit_hook,
02731                    svn_boolean_t validate_props,
02732                    svn_repos_notify_func_t notify_func,
02733                    void *notify_baton,
02734                    svn_cancel_func_t cancel_func,
02735                    void *cancel_baton,
02736                    apr_pool_t *pool);
02737 
02744 SVN_DEPRECATED
02745 svn_error_t *
02746 svn_repos_load_fs3(svn_repos_t *repos,
02747                    svn_stream_t *dumpstream,
02748                    enum svn_repos_load_uuid uuid_action,
02749                    const char *parent_dir,
02750                    svn_boolean_t use_pre_commit_hook,
02751                    svn_boolean_t use_post_commit_hook,
02752                    svn_boolean_t validate_props,
02753                    svn_repos_notify_func_t notify_func,
02754                    void *notify_baton,
02755                    svn_cancel_func_t cancel_func,
02756                    void *cancel_baton,
02757                    apr_pool_t *pool);
02758 
02767 SVN_DEPRECATED
02768 svn_error_t *
02769 svn_repos_load_fs2(svn_repos_t *repos,
02770                    svn_stream_t *dumpstream,
02771                    svn_stream_t *feedback_stream,
02772                    enum svn_repos_load_uuid uuid_action,
02773                    const char *parent_dir,
02774                    svn_boolean_t use_pre_commit_hook,
02775                    svn_boolean_t use_post_commit_hook,
02776                    svn_cancel_func_t cancel_func,
02777                    void *cancel_baton,
02778                    apr_pool_t *pool);
02779 
02786 SVN_DEPRECATED
02787 svn_error_t *
02788 svn_repos_load_fs(svn_repos_t *repos,
02789                   svn_stream_t *dumpstream,
02790                   svn_stream_t *feedback_stream,
02791                   enum svn_repos_load_uuid uuid_action,
02792                   const char *parent_dir,
02793                   svn_cancel_func_t cancel_func,
02794                   void *cancel_baton,
02795                   apr_pool_t *pool);
02796 
02797 
02803 typedef struct svn_repos_parse_fns3_t
02804 {
02809   svn_error_t *(*magic_header_record)(int version,
02810                                       void *parse_baton,
02811                                       apr_pool_t *pool);
02812 
02817   svn_error_t *(*uuid_record)(const char *uuid,
02818                               void *parse_baton,
02819                               apr_pool_t *pool);
02820 
02828   svn_error_t *(*new_revision_record)(void **revision_baton,
02829                                       apr_hash_t *headers,
02830                                       void *parse_baton,
02831                                       apr_pool_t *pool);
02832 
02839   svn_error_t *(*new_node_record)(void **node_baton,
02840                                   apr_hash_t *headers,
02841                                   void *revision_baton,
02842                                   apr_pool_t *pool);
02843 
02845   svn_error_t *(*set_revision_property)(void *revision_baton,
02846                                         const char *name,
02847                                         const svn_string_t *value);
02848 
02850   svn_error_t *(*set_node_property)(void *node_baton,
02851                                     const char *name,
02852                                     const svn_string_t *value);
02853 
02855   svn_error_t *(*delete_node_property)(void *node_baton, const char *name);
02856 
02858   svn_error_t *(*remove_node_props)(void *node_baton);
02859 
02868   svn_error_t *(*set_fulltext)(svn_stream_t **stream,
02869                                void *node_baton);
02870 
02880   svn_error_t *(*apply_textdelta)(svn_txdelta_window_handler_t *handler,
02881                                   void **handler_baton,
02882                                   void *node_baton);
02883 
02887   svn_error_t *(*close_node)(void *node_baton);
02888 
02893   svn_error_t *(*close_revision)(void *revision_baton);
02894 
02895 } svn_repos_parse_fns3_t;
02896 
02897 
02933 svn_error_t *
02934 svn_repos_parse_dumpstream3(svn_stream_t *stream,
02935                             const svn_repos_parse_fns3_t *parse_fns,
02936                             void *parse_baton,
02937                             svn_boolean_t deltas_are_text,
02938                             svn_cancel_func_t cancel_func,
02939                             void *cancel_baton,
02940                             apr_pool_t *pool);
02941 
02942 
02970 svn_error_t *
02971 svn_repos_get_fs_build_parser4(const svn_repos_parse_fns3_t **parser,
02972                                void **parse_baton,
02973                                svn_repos_t *repos,
02974                                svn_revnum_t start_rev,
02975                                svn_revnum_t end_rev,
02976                                svn_boolean_t use_history,
02977                                svn_boolean_t validate_props,
02978                                enum svn_repos_load_uuid uuid_action,
02979                                const char *parent_dir,
02980                                svn_repos_notify_func_t notify_func,
02981                                void *notify_baton,
02982                                apr_pool_t *pool);
02983 
02984 
02992 typedef struct svn_repos_parse_fns2_t
02993 {
02995   svn_error_t *(*new_revision_record)(void **revision_baton,
02996                                       apr_hash_t *headers,
02997                                       void *parse_baton,
02998                                       apr_pool_t *pool);
03000   svn_error_t *(*uuid_record)(const char *uuid,
03001                               void *parse_baton,
03002                               apr_pool_t *pool);
03004   svn_error_t *(*new_node_record)(void **node_baton,
03005                                   apr_hash_t *headers,
03006                                   void *revision_baton,
03007                                   apr_pool_t *pool);
03009   svn_error_t *(*set_revision_property)(void *revision_baton,
03010                                         const char *name,
03011                                         const svn_string_t *value);
03013   svn_error_t *(*set_node_property)(void *node_baton,
03014                                     const char *name,
03015                                     const svn_string_t *value);
03017   svn_error_t *(*delete_node_property)(void *node_baton,
03018                                        const char *name);
03020   svn_error_t *(*remove_node_props)(void *node_baton);
03022   svn_error_t *(*set_fulltext)(svn_stream_t **stream,
03023                                void *node_baton);
03025   svn_error_t *(*apply_textdelta)(svn_txdelta_window_handler_t *handler,
03026                                   void **handler_baton,
03027                                   void *node_baton);
03029   svn_error_t *(*close_node)(void *node_baton);
03031   svn_error_t *(*close_revision)(void *revision_baton);
03032 } svn_repos_parse_fns2_t;
03033 
03035 typedef svn_repos_parse_fns2_t svn_repos_parser_fns2_t;
03036 
03037 
03045 typedef struct svn_repos_parse_fns_t
03046 {
03048   svn_error_t *(*new_revision_record)(void **revision_baton,
03049                                       apr_hash_t *headers,
03050                                       void *parse_baton,
03051                                       apr_pool_t *pool);
03053   svn_error_t *(*uuid_record)(const char *uuid,
03054                               void *parse_baton,
03055                               apr_pool_t *pool);
03057   svn_error_t *(*new_node_record)(void **node_baton,
03058                                   apr_hash_t *headers,
03059                                   void *revision_baton,
03060                                   apr_pool_t *pool);
03062   svn_error_t *(*set_revision_property)(void *revision_baton,
03063                                         const char *name,
03064                                         const svn_string_t *value);
03066   svn_error_t *(*set_node_property)(void *node_baton,
03067                                     const char *name,
03068                                     const svn_string_t *value);
03070   svn_error_t *(*remove_node_props)(void *node_baton);
03072   svn_error_t *(*set_fulltext)(svn_stream_t **stream,
03073                                void *node_baton);
03075   svn_error_t *(*close_node)(void *node_baton);
03077   svn_error_t *(*close_revision)(void *revision_baton);
03078 } svn_repos_parser_fns_t;
03079 
03080 
03087 SVN_DEPRECATED
03088 svn_error_t *
03089 svn_repos_parse_dumpstream2(svn_stream_t *stream,
03090                             const svn_repos_parser_fns2_t *parse_fns,
03091                             void *parse_baton,
03092                             svn_cancel_func_t cancel_func,
03093                             void *cancel_baton,
03094                             apr_pool_t *pool);
03095 
03102 SVN_DEPRECATED
03103 svn_error_t *
03104 svn_repos_parse_dumpstream(svn_stream_t *stream,
03105                            const svn_repos_parser_fns_t *parse_fns,
03106                            void *parse_baton,
03107                            svn_cancel_func_t cancel_func,
03108                            void *cancel_baton,
03109                            apr_pool_t *pool);
03110 
03119 SVN_DEPRECATED
03120 svn_error_t *
03121 svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **parser,
03122                                void **parse_baton,
03123                                svn_repos_t *repos,
03124                                svn_boolean_t use_history,
03125                                svn_boolean_t validate_props,
03126                                enum svn_repos_load_uuid uuid_action,
03127                                const char *parent_dir,
03128                                svn_repos_notify_func_t notify_func,
03129                                void *notify_baton,
03130                                apr_pool_t *pool);
03131 
03140 SVN_DEPRECATED
03141 svn_error_t *
03142 svn_repos_get_fs_build_parser2(const svn_repos_parse_fns2_t **parser,
03143                                void **parse_baton,
03144                                svn_repos_t *repos,
03145                                svn_boolean_t use_history,
03146                                enum svn_repos_load_uuid uuid_action,
03147                                svn_stream_t *outstream,
03148                                const char *parent_dir,
03149                                apr_pool_t *pool);
03150 
03157 SVN_DEPRECATED
03158 svn_error_t *
03159 svn_repos_get_fs_build_parser(const svn_repos_parser_fns_t **parser,
03160                               void **parse_baton,
03161                               svn_repos_t *repos,
03162                               svn_boolean_t use_history,
03163                               enum svn_repos_load_uuid uuid_action,
03164                               svn_stream_t *outstream,
03165                               const char *parent_dir,
03166                               apr_pool_t *pool);
03167 
03168 
03175 typedef struct svn_authz_t svn_authz_t;
03176 
03192 svn_error_t *
03193 svn_repos_authz_read2(svn_authz_t **authz_p,
03194                       const char *path,
03195                       const char *groups_path,
03196                       svn_boolean_t must_exist,
03197                       apr_pool_t *pool);
03198 
03199 
03207 SVN_DEPRECATED
03208 svn_error_t *
03209 svn_repos_authz_read(svn_authz_t **authz_p,
03210                      const char *file,
03211                      svn_boolean_t must_exist,
03212                      apr_pool_t *pool);
03213 
03222 svn_error_t *
03223 svn_repos_authz_parse(svn_authz_t **authz_p,
03224                       svn_stream_t *stream,
03225                       svn_stream_t *groups_stream,
03226                       apr_pool_t *pool);
03227 
03248 svn_error_t *
03249 svn_repos_authz_check_access(svn_authz_t *authz,
03250                              const char *repos_name,
03251                              const char *path,
03252                              const char *user,
03253                              svn_repos_authz_access_t required_access,
03254                              svn_boolean_t *access_granted,
03255                              apr_pool_t *pool);
03256 
03257 
03258 
03313 typedef enum svn_repos_revision_access_level_t
03314 {
03317   svn_repos_revision_access_none,
03320   svn_repos_revision_access_partial,
03323   svn_repos_revision_access_full
03324 }
03325 svn_repos_revision_access_level_t;
03326 
03327 
03338 svn_error_t *
03339 svn_repos_check_revision_access(svn_repos_revision_access_level_t *access_level,
03340                                 svn_repos_t *repos,
03341                                 svn_revnum_t revision,
03342                                 svn_repos_authz_func_t authz_read_func,
03343                                 void *authz_read_baton,
03344                                 apr_pool_t *pool);
03345 
03366 svn_error_t *
03367 svn_repos_fs_get_inherited_props(apr_array_header_t **inherited_props,
03368                                  svn_fs_root_t *root,
03369                                  const char *path,
03370                                  const char *propname,
03371                                  svn_repos_authz_func_t authz_read_func,
03372                                  void *authz_read_baton,
03373                                  apr_pool_t *result_pool,
03374                                  apr_pool_t *scratch_pool);
03375 
03376 
03397 svn_error_t *
03398 svn_repos_remember_client_capabilities(svn_repos_t *repos,
03399                                        const apr_array_header_t *capabilities);
03400 
03401 
03402 #ifdef __cplusplus
03403 }
03404 #endif /* __cplusplus */
03405 
03406 #endif /* SVN_REPOS_H */