Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_repos.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Copyright (c) 2000-2008 CollabNet. All rights reserved.
5  *
6  * This software is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution. The terms
8  * are also available at http://subversion.tigris.org/license-1.html.
9  * If newer versions of this license are posted there, you may use a
10  * newer version instead, at your option.
11  *
12  * This software consists of voluntary contributions made by many
13  * individuals. For exact contribution history, see the revision
14  * history and logs, available at http://subversion.tigris.org/.
15  * ====================================================================
16  * @endcopyright
17  *
18  * @file svn_repos.h
19  * @brief Tools built on top of the filesystem.
20  */
21 
22 #ifndef SVN_REPOS_H
23 #define SVN_REPOS_H
24 
25 #include <apr_pools.h>
26 #include <apr_hash.h>
27 #include <apr_tables.h>
28 #include <apr_time.h>
29 
30 #include "svn_types.h"
31 #include "svn_string.h"
32 #include "svn_delta.h"
33 #include "svn_fs.h"
34 #include "svn_io.h"
35 #include "svn_version.h"
36 #include "svn_mergeinfo.h"
37 
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif /* __cplusplus */
42 
43 /* ---------------------------------------------------------------*/
44 
45 /**
46  * Get libsvn_repos version information.
47  *
48  * @since New in 1.1.
49  */
50 const svn_version_t *
51 svn_repos_version(void);
52 
53 
54 
55 /** Callback type for checking authorization on paths produced by (at
56  * least) svn_repos_dir_delta2().
57  *
58  * Set @a *allowed to TRUE to indicate that some operation is
59  * authorized for @a path in @a root, or set it to FALSE to indicate
60  * unauthorized (presumably according to state stored in @a baton).
61  *
62  * Do not assume @a pool has any lifetime beyond this call.
63  *
64  * The exact operation being authorized depends on the callback
65  * implementation. For read authorization, for example, the caller
66  * would implement an instance that does read checking, and pass it as
67  * a parameter named [perhaps] 'authz_read_func'. The receiver of
68  * that parameter might also take another parameter named
69  * 'authz_write_func', which although sharing this type, would be a
70  * different implementation.
71  *
72  * @note If someday we want more sophisticated authorization states
73  * than just yes/no, @a allowed can become an enum type.
74  */
75 typedef svn_error_t *(*svn_repos_authz_func_t)(svn_boolean_t *allowed,
76  svn_fs_root_t *root,
77  const char *path,
78  void *baton,
79  apr_pool_t *pool);
80 
81 
82 /** An enum defining the kinds of access authz looks up.
83  *
84  * @since New in 1.3.
85  */
86 typedef enum
87 {
88  /** No access. */
90 
91  /** Path can be read. */
93 
94  /** Path can be altered. */
96 
97  /** The other access credentials are recursive. */
100 
101 
102 /** Callback type for checking authorization on paths produced by
103  * the repository commit editor.
104  *
105  * Set @a *allowed to TRUE to indicate that the @a required access on
106  * @a path in @a root is authorized, or set it to FALSE to indicate
107  * unauthorized (presumable according to state stored in @a baton).
108  *
109  * If @a path is NULL, the callback should perform a global authz
110  * lookup for the @a required access. That is, the lookup should
111  * check if the @a required access is granted for at least one path of
112  * the repository, and set @a *allowed to TRUE if so. @a root may
113  * also be NULL if @a path is NULL.
114  *
115  * This callback is very similar to svn_repos_authz_func_t, with the
116  * exception of the addition of the @a required parameter.
117  * This is due to historical reasons: when authz was first implemented
118  * for svn_repos_dir_delta2(), it seemed there would need only checks
119  * for read and write operations, hence the svn_repos_authz_func_t
120  * callback prototype and usage scenario. But it was then realized
121  * that lookups due to copying needed to be recursive, and that
122  * brute-force recursive lookups didn't square with the O(1)
123  * performances a copy operation should have.
124  *
125  * So a special way to ask for a recursive lookup was introduced. The
126  * commit editor needs this capability to retain acceptable
127  * performance. Instead of revving the existing callback, causing
128  * unnecessary revving of functions that don't actually need the
129  * extended functionality, this second, more complete callback was
130  * introduced, for use by the commit editor.
131  *
132  * Some day, it would be nice to reunite these two callbacks and do
133  * the necessary revving anyway, but for the time being, this dual
134  * callback mechanism will do.
135  */
136 typedef svn_error_t *(*svn_repos_authz_callback_t)
138  svn_boolean_t *allowed,
139  svn_fs_root_t *root,
140  const char *path,
141  void *baton,
142  apr_pool_t *pool);
143 
144 /**
145  * Similar to @c svn_file_rev_handler_t, but without the @a
146  * result_of_merge parameter.
147  *
148  * @deprecated Provided for backward compatibility with 1.4 API.
149  * @since New in 1.1.
150  */
151 typedef svn_error_t *(*svn_repos_file_rev_handler_t)
152  (void *baton,
153  const char *path,
154  svn_revnum_t rev,
155  apr_hash_t *rev_props,
156  svn_txdelta_window_handler_t *delta_handler,
157  void **delta_baton,
158  apr_array_header_t *prop_diffs,
159  apr_pool_t *pool);
160 
161 
162 /** The repository object. */
163 typedef struct svn_repos_t svn_repos_t;
164 
165 /* Opening and creating repositories. */
166 
167 
168 /** Find the root path of the repository that contains @a path.
169  *
170  * If a repository was found, the path to the root of the repository
171  * is returned, else @c NULL. The pointer to the returned path may be
172  * equal to @a path.
173  */
174 const char *
175 svn_repos_find_root_path(const char *path,
176  apr_pool_t *pool);
177 
178 /** Set @a *repos_p to a repository object for the repository at @a path.
179  *
180  * Allocate @a *repos_p in @a pool.
181  *
182  * Acquires a shared lock on the repository, and attaches a cleanup
183  * function to @a pool to remove the lock. If no lock can be acquired,
184  * returns error, with undefined effect on @a *repos_p. If an exclusive
185  * lock is present, this blocks until it's gone.
186  */
187 svn_error_t *
188 svn_repos_open(svn_repos_t **repos_p,
189  const char *path,
190  apr_pool_t *pool);
191 
192 /** Create a new Subversion repository at @a path, building the necessary
193  * directory structure, creating the filesystem, and so on.
194  * Return the repository object in @a *repos_p, allocated in @a pool.
195  *
196  * @a config is a client configuration hash of @c svn_config_t * items
197  * keyed on config category names, and may be NULL.
198  *
199  * @a fs_config is passed to the filesystem, and may be NULL.
200  *
201  * @a unused_1 and @a unused_2 are not used and should be NULL.
202  */
203 svn_error_t *
204 svn_repos_create(svn_repos_t **repos_p,
205  const char *path,
206  const char *unused_1,
207  const char *unused_2,
208  apr_hash_t *config,
209  apr_hash_t *fs_config,
210  apr_pool_t *pool);
211 
212 /**
213  * Upgrade the Subversion repository (and its underlying versioned
214  * filesystem) located in the directory @a path to the latest version
215  * supported by this library. If the requested upgrade is not
216  * supported due to the current state of the repository or it
217  * underlying filesystem, return @c SVN_ERR_REPOS_UNSUPPORTED_UPGRADE
218  * or @c SVN_ERR_FS_UNSUPPORTED_UPGRADE (respectively) and make no
219  * changes to the repository or filesystem.
220  *
221  * Acquires an exclusive lock on the repository, upgrades the
222  * repository, and releases the lock. If an exclusive lock can't be
223  * acquired, returns error.
224  *
225  * If @a nonblocking is TRUE, an error of type EWOULDBLOCK is
226  * returned if the lock is not immediately available.
227  *
228  * If @a start_callback is not NULL, it will be called with @a
229  * start_callback_baton as argument before the upgrade starts, but
230  * after the exclusive lock has been acquired.
231  *
232  * Use @a pool for necessary allocations.
233  *
234  * @note This functionality is provided as a convenience for
235  * administrators wishing to make use of new Subversion functionality
236  * without a potentially costly full repository dump/load. As such,
237  * the operation performs only the minimum amount of work needed to
238  * accomplish this while maintaining the integrity of the repository.
239  * It does *not* guarantee the most optimized repository state as a
240  * dump and subsequent load would.
241  *
242  * @since New in 1.5.
243  */
244 svn_error_t *
245 svn_repos_upgrade(const char *path,
246  svn_boolean_t nonblocking,
247  svn_error_t *(*start_callback)(void *baton),
248  void *start_callback_baton,
249  apr_pool_t *pool);
250 
251 /** Destroy the Subversion repository found at @a path, using @a pool for any
252  * necessary allocations.
253  */
254 svn_error_t *
255 svn_repos_delete(const char *path,
256  apr_pool_t *pool);
257 
258 /**
259  * Set @a *has to TRUE if @a repos has @a capability (one of the
260  * capabilities beginning with @c "SVN_REPOS_CAPABILITY_"), else set
261  * @a *has to FALSE.
262  *
263  * If @a capability isn't recognized, throw @c SVN_ERR_UNKNOWN_CAPABILITY,
264  * with the effect on @a *has undefined.
265  *
266  * Use @a pool for all allocation.
267  *
268  * @since New in 1.5.
269  */
270 svn_error_t *
272  svn_boolean_t *has,
273  const char *capability,
274  apr_pool_t *pool);
275 
276 /**
277  * The capability of doing the right thing with merge-tracking
278  * information, both storing it and responding to queries about it.
279  *
280  * @since New in 1.5.
281  */
282 #define SVN_REPOS_CAPABILITY_MERGEINFO "mergeinfo"
283 /* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
284  *
285  * @c SVN_REPOS_CAPABILITY_foo strings should not include colons, to
286  * be consistent with @c SVN_RA_CAPABILITY_foo strings, which forbid
287  * colons for their own reasons. While this RA limitation has no
288  * direct impact on repository capabilities, there's no reason to be
289  * gratuitously different either.
290  */
291 
292 
293 /** Return the filesystem associated with repository object @a repos. */
294 svn_fs_t *
295 svn_repos_fs(svn_repos_t *repos);
296 
297 
298 /** Make a hot copy of the Subversion repository found at @a src_path
299  * to @a dst_path.
300  *
301  * Copy a possibly live Subversion repository from @a src_path to
302  * @a dst_path. If @a clean_logs is @c TRUE, perform cleanup on the
303  * source filesystem as part of the copy operation; currently, this
304  * means deleting copied, unused logfiles for a Berkeley DB source
305  * repository.
306  */
307 svn_error_t *
308 svn_repos_hotcopy(const char *src_path,
309  const char *dst_path,
310  svn_boolean_t clean_logs,
311  apr_pool_t *pool);
312 
313 
314 /**
315  * Possibly update the repository, @a repos, to use a more efficient
316  * filesystem representation. Use @a pool for allocations.
317  *
318  * @since New in 1.6.
319  */
320 svn_error_t *
322  svn_fs_pack_notify_t notify_func,
323  void *notify_baton,
324  svn_cancel_func_t cancel_func,
325  void *cancel_baton,
326  apr_pool_t *pool);
327 
328 
329 /**
330  * Run database recovery procedures on the repository at @a path,
331  * returning the database to a consistent state. Use @a pool for all
332  * allocation.
333  *
334  * Acquires an exclusive lock on the repository, recovers the
335  * database, and releases the lock. If an exclusive lock can't be
336  * acquired, returns error.
337  *
338  * If @a nonblocking is TRUE, an error of type EWOULDBLOCK is
339  * returned if the lock is not immediately available.
340  *
341  * If @a start_callback is not NULL, it will be called with @a
342  * start_callback_baton as argument before the recovery starts, but
343  * after the exclusive lock has been acquired.
344  *
345  * If @a cancel_func is not @c NULL, it is called periodically with
346  * @a cancel_baton as argument to see if the client wishes to cancel
347  * the recovery.
348  *
349  * @note On some platforms the exclusive lock does not exclude other
350  * threads in the same process so this function should only be called
351  * by a single threaded process, or by a multi-threaded process when
352  * no other threads are accessing the repository.
353  *
354  * @since New in 1.5.
355  */
356 svn_error_t *
357 svn_repos_recover3(const char *path,
358  svn_boolean_t nonblocking,
359  svn_error_t *(*start_callback)(void *baton),
360  void *start_callback_baton,
361  svn_cancel_func_t cancel_func,
362  void * cancel_baton,
363  apr_pool_t *pool);
364 
365 /**
366  * Similar to svn_repos_recover3(), but without cancellation support.
367  *
368  * @deprecated Provided for backward compatibility with the 1.4 API.
369  */
371 svn_error_t *
372 svn_repos_recover2(const char *path,
373  svn_boolean_t nonblocking,
374  svn_error_t *(*start_callback)(void *baton),
375  void *start_callback_baton,
376  apr_pool_t *pool);
377 
378 /**
379  * Similar to svn_repos_recover2(), but with nonblocking set to FALSE, and
380  * with no callbacks provided.
381  *
382  * @deprecated Provided for backward compatibility with the 1.0 API.
383  */
385 svn_error_t *
386 svn_repos_recover(const char *path,
387  apr_pool_t *pool);
388 
389 /** This function is a wrapper around svn_fs_berkeley_logfiles(),
390  * returning log file paths relative to the root of the repository.
391  *
392  * @copydoc svn_fs_berkeley_logfiles()
393  */
394 svn_error_t *
395 svn_repos_db_logfiles(apr_array_header_t **logfiles,
396  const char *path,
397  svn_boolean_t only_unused,
398  apr_pool_t *pool);
399 
400 
401 
402 /* Repository Paths */
403 
404 /** Return the top-level repository path allocated in @a pool. */
405 const char *
407  apr_pool_t *pool);
408 
409 /** Return the path to @a repos's filesystem directory, allocated in
410  * @a pool.
411  */
412 const char *
414  apr_pool_t *pool);
415 
416 /** Return path to @a repos's config directory, allocated in @a pool. */
417 const char *
419  apr_pool_t *pool);
420 
421 /** Return path to @a repos's svnserve.conf, allocated in @a pool. */
422 const char *
424  apr_pool_t *pool);
425 
426 /** Return path to @a repos's lock directory, allocated in @a pool. */
427 const char *
429  apr_pool_t *pool);
430 
431 /** Return path to @a repos's db lockfile, allocated in @a pool. */
432 const char *
434  apr_pool_t *pool);
435 
436 /** Return path to @a repos's db logs lockfile, allocated in @a pool. */
437 const char *
439  apr_pool_t *pool);
440 
441 /** Return the path to @a repos's hook directory, allocated in @a pool. */
442 const char *
444  apr_pool_t *pool);
445 
446 /** Return the path to @a repos's start-commit hook, allocated in @a pool. */
447 const char *
449  apr_pool_t *pool);
450 
451 /** Return the path to @a repos's pre-commit hook, allocated in @a pool. */
452 const char *
454  apr_pool_t *pool);
455 
456 /** Return the path to @a repos's post-commit hook, allocated in @a pool. */
457 const char *
459  apr_pool_t *pool);
460 
461 /** Return the path to @a repos's pre-revprop-change hook, allocated in
462  * @a pool.
463  */
464 const char *
466  apr_pool_t *pool);
467 
468 /** Return the path to @a repos's post-revprop-change hook, allocated in
469  * @a pool.
470  */
471 const char *
473  apr_pool_t *pool);
474 
475 
476 /** @defgroup svn_repos_lock_hooks Paths to lock hooks
477  * @{
478  * @since New in 1.2. */
479 
480 /** Return the path to @a repos's pre-lock hook, allocated in @a pool. */
481 const char *
483  apr_pool_t *pool);
484 
485 /** Return the path to @a repos's post-lock hook, allocated in @a pool. */
486 const char *
488  apr_pool_t *pool);
489 
490 /** Return the path to @a repos's pre-unlock hook, allocated in @a pool. */
491 const char *
493  apr_pool_t *pool);
494 
495 /** Return the path to @a repos's post-unlock hook, allocated in @a pool. */
496 const char *
498  apr_pool_t *pool);
499 
500 /** @} */
501 
502 /* ---------------------------------------------------------------*/
503 
504 /* Reporting the state of a working copy, for updates. */
505 
506 
507 /**
508  * Construct and return a @a report_baton that will be passed to the
509  * other functions in this section to describe the state of a pre-existing
510  * tree (typically, a working copy). When the report is finished,
511  * @a editor/@a edit_baton will be driven in such a way as to transform the
512  * existing tree to @a revnum and, if @a tgt_path is non-NULL, switch the
513  * reported hierarchy to @a tgt_path.
514  *
515  * @a fs_base is the absolute path of the node in the filesystem at which
516  * the comparison should be rooted. @a target is a single path component,
517  * used to limit the scope of the report to a single entry of @a fs_base,
518  * or "" if all of @a fs_base itself is the main subject of the report.
519  *
520  * @a tgt_path and @a revnum is the fs path/revision pair that is the
521  * "target" of the delta. @a tgt_path should be provided only when
522  * the source and target paths of the report differ. That is, @a tgt_path
523  * should *only* be specified when specifying that the resultant editor
524  * drive be one that transforms the reported hierarchy into a pristine tree
525  * of @a tgt_path at revision @a revnum. A @c NULL value for @a tgt_path
526  * will indicate that the editor should be driven in such a way as to
527  * transform the reported hierarchy to revision @a revnum, preserving the
528  * reported hierarchy.
529  *
530  * @a text_deltas instructs the driver of the @a editor to enable
531  * the generation of text deltas.
532  *
533  * @a ignore_ancestry instructs the driver to ignore node ancestry
534  * when determining how to transmit differences.
535  *
536  * @a send_copyfrom_args instructs the driver to send 'copyfrom'
537  * arguments to the editor's add_file() and add_directory() methods,
538  * whenever it deems feasible.
539  *
540  * The @a authz_read_func and @a authz_read_baton are passed along to
541  * svn_repos_dir_delta2(); see that function for how they are used.
542  *
543  * All allocation for the context and collected state will occur in
544  * @a pool.
545  *
546  * @a depth is the requested depth of the editor drive.
547  *
548  * If @a depth is @c svn_depth_unknown, the editor will affect only the
549  * paths reported by the individual calls to @c svn_repos_set_path3 and
550  * @c svn_repos_link_path3.
551  *
552  * For example, if the reported tree is the @c A subdir of the Greek Tree
553  * (see Subversion's test suite), at depth @c svn_depth_empty, but the
554  * @c A/B subdir is reported at depth @c svn_depth_infinity, then
555  * repository-side changes to @c A/mu, or underneath @c A/C and @c
556  * A/D, would not be reflected in the editor drive, but changes
557  * underneath @c A/B would be.
558  *
559  * Additionally, the editor driver will call @c add_directory and
560  * and @c add_file for directories with an appropriate depth. For
561  * example, a directory reported at @c svn_depth_files will receive
562  * file (but not directory) additions. A directory at @c svn_depth_empty
563  * will receive neither.
564  *
565  * If @a depth is @c svn_depth_files, @c svn_depth_immediates or
566  * @c svn_depth_infinity and @a depth is greater than the reported depth
567  * of the working copy, then the editor driver will emit editor
568  * operations so as to upgrade the working copy to this depth.
569  *
570  * If @a depth is @c svn_depth_empty, @c svn_depth_files,
571  * @c svn_depth_immediates and @a depth is lower
572  * than or equal to the depth of the working copy, then the editor
573  * operations will affect only paths at or above @a depth.
574  *
575  * @since New in 1.5.
576  */
577 svn_error_t *
578 svn_repos_begin_report2(void **report_baton,
579  svn_revnum_t revnum,
580  svn_repos_t *repos,
581  const char *fs_base,
582  const char *target,
583  const char *tgt_path,
584  svn_boolean_t text_deltas,
585  svn_depth_t depth,
586  svn_boolean_t ignore_ancestry,
587  svn_boolean_t send_copyfrom_args,
588  const svn_delta_editor_t *editor,
589  void *edit_baton,
590  svn_repos_authz_func_t authz_read_func,
591  void *authz_read_baton,
592  apr_pool_t *pool);
593 
594 /**
595  * The same as svn_repos_begin_report2(), but taking a boolean
596  * @a recurse flag, and sending FALSE for @a send_copyfrom_args.
597  *
598  * If @a recurse is TRUE, the editor driver will drive the editor with
599  * a depth of @c svn_depth_infinity; if FALSE, then with a depth of
600  * @c svn_depth_files.
601  *
602  * @note @a username is ignored, and has been removed in a revised
603  * version of this API.
604  *
605  * @deprecated Provided for backward compatibility with the 1.4 API.
606  */
608 svn_error_t *
609 svn_repos_begin_report(void **report_baton,
610  svn_revnum_t revnum,
611  const char *username,
612  svn_repos_t *repos,
613  const char *fs_base,
614  const char *target,
615  const char *tgt_path,
616  svn_boolean_t text_deltas,
617  svn_boolean_t recurse,
618  svn_boolean_t ignore_ancestry,
619  const svn_delta_editor_t *editor,
620  void *edit_baton,
621  svn_repos_authz_func_t authz_read_func,
622  void *authz_read_baton,
623  apr_pool_t *pool);
624 
625 
626 /**
627  * Given a @a report_baton constructed by svn_repos_begin_report2(),
628  * record the presence of @a path, at @a revision with depth @a depth,
629  * in the current tree.
630  *
631  * @a path is relative to the anchor/target used in the creation of the
632  * @a report_baton.
633  *
634  * @a revision may be SVN_INVALID_REVNUM if (for example) @a path
635  * represents a locally-added path with no revision number, or @a
636  * depth is @c svn_depth_exclude.
637  *
638  * @a path may not be underneath a path on which svn_repos_set_path3()
639  * was previously called with @c svn_depth_exclude in this report.
640  *
641  * The first call of this in a given report usually passes an empty
642  * @a path; this is used to set up the correct root revision for the editor
643  * drive.
644  *
645  * A depth of @c svn_depth_unknown is not allowed, and results in an
646  * error.
647  *
648  * If @a start_empty is TRUE and @a path is a directory, then require the
649  * caller to explicitly provide all the children of @a path - do not assume
650  * that the tree also contains all the children of @a path at @a revision.
651  * This is for 'low confidence' client reporting.
652  *
653  * If the caller has a lock token for @a path, then @a lock_token should
654  * be set to that token. Else, @a lock_token should be NULL.
655  *
656  * All temporary allocations are done in @a pool.
657  *
658  * @since New in 1.5.
659  */
660 svn_error_t *
661 svn_repos_set_path3(void *report_baton,
662  const char *path,
663  svn_revnum_t revision,
664  svn_depth_t depth,
665  svn_boolean_t start_empty,
666  const char *lock_token,
667  apr_pool_t *pool);
668 
669 /**
670  * Similar to svn_repos_set_path3(), but with @a depth set to
671  * @c svn_depth_infinity.
672  *
673  * @deprecated Provided for backward compatibility with the 1.4 API.
674  */
676 svn_error_t *
677 svn_repos_set_path2(void *report_baton,
678  const char *path,
679  svn_revnum_t revision,
680  svn_boolean_t start_empty,
681  const char *lock_token,
682  apr_pool_t *pool);
683 
684 /**
685  * Similar to svn_repos_set_path2(), but with @a lock_token set to @c NULL.
686  *
687  * @deprecated Provided for backward compatibility with the 1.1 API.
688  */
690 svn_error_t *
691 svn_repos_set_path(void *report_baton,
692  const char *path,
693  svn_revnum_t revision,
694  svn_boolean_t start_empty,
695  apr_pool_t *pool);
696 
697 /**
698  * Given a @a report_baton constructed by svn_repos_begin_report2(),
699  * record the presence of @a path in the current tree, containing the contents
700  * of @a link_path at @a revision with depth @a depth.
701  *
702  * A depth of @c svn_depth_unknown is not allowed, and results in an
703  * error.
704  *
705  * @a path may not be underneath a path on which svn_repos_set_path3()
706  * was previously called with @c svn_depth_exclude in this report.
707  *
708  * Note that while @a path is relative to the anchor/target used in the
709  * creation of the @a report_baton, @a link_path is an absolute filesystem
710  * path!
711  *
712  * If @a start_empty is TRUE and @a path is a directory, then require the
713  * caller to explicitly provide all the children of @a path - do not assume
714  * that the tree also contains all the children of @a link_path at
715  * @a revision. This is for 'low confidence' client reporting.
716  *
717  * If the caller has a lock token for @a link_path, then @a lock_token
718  * should be set to that token. Else, @a lock_token should be NULL.
719  *
720  * All temporary allocations are done in @a pool.
721  *
722  * @since New in 1.5.
723  */
724 svn_error_t *
725 svn_repos_link_path3(void *report_baton,
726  const char *path,
727  const char *link_path,
728  svn_revnum_t revision,
729  svn_depth_t depth,
730  svn_boolean_t start_empty,
731  const char *lock_token,
732  apr_pool_t *pool);
733 
734 /**
735  * Similar to svn_repos_link_path3(), but with @a depth set to
736  * @c svn_depth_infinity.
737  *
738  * @deprecated Provided for backward compatibility with the 1.4 API.
739  */
741 svn_error_t *
742 svn_repos_link_path2(void *report_baton,
743  const char *path,
744  const char *link_path,
745  svn_revnum_t revision,
746  svn_boolean_t start_empty,
747  const char *lock_token,
748  apr_pool_t *pool);
749 
750 /**
751  * Similar to svn_repos_link_path2(), but with @a lock_token set to @c NULL.
752  *
753  * @deprecated Provided for backward compatibility with the 1.1 API.
754  */
756 svn_error_t *
757 svn_repos_link_path(void *report_baton,
758  const char *path,
759  const char *link_path,
760  svn_revnum_t revision,
761  svn_boolean_t start_empty,
762  apr_pool_t *pool);
763 
764 /** Given a @a report_baton constructed by svn_repos_begin_report2(),
765  * record the non-existence of @a path in the current tree.
766  *
767  * @a path may not be underneath a path on which svn_repos_set_path3()
768  * was previously called with @c svn_depth_exclude in this report.
769  *
770  * (This allows the reporter's driver to describe missing pieces of a
771  * working copy, so that 'svn up' can recreate them.)
772  *
773  * All temporary allocations are done in @a pool.
774  */
775 svn_error_t *
776 svn_repos_delete_path(void *report_baton,
777  const char *path,
778  apr_pool_t *pool);
779 
780 /** Given a @a report_baton constructed by svn_repos_begin_report2(),
781  * finish the report and drive the editor as specified when the report
782  * baton was constructed.
783  *
784  * If an error occurs during the driving of the editor, do NOT abort the
785  * edit; that responsibility belongs to the caller of this function, if
786  * it happens at all.
787  *
788  * After the call to this function, @a report_baton is no longer valid;
789  * it should not be passed to any other reporting functions, including
790  * svn_repos_abort_report().
791  */
792 svn_error_t *
793 svn_repos_finish_report(void *report_baton,
794  apr_pool_t *pool);
795 
796 
797 /** Given a @a report_baton constructed by svn_repos_begin_report2(),
798  * abort the report. This function can be called anytime before
799  * svn_repos_finish_report() is called.
800  *
801  * After the call to this function, @a report_baton is no longer valid;
802  * it should not be passed to any other reporting functions.
803  */
804 svn_error_t *
805 svn_repos_abort_report(void *report_baton,
806  apr_pool_t *pool);
807 
808 
809 /* ---------------------------------------------------------------*/
810 
811 /* The magical dir_delta update routines. */
812 
813 /** Use the provided @a editor and @a edit_baton to describe the changes
814  * necessary for making a given node (and its descendants, if it is a
815  * directory) under @a src_root look exactly like @a tgt_path under
816  * @a tgt_root. @a src_entry is the node to update. If @a src_entry
817  * is empty, then compute the difference between the entire tree
818  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
819  * under @a tgt_root. Else, describe the changes needed to update
820  * only that entry in @a src_parent_dir. Typically, callers of this
821  * function will use a @a tgt_path that is the concatenation of @a
822  * src_parent_dir and @a src_entry.
823  *
824  * @a src_root and @a tgt_root can both be either revision or transaction
825  * roots. If @a tgt_root is a revision, @a editor's set_target_revision()
826  * will be called with the @a tgt_root's revision number, else it will
827  * not be called at all.
828  *
829  * If @a authz_read_func is non-NULL, invoke it before any call to
830  *
831  * @a editor->open_root
832  * @a editor->add_directory
833  * @a editor->open_directory
834  * @a editor->add_file
835  * @a editor->open_file
836  *
837  * passing @a tgt_root, the same path that would be passed to the
838  * editor function in question, and @a authz_read_baton. If the
839  * @a *allowed parameter comes back TRUE, then proceed with the planned
840  * editor call; else if FALSE, then invoke @a editor->absent_file or
841  * @a editor->absent_directory as appropriate, except if the planned
842  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
843  *
844  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to
845  * the window handler returned by @a editor->apply_textdelta().
846  *
847  * If @a depth is @c svn_depth_empty, invoke @a editor calls only on
848  * @a src_entry (or @a src_parent_dir, if @a src_entry is empty).
849  * If @a depth is @c svn_depth_files, also invoke the editor on file
850  * children, if any; if @c svn_depth_immediates, invoke it on
851  * immediate subdirectories as well as files; if @c svn_depth_infinity,
852  * recurse fully.
853  *
854  * If @a entry_props is @c TRUE, accompany each opened/added entry with
855  * propchange editor calls that relay special "entry props" (this
856  * is typically used only for working copy updates).
857  *
858  * @a ignore_ancestry instructs the function to ignore node ancestry
859  * when determining how to transmit differences.
860  *
861  * Before completing successfully, this function calls @a editor's
862  * close_edit(), so the caller should expect its @a edit_baton to be
863  * invalid after its use with this function.
864  *
865  * Do any allocation necessary for the delta computation in @a pool.
866  * This function's maximum memory consumption is at most roughly
867  * proportional to the greatest depth of the tree under @a tgt_root, not
868  * the total size of the delta.
869  *
870  * ### svn_repos_dir_delta2 is mostly superceded by the reporter
871  * ### functionality (svn_repos_begin_report2 and friends).
872  * ### svn_repos_dir_delta2 does allow the roots to be transaction
873  * ### roots rather than just revision roots, and it has the
874  * ### entry_props flag. Almost all of Subversion's own code uses the
875  * ### reporter instead; there are some stray references to the
876  * ### svn_repos_dir_delta[2] in comments which should probably
877  * ### actually refer to the reporter.
878  */
879 svn_error_t *
881  const char *src_parent_dir,
882  const char *src_entry,
883  svn_fs_root_t *tgt_root,
884  const char *tgt_path,
885  const svn_delta_editor_t *editor,
886  void *edit_baton,
887  svn_repos_authz_func_t authz_read_func,
888  void *authz_read_baton,
889  svn_boolean_t text_deltas,
890  svn_depth_t depth,
891  svn_boolean_t entry_props,
892  svn_boolean_t ignore_ancestry,
893  apr_pool_t *pool);
894 
895 /**
896  * Similar to svn_repos_dir_delta2(), but if @a recurse is TRUE, pass
897  * @c svn_depth_infinity for @a depth, and if @a recurse is FALSE,
898  * pass @c svn_depth_files for @a depth.
899  *
900  * @deprecated Provided for backward compatibility with the 1.4 API.
901  */
903 svn_error_t *
905  const char *src_parent_dir,
906  const char *src_entry,
907  svn_fs_root_t *tgt_root,
908  const char *tgt_path,
909  const svn_delta_editor_t *editor,
910  void *edit_baton,
911  svn_repos_authz_func_t authz_read_func,
912  void *authz_read_baton,
913  svn_boolean_t text_deltas,
914  svn_boolean_t recurse,
915  svn_boolean_t entry_props,
916  svn_boolean_t ignore_ancestry,
917  apr_pool_t *pool);
918 
919 
920 /** Use the provided @a editor and @a edit_baton to describe the
921  * skeletal changes made in a particular filesystem @a root
922  * (revision or transaction).
923  *
924  * Changes will be limited to those within @a base_dir, and if
925  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
926  * it is assumed that the client has no knowledge of revisions prior to
927  * @a low_water_mark. Together, these two arguments define the portion of
928  * the tree that the client is assumed to have knowledge of, and thus any
929  * copies of data from outside that part of the tree will be sent in their
930  * entirety, not as simple copies or deltas against a previous version.
931  *
932  * The @a editor passed to this function should be aware of the fact
933  * that, if @a send_deltas is FALSE, calls to its change_dir_prop(),
934  * change_file_prop(), and apply_textdelta() functions will not
935  * contain meaningful data, and merely serve as indications that
936  * properties or textual contents were changed.
937  *
938  * If @a send_deltas is @c TRUE, the text and property deltas for changes
939  * will be sent, otherwise NULL text deltas and empty prop changes will be
940  * used.
941  *
942  * If @a authz_read_func is non-NULL, it will be used to determine if the
943  * user has read access to the data being accessed. Data that the user
944  * cannot access will be skipped.
945  *
946  * @note This editor driver passes SVN_INVALID_REVNUM for all
947  * revision parameters in the editor interface except the copyfrom
948  * parameter of the add_file() and add_directory() editor functions.
949  *
950  * @since New in 1.4.
951  */
952 svn_error_t *
954  const char *base_dir,
955  svn_revnum_t low_water_mark,
956  svn_boolean_t send_deltas,
957  const svn_delta_editor_t *editor,
958  void *edit_baton,
959  svn_repos_authz_func_t authz_read_func,
960  void *authz_read_baton,
961  apr_pool_t *pool);
962 
963 /**
964  * Similar to svn_repos_replay2(), but with @a base_dir set to @c "",
965  * @a low_water_mark set to @c SVN_INVALID_REVNUM, @a send_deltas
966  * set to @c FALSE, and @a authz_read_func and @a authz_read_baton
967  * set to @c NULL.
968  *
969  * @deprecated Provided for backward compatibility with the 1.3 API.
970  */
972 svn_error_t *
974  const svn_delta_editor_t *editor,
975  void *edit_baton,
976  apr_pool_t *pool);
977 
978 /* ---------------------------------------------------------------*/
979 
980 /* Making commits. */
981 
982 /**
983  * Return an @a editor and @a edit_baton to commit changes to the
984  * filesystem of @a repos, beginning at location 'rev:@a base_path',
985  * where "rev" is the argument given to open_root().
986  *
987  * @a repos is a previously opened repository. @a repos_url is the
988  * decoded URL to the base of the repository, and is used to check
989  * copyfrom paths. @a txn is a filesystem transaction object to use
990  * during the commit, or @c NULL to indicate that this function should
991  * create (and fully manage) a new transaction.
992  *
993  * Store the contents of @a revprop_table, a hash mapping <tt>const
994  * char *</tt> property names to @c svn_string_t values, as properties
995  * of the commit transaction, including author and log message if
996  * present.
997  *
998  * @note @c SVN_PROP_REVISION_DATE may be present in @a revprop_table, but
999  * it will be overwritten when the transaction is committed.
1000  *
1001  * Iff @a authz_callback is provided, check read/write authorizations
1002  * on paths accessed by editor operations. An operation which fails
1003  * due to authz will return SVN_ERR_AUTHZ_UNREADABLE or
1004  * SVN_ERR_AUTHZ_UNWRITABLE.
1005  *
1006  * Calling @a (*editor)->close_edit completes the commit.
1007  *
1008  * If @a callback is non-NULL, then before @c close_edit returns (but
1009  * after the commit has succeeded) @c close_edit will invoke
1010  * @a callback with a filled-in @c svn_commit_info_t *, @a callback_baton,
1011  * and @a pool or some subpool thereof as arguments. If @a callback
1012  * returns an error, that error will be returned from @c close_edit,
1013  * otherwise if there was a post-commit hook failure, then that error
1014  * will be returned with code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.
1015  * (Note that prior to Subversion 1.6, @a callback cannot be NULL; if
1016  * you don't need a callback, pass a dummy function.)
1017  *
1018  * Calling @a (*editor)->abort_edit aborts the commit, and will also
1019  * abort the commit transaction unless @a txn was supplied (not @c
1020  * NULL). Callers who supply their own transactions are responsible
1021  * for cleaning them up (either by committing them, or aborting them).
1022  *
1023  * @since New in 1.5.
1024  */
1025 svn_error_t *
1027  void **edit_baton,
1028  svn_repos_t *repos,
1029  svn_fs_txn_t *txn,
1030  const char *repos_url,
1031  const char *base_path,
1032  apr_hash_t *revprop_table,
1033  svn_commit_callback2_t callback,
1034  void *callback_baton,
1035  svn_repos_authz_callback_t authz_callback,
1036  void *authz_baton,
1037  apr_pool_t *pool);
1038 
1039 /**
1040  * Similar to svn_repos_get_commit_editor5(), but with @a revprop_table
1041  * set to a hash containing @a user and @a log_msg as the
1042  * @c SVN_PROP_REVISION_AUTHOR and @c SVN_PROP_REVISION_LOG properties,
1043  * respectively. @a user and @a log_msg may both be @c NULL.
1044  *
1045  * @since New in 1.4.
1046  *
1047  * @deprecated Provided for backward compatibility with the 1.4 API.
1048  */
1050 svn_error_t *
1052  void **edit_baton,
1053  svn_repos_t *repos,
1054  svn_fs_txn_t *txn,
1055  const char *repos_url,
1056  const char *base_path,
1057  const char *user,
1058  const char *log_msg,
1059  svn_commit_callback2_t callback,
1060  void *callback_baton,
1061  svn_repos_authz_callback_t authz_callback,
1062  void *authz_baton,
1063  apr_pool_t *pool);
1064 
1065 /**
1066  * Similar to svn_repos_get_commit_editor4(), but
1067  * uses the svn_commit_callback_t type.
1068  *
1069  * @since New in 1.3.
1070  *
1071  * @deprecated Provided for backward compatibility with the 1.3 API.
1072  */
1074 svn_error_t *
1076  void **edit_baton,
1077  svn_repos_t *repos,
1078  svn_fs_txn_t *txn,
1079  const char *repos_url,
1080  const char *base_path,
1081  const char *user,
1082  const char *log_msg,
1083  svn_commit_callback_t callback,
1084  void *callback_baton,
1085  svn_repos_authz_callback_t authz_callback,
1086  void *authz_baton,
1087  apr_pool_t *pool);
1088 
1089 /**
1090  * Similar to svn_repos_get_commit_editor3(), but with @a
1091  * authz_callback and @a authz_baton set to @c NULL.
1092  *
1093  * @deprecated Provided for backward compatibility with the 1.2 API.
1094  */
1096 svn_error_t *
1098  void **edit_baton,
1099  svn_repos_t *repos,
1100  svn_fs_txn_t *txn,
1101  const char *repos_url,
1102  const char *base_path,
1103  const char *user,
1104  const char *log_msg,
1105  svn_commit_callback_t callback,
1106  void *callback_baton,
1107  apr_pool_t *pool);
1108 
1109 
1110 /**
1111  * Similar to svn_repos_get_commit_editor2(), but with @a txn always
1112  * set to @c NULL.
1113  *
1114  * @deprecated Provided for backward compatibility with the 1.1 API.
1115  */
1117 svn_error_t *
1119  void **edit_baton,
1120  svn_repos_t *repos,
1121  const char *repos_url,
1122  const char *base_path,
1123  const char *user,
1124  const char *log_msg,
1125  svn_commit_callback_t callback,
1126  void *callback_baton,
1127  apr_pool_t *pool);
1128 
1129 /* ---------------------------------------------------------------*/
1130 
1131 /* Finding particular revisions. */
1132 
1133 /** Set @a *revision to the revision number in @a repos's filesystem that was
1134  * youngest at time @a tm.
1135  */
1136 svn_error_t *
1138  svn_repos_t *repos,
1139  apr_time_t tm,
1140  apr_pool_t *pool);
1141 
1142 
1143 /** Given a @a root/@a path within some filesystem, return three pieces of
1144  * information allocated in @a pool:
1145  *
1146  * - set @a *committed_rev to the revision in which the object was
1147  * last modified. (In fs parlance, this is the revision in which
1148  * the particular node-rev-id was 'created'.)
1149  *
1150  * - set @a *committed_date to the date of said revision, or @c NULL
1151  * if not available.
1152  *
1153  * - set @a *last_author to the author of said revision, or @c NULL
1154  * if not available.
1155  */
1156 svn_error_t *
1158  const char **committed_date,
1159  const char **last_author,
1160  svn_fs_root_t *root,
1161  const char *path,
1162  apr_pool_t *pool);
1163 
1164 
1165 /**
1166  * Set @a *dirent to an @c svn_dirent_t associated with @a path in @a
1167  * root. If @a path does not exist in @a root, set @a *dirent to
1168  * NULL. Use @a pool for memory allocation.
1169  *
1170  * @since New in 1.2.
1171  */
1172 svn_error_t *
1173 svn_repos_stat(svn_dirent_t **dirent,
1174  svn_fs_root_t *root,
1175  const char *path,
1176  apr_pool_t *pool);
1177 
1178 
1179 /**
1180  * Given @a path which exists at revision @a start in @a fs, set
1181  * @a *deleted to the revision @a path was first deleted, within the
1182  * inclusive revision range bounded by @a start and @a end. If @a path
1183  * does not exist at revision @a start or was not deleted within the
1184  * specified range, then set @a *deleted to SVN_INVALID_REVNUM.
1185  * Use @a pool for memory allocation.
1186  *
1187  * @since New in 1.5.
1188  */
1189 svn_error_t *
1191  const char *path,
1192  svn_revnum_t start,
1193  svn_revnum_t end,
1194  svn_revnum_t *deleted,
1195  apr_pool_t *pool);
1196 
1197 
1198 /** Callback type for use with svn_repos_history(). @a path and @a
1199  * revision represent interesting history locations in the lifetime
1200  * of the path passed to svn_repos_history(). @a baton is the same
1201  * baton given to svn_repos_history(). @a pool is provided for the
1202  * convenience of the implementor, who should not expect it to live
1203  * longer than a single callback call.
1204  *
1205  * Signal to callback driver to stop processing/invoking this callback
1206  * by returning the @c SVN_ERR_CEASE_INVOCATION error code.
1207  *
1208  * @note SVN_ERR_CEASE_INVOCATION is new in 1.5.
1209  */
1210 typedef svn_error_t *(*svn_repos_history_func_t)(void *baton,
1211  const char *path,
1212  svn_revnum_t revision,
1213  apr_pool_t *pool);
1214 
1215 /**
1216  * Call @a history_func (with @a history_baton) for each interesting
1217  * history location in the lifetime of @a path in @a fs, from the
1218  * youngest of @a end and @a start to the oldest. Stop processing if
1219  * @a history_func returns @c SVN_ERR_CEASE_INVOCATION. Only cross
1220  * filesystem copy history if @a cross_copies is @c TRUE. And do all
1221  * of this in @a pool.
1222  *
1223  * If @a authz_read_func is non-NULL, then use it (and @a
1224  * authz_read_baton) to verify that @a path in @a end is readable; if
1225  * not, return SVN_ERR_AUTHZ_UNREADABLE. Also verify the readability
1226  * of every ancestral path/revision pair before pushing them at @a
1227  * history_func. If a pair is deemed unreadable, then do not send
1228  * them; instead, immediately stop traversing history and return
1229  * SVN_NO_ERROR.
1230  *
1231  * @since New in 1.1.
1232  *
1233  * @note SVN_ERR_CEASE_INVOCATION is new in 1.5.
1234  */
1235 svn_error_t *
1237  const char *path,
1238  svn_repos_history_func_t history_func,
1239  void *history_baton,
1240  svn_repos_authz_func_t authz_read_func,
1241  void *authz_read_baton,
1242  svn_revnum_t start,
1243  svn_revnum_t end,
1244  svn_boolean_t cross_copies,
1245  apr_pool_t *pool);
1246 
1247 /**
1248  * Similar to svn_repos_history2(), but with @a authz_read_func
1249  * and @a authz_read_baton always set to NULL.
1250  *
1251  * @deprecated Provided for backward compatibility with the 1.0 API.
1252  */
1254 svn_error_t *
1256  const char *path,
1257  svn_repos_history_func_t history_func,
1258  void *history_baton,
1259  svn_revnum_t start,
1260  svn_revnum_t end,
1261  svn_boolean_t cross_copies,
1262  apr_pool_t *pool);
1263 
1264 
1265 /**
1266  * Set @a *locations to be a mapping of the revisions to the paths of
1267  * the file @a fs_path present at the repository in revision
1268  * @a peg_revision, where the revisions are taken out of the array
1269  * @a location_revisions.
1270  *
1271  * @a location_revisions is an array of svn_revnum_t's and @a *locations
1272  * maps 'svn_revnum_t *' to 'const char *'.
1273  *
1274  * If optional @a authz_read_func is non-NULL, then use it (and @a
1275  * authz_read_baton) to verify that the peg-object is readable. If not,
1276  * return SVN_ERR_AUTHZ_UNREADABLE. Also use the @a authz_read_func
1277  * to check that every path returned in the hash is readable. If an
1278  * unreadable path is encountered, stop tracing and return
1279  * SVN_NO_ERROR.
1280  *
1281  * @a pool is used for all allocations.
1282  *
1283  * @since New in 1.1.
1284  */
1285 svn_error_t *
1287  apr_hash_t **locations,
1288  const char *fs_path,
1289  svn_revnum_t peg_revision,
1290  apr_array_header_t *location_revisions,
1291  svn_repos_authz_func_t authz_read_func,
1292  void *authz_read_baton,
1293  apr_pool_t *pool);
1294 
1295 
1296 /**
1297  * Call @a receiver and @a receiver_baton to report successive
1298  * location segments in revisions between @a start_rev and @a end_rev
1299  * (inclusive) for the line of history identified by the peg-object @a
1300  * path in @a peg_revision (and in @a repos).
1301  *
1302  * @a end_rev may be @c SVN_INVALID_REVNUM to indicate that you want
1303  * to trace the history of the object to its origin.
1304  *
1305  * @a start_rev may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1306  * revision". Otherwise, @a start_rev must be younger than @a end_rev
1307  * (unless @a end_rev is @c SVN_INVALID_REVNUM).
1308  *
1309  * @a peg_revision may be @c SVN_INVALID_REVNUM to indicate "the HEAD
1310  * revision", and must evaluate to be at least as young as @a start_rev.
1311  *
1312  * If optional @a authz_read_func is not @c NULL, then use it (and @a
1313  * authz_read_baton) to verify that the peg-object is readable. If
1314  * not, return @c SVN_ERR_AUTHZ_UNREADABLE. Also use the @a
1315  * authz_read_func to check that every path reported in a location
1316  * segment is readable. If an unreadable path is encountered, report
1317  * a final (possibly truncated) location segment (if any), stop
1318  * tracing history, and return @c SVN_NO_ERROR.
1319  *
1320  * @a pool is used for all allocations.
1321  *
1322  * @since New in 1.5.
1323  */
1324 svn_error_t *
1326  const char *path,
1327  svn_revnum_t peg_revision,
1328  svn_revnum_t start_rev,
1329  svn_revnum_t end_rev,
1331  void *receiver_baton,
1332  svn_repos_authz_func_t authz_read_func,
1333  void *authz_read_baton,
1334  apr_pool_t *pool);
1335 
1336 
1337 /* ### other queries we can do someday --
1338 
1339  * fetch the last revision created by <user>
1340  (once usernames become revision properties!)
1341  * fetch the last revision where <path> was modified
1342 
1343 */
1344 
1345 
1346 
1347 /* ---------------------------------------------------------------*/
1348 
1349 /* Retrieving log messages. */
1350 
1351 
1352 /**
1353  * Invoke @a receiver with @a receiver_baton on each log message from
1354  * @a start to @a end in @a repos's filesystem. @a start may be greater
1355  * or less than @a end; this just controls whether the log messages are
1356  * processed in descending or ascending revision number order.
1357  *
1358  * If @a start or @a end is @c SVN_INVALID_REVNUM, it defaults to youngest.
1359  *
1360  * If @a paths is non-NULL and has one or more elements, then only show
1361  * revisions in which at least one of @a paths was changed (i.e., if
1362  * file, text or props changed; if dir, props or entries changed or any node
1363  * changed below it). Each path is a <tt>const char *</tt> representing
1364  * an absolute path in the repository. If @a paths is NULL or empty,
1365  * show all revisions regardless of what paths were changed in those
1366  * revisions.
1367  *
1368  * If @a limit is non-zero then only invoke @a receiver on the first
1369  * @a limit logs.
1370  *
1371  * If @a discover_changed_paths, then each call to @a receiver passes a
1372  * hash mapping paths committed in that revision to information about them
1373  * as the receiver's @a changed_paths argument.
1374  * Otherwise, each call to @a receiver passes NULL for @a changed_paths.
1375  *
1376  * If @a strict_node_history is set, copy history (if any exists) will
1377  * not be traversed while harvesting revision logs for each path.
1378  *
1379  * If @a include_merged_revisions is set, log information for revisions
1380  * which have been merged to @a paths will also be returned, unless these
1381  * revisions are already part of @a start to @a end in @a repos's
1382  * filesystem, as limted by @a paths. In the latter case those revisions
1383  * are skipped and @a receiver is not invoked.
1384  *
1385  * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
1386  * revprops named in the array (i.e. retrieve none if the array is empty).
1387  *
1388  * If any invocation of @a receiver returns error, return that error
1389  * immediately and without wrapping it.
1390  *
1391  * If @a start or @a end is a non-existent revision, return the error
1392  * @c SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
1393  *
1394  * If optional @a authz_read_func is non-NULL, then use this function
1395  * (along with optional @a authz_read_baton) to check the readability
1396  * of each changed-path in each revision about to be "pushed" at
1397  * @a receiver. If a revision has some changed-paths readable and
1398  * others unreadable, unreadable paths are omitted from the
1399  * changed_paths field and only svn:author and svn:date will be
1400  * available in the revprops field. If a revision has no
1401  * changed-paths readable at all, then all paths are omitted and no
1402  * revprops are available.
1403  *
1404  * See also the documentation for @c svn_log_entry_receiver_t.
1405  *
1406  * Use @a pool for temporary allocations.
1407  *
1408  * @since New in 1.5.
1409  */
1410 svn_error_t *
1412  const apr_array_header_t *paths,
1413  svn_revnum_t start,
1414  svn_revnum_t end,
1415  int limit,
1416  svn_boolean_t discover_changed_paths,
1417  svn_boolean_t strict_node_history,
1418  svn_boolean_t include_merged_revisions,
1419  const apr_array_header_t *revprops,
1420  svn_repos_authz_func_t authz_read_func,
1421  void *authz_read_baton,
1422  svn_log_entry_receiver_t receiver,
1423  void *receiver_baton,
1424  apr_pool_t *pool);
1425 
1426 /**
1427  * Same as svn_repos_get_logs4(), but with @a receiver being @c
1428  * svn_log_message_receiver_t instead of @c svn_log_entry_receiver_t.
1429  * Also, @a include_merged_revisions is set to @c FALSE and @a revprops is
1430  * svn:author, svn:date, and svn:log. If @a paths is empty, nothing
1431  * is returned.
1432  *
1433  * @since New in 1.2.
1434  * @deprecated Provided for backward compatibility with the 1.4 API.
1435  */
1437 svn_error_t *
1439  const apr_array_header_t *paths,
1440  svn_revnum_t start,
1441  svn_revnum_t end,
1442  int limit,
1443  svn_boolean_t discover_changed_paths,
1444  svn_boolean_t strict_node_history,
1445  svn_repos_authz_func_t authz_read_func,
1446  void *authz_read_baton,
1447  svn_log_message_receiver_t receiver,
1448  void *receiver_baton,
1449  apr_pool_t *pool);
1450 
1451 
1452 /**
1453  * Same as svn_repos_get_logs3(), but with @a limit always set to 0.
1454  *
1455  * @deprecated Provided for backward compatibility with the 1.1 API.
1456  */
1458 svn_error_t *
1460  const apr_array_header_t *paths,
1461  svn_revnum_t start,
1462  svn_revnum_t end,
1463  svn_boolean_t discover_changed_paths,
1464  svn_boolean_t strict_node_history,
1465  svn_repos_authz_func_t authz_read_func,
1466  void *authz_read_baton,
1467  svn_log_message_receiver_t receiver,
1468  void *receiver_baton,
1469  apr_pool_t *pool);
1470 
1471 /**
1472  * Same as svn_repos_get_logs2(), but with @a authz_read_func and
1473  * @a authz_read_baton always set to NULL.
1474  *
1475  * @deprecated Provided for backward compatibility with the 1.0 API.
1476  */
1478 svn_error_t *
1480  const apr_array_header_t *paths,
1481  svn_revnum_t start,
1482  svn_revnum_t end,
1483  svn_boolean_t discover_changed_paths,
1484  svn_boolean_t strict_node_history,
1485  svn_log_message_receiver_t receiver,
1486  void *receiver_baton,
1487  apr_pool_t *pool);
1488 
1489 
1490 
1491 /* ---------------------------------------------------------------*/
1492 
1493 /* Retrieving mergeinfo. */
1494 
1495 /**
1496  * Fetch the mergeinfo for @a paths at @a revision in @a repos, and
1497  * set @a *catalog to a catalog of this mergeinfo. @a *catalog will
1498  * never be @c NULL but may be empty.
1499  *
1500  * @a inherit indicates whether explicit, explicit or inherited, or
1501  * only inherited mergeinfo for @a paths is fetched.
1502  *
1503  * If @a revision is @c SVN_INVALID_REVNUM, it defaults to youngest.
1504  *
1505  * If @a include_descendants is TRUE, then additionally return the
1506  * mergeinfo for any descendant of any element of @a paths which has
1507  * the @c SVN_PROP_MERGEINFO property explicitly set on it. (Note
1508  * that inheritance is only taken into account for the elements in @a
1509  * paths; descendants of the elements in @a paths which get their
1510  * mergeinfo via inheritance are not included in @a *catalog.)
1511  *
1512  * If optional @a authz_read_func is non-NULL, then use this function
1513  * (along with optional @a authz_read_baton) to check the readability
1514  * of each path which mergeinfo was requested for (from @a paths).
1515  * Silently omit unreadable paths from the request for mergeinfo.
1516  *
1517  * Use @a pool for all allocations.
1518  *
1519  * @since New in 1.5.
1520  */
1521 svn_error_t *
1522 svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *catalog,
1523  svn_repos_t *repos,
1524  const apr_array_header_t *paths,
1525  svn_revnum_t revision,
1527  svn_boolean_t include_descendants,
1528  svn_repos_authz_func_t authz_read_func,
1529  void *authz_read_baton,
1530  apr_pool_t *pool);
1531 
1532 
1533 /* ---------------------------------------------------------------*/
1534 
1535 /* Retrieving multiple revisions of a file. */
1536 
1537 /**
1538  * Retrieve a subset of the interesting revisions of a file @a path in
1539  * @a repos as seen in revision @a end. Invoke @a handler with
1540  * @a handler_baton as its first argument for each such revision.
1541  * @a pool is used for all allocations. See svn_fs_history_prev() for
1542  * a discussion of interesting revisions.
1543  *
1544  * If optional @a authz_read_func is non-NULL, then use this function
1545  * (along with optional @a authz_read_baton) to check the readability
1546  * of the rev-path in each interesting revision encountered.
1547  *
1548  * Revision discovery happens from @a end to @a start, and if an
1549  * unreadable revision is encountered before @a start is reached, then
1550  * revision discovery stops and only the revisions from @a end to the
1551  * oldest readable revision are returned (So it will appear that @a
1552  * path was added without history in the latter revision).
1553  *
1554  * If there is an interesting revision of the file that is less than or
1555  * equal to start, the iteration will start at that revision. Else, the
1556  * iteration will start at the first revision of the file in the repository,
1557  * which has to be less than or equal to end. Note that if the function
1558  * succeeds, @a handler will have been called at least once.
1559  *
1560  * In a series of calls, the file contents for the first interesting revision
1561  * will be provided as a text delta against the empty file. In the following
1562  * calls, the delta will be against the contents for the previous call.
1563  *
1564  * If @a include_merged_revisions is TRUE, revisions which a included as a
1565  * result of a merge between @a start and @a end will be included.
1566  *
1567  * @since New in 1.5.
1568  */
1569 svn_error_t *
1571  const char *path,
1572  svn_revnum_t start,
1573  svn_revnum_t end,
1574  svn_boolean_t include_merged_revisions,
1575  svn_repos_authz_func_t authz_read_func,
1576  void *authz_read_baton,
1577  svn_file_rev_handler_t handler,
1578  void *handler_baton,
1579  apr_pool_t *pool);
1580 
1581 /**
1582  * Similar to svn_repos_get_file_revs2(), with @a include_merged_revisions
1583  * set to FALSE.
1584  *
1585  * @deprecated Provided for backward compatibility with the 1.4 API.
1586  * @since New in 1.1.
1587  */
1589 svn_error_t *
1591  const char *path,
1592  svn_revnum_t start,
1593  svn_revnum_t end,
1594  svn_repos_authz_func_t authz_read_func,
1595  void *authz_read_baton,
1597  void *handler_baton,
1598  apr_pool_t *pool);
1599 
1600 
1601 /* ---------------------------------------------------------------*/
1602 
1603 /**
1604  * @defgroup svn_repos_hook_wrappers Hook-sensitive wrappers for libsvn_fs \
1605  * routines.
1606  * @{
1607  */
1608 
1609 /** Like svn_fs_commit_txn(), but invoke the @a repos' pre- and
1610  * post-commit hooks around the commit. Use @a pool for any necessary
1611  * allocations.
1612  *
1613  * If the pre-commit hook fails, do not attempt to commit the
1614  * transaction and throw the original error to the caller.
1615  *
1616  * A successful commit is indicated by a valid revision value in @a
1617  * *new_rev, not if svn_fs_commit_txn() returns an error, which can
1618  * occur during its post commit FS processing. If the transaction was
1619  * not committed, then return the associated error and do not execute
1620  * the post-commit hook.
1621  *
1622  * If the commit succeeds the post-commit hook is executed. If the
1623  * post-commit hook returns an error, always wrap it with
1624  * SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED; this allows the caller to
1625  * find the post-commit hook error in the returned error chain. If
1626  * both svn_fs_commit_txn() and the post-commit hook return errors,
1627  * then svn_fs_commit_txn()'s error is the parent error and the
1628  * SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error is the child
1629  * error.
1630  *
1631  * @a conflict_p, @a new_rev, and @a txn are as in svn_fs_commit_txn().
1632  */
1633 svn_error_t *
1634 svn_repos_fs_commit_txn(const char **conflict_p,
1635  svn_repos_t *repos,
1636  svn_revnum_t *new_rev,
1637  svn_fs_txn_t *txn,
1638  apr_pool_t *pool);
1639 
1640 /** Like svn_fs_begin_txn(), but use @a revprop_table, a hash mapping
1641  * <tt>const char *</tt> property names to @c svn_string_t values, to
1642  * set the properties on transaction @a *txn_p. @a repos is the
1643  * repository object which contains the filesystem. @a rev, @a
1644  * *txn_p, and @a pool are as in svn_fs_begin_txn().
1645  *
1646  * Before a txn is created, the repository's start-commit hooks are
1647  * run; if any of them fail, no txn is created, @a *txn_p is unaffected,
1648  * and @c SVN_ERR_REPOS_HOOK_FAILURE is returned.
1649  *
1650  * @note @a revprop_table may contain an @c SVN_PROP_REVISION_DATE property,
1651  * which will be set on the transaction, but that will be overwritten
1652  * when the transaction is committed.
1653  *
1654  * @since New in 1.5.
1655  */
1656 svn_error_t *
1658  svn_repos_t *repos,
1659  svn_revnum_t rev,
1660  apr_hash_t *revprop_table,
1661  apr_pool_t *pool);
1662 
1663 
1664 /**
1665  * Same as svn_repos_fs_begin_txn_for_commit2(), but with @a revprop_table
1666  * set to a hash containing @a author and @a log_msg as the
1667  * @c SVN_PROP_REVISION_AUTHOR and @c SVN_PROP_REVISION_LOG properties,
1668  * respectively. @a author and @a log_msg may both be @c NULL.
1669  *
1670  * @deprecated Provided for backward compatibility with the 1.4 API.
1671  */
1673 svn_error_t *
1675  svn_repos_t *repos,
1676  svn_revnum_t rev,
1677  const char *author,
1678  const char *log_msg,
1679  apr_pool_t *pool);
1680 
1681 
1682 /** Like svn_fs_begin_txn(), but use @a author to set the corresponding
1683  * property on transaction @a *txn_p. @a repos is the repository object
1684  * which contains the filesystem. @a rev, @a *txn_p, and @a pool are as in
1685  * svn_fs_begin_txn().
1686  *
1687  * ### Someday: before a txn is created, some kind of read-hook could
1688  * be called here.
1689  */
1690 svn_error_t *
1692  svn_repos_t *repos,
1693  svn_revnum_t rev,
1694  const char *author,
1695  apr_pool_t *pool);
1696 
1697 
1698 /** @defgroup svn_repos_fs_locks Repository lock wrappers
1699  * @{
1700  * @since New in 1.2. */
1701 
1702 /** Like svn_fs_lock(), but invoke the @a repos's pre- and
1703  * post-lock hooks before and after the locking action. Use @a pool
1704  * for any necessary allocations.
1705  *
1706  * If the pre-lock hook or svn_fs_lock() fails, throw the original
1707  * error to caller. If an error occurs when running the post-lock
1708  * hook, return the original error wrapped with
1709  * SVN_ERR_REPOS_POST_LOCK_HOOK_FAILED. If the caller sees this
1710  * error, it knows that the lock succeeded anyway.
1711  *
1712  * The pre-lock hook may cause a different token to be used for the
1713  * lock, instead of @a token; see the pre-lock-hook documentation for
1714  * more.
1715  */
1716 svn_error_t *
1718  svn_repos_t *repos,
1719  const char *path,
1720  const char *token,
1721  const char *comment,
1722  svn_boolean_t is_dav_comment,
1723  apr_time_t expiration_date,
1724  svn_revnum_t current_rev,
1725  svn_boolean_t steal_lock,
1726  apr_pool_t *pool);
1727 
1728 
1729 /** Like svn_fs_unlock(), but invoke the @a repos's pre- and
1730  * post-unlock hooks before and after the unlocking action. Use @a
1731  * pool for any necessary allocations.
1732  *
1733  * If the pre-unlock hook or svn_fs_unlock() fails, throw the original
1734  * error to caller. If an error occurs when running the post-unlock
1735  * hook, return the original error wrapped with
1736  * SVN_ERR_REPOS_POST_UNLOCK_HOOK_FAILED. If the caller sees this
1737  * error, it knows that the unlock succeeded anyway.
1738  */
1739 svn_error_t *
1741  const char *path,
1742  const char *token,
1743  svn_boolean_t break_lock,
1744  apr_pool_t *pool);
1745 
1746 
1747 
1748 /** Look up all the locks in and under @a path in @a repos, setting @a
1749  * *locks to a hash which maps <tt>const char *</tt> paths to the @c
1750  * svn_lock_t locks associated with those paths. Use @a
1751  * authz_read_func and @a authz_read_baton to "screen" all returned
1752  * locks. That is: do not return any locks on any paths that are
1753  * unreadable in HEAD, just silently omit them.
1754  */
1755 svn_error_t *
1756 svn_repos_fs_get_locks(apr_hash_t **locks,
1757  svn_repos_t *repos,
1758  const char *path,
1759  svn_repos_authz_func_t authz_read_func,
1760  void *authz_read_baton,
1761  apr_pool_t *pool);
1762 
1763 /** @} */
1764 
1765 /**
1766  * Like svn_fs_change_rev_prop(), but validate the name and value of the
1767  * property and invoke the @a repos's pre- and post-revprop-change hooks
1768  * around the change as specified by @a use_pre_revprop_change_hook and
1769  * @a use_post_revprop_change_hook (respectively).
1770  *
1771  * @a rev is the revision whose property to change, @a name is the
1772  * name of the property, and @a new_value is the new value of the
1773  * property. @a author is the authenticated username of the person
1774  * changing the property value, or NULL if not available.
1775  *
1776  * If @a authz_read_func is non-NULL, then use it (with @a
1777  * authz_read_baton) to validate the changed-paths associated with @a
1778  * rev. If the revision contains any unreadable changed paths, then
1779  * return SVN_ERR_AUTHZ_UNREADABLE.
1780  *
1781  * Validate @a name and @a new_value like the same way
1782  * svn_repos_fs_change_node_prop() does.
1783  *
1784  * Use @a pool for temporary allocations.
1785  *
1786  * @since New in 1.5.
1787  */
1788 svn_error_t *
1790  svn_revnum_t rev,
1791  const char *author,
1792  const char *name,
1793  const svn_string_t *new_value,
1795  use_pre_revprop_change_hook,
1797  use_post_revprop_change_hook,
1799  authz_read_func,
1800  void *authz_read_baton,
1801  apr_pool_t *pool);
1802 
1803 /**
1804  * Similar to svn_repos_fs_change_rev_prop3(), but with the @a
1805  * use_pre_revprop_change_hook and @a use_post_revprop_change_hook
1806  * always set to @c TRUE.
1807  *
1808  * @deprecated Provided for backward compatibility with the 1.4 API.
1809  */
1811 svn_error_t *
1813  svn_revnum_t rev,
1814  const char *author,
1815  const char *name,
1816  const svn_string_t *new_value,
1818  authz_read_func,
1819  void *authz_read_baton,
1820  apr_pool_t *pool);
1821 
1822 /**
1823  * Similar to svn_repos_fs_change_rev_prop2(), but with the
1824  * @a authz_read_func parameter always NULL.
1825  *
1826  * @deprecated Provided for backward compatibility with the 1.0 API.
1827  */
1829 svn_error_t *
1831  svn_revnum_t rev,
1832  const char *author,
1833  const char *name,
1834  const svn_string_t *new_value,
1835  apr_pool_t *pool);
1836 
1837 
1838 
1839 /**
1840  * Set @a *value_p to the value of the property named @a propname on
1841  * revision @a rev in the filesystem opened in @a repos. If @a rev
1842  * has no property by that name, set @a *value_p to zero. Allocate
1843  * the result in @a pool.
1844  *
1845  * If @a authz_read_func is non-NULL, then use it (with @a
1846  * authz_read_baton) to validate the changed-paths associated with @a
1847  * rev. If the changed-paths are all unreadable, then set @a *value_p
1848  * to zero unconditionally. If only some of the changed-paths are
1849  * unreadable, then allow 'svn:author' and 'svn:date' propvalues to be
1850  * fetched, but return 0 for any other property.
1851  *
1852  * @since New in 1.1.
1853  */
1854 svn_error_t *
1856  svn_repos_t *repos,
1857  svn_revnum_t rev,
1858  const char *propname,
1860  authz_read_func,
1861  void *authz_read_baton,
1862  apr_pool_t *pool);
1863 
1864 
1865 /**
1866  * Set @a *table_p to the entire property list of revision @a rev in
1867  * filesystem opened in @a repos, as a hash table allocated in @a
1868  * pool. The table maps <tt>char *</tt> property names to @c
1869  * svn_string_t * values; the names and values are allocated in @a
1870  * pool.
1871  *
1872  * If @a authz_read_func is non-NULL, then use it (with @a
1873  * authz_read_baton) to validate the changed-paths associated with @a
1874  * rev. If the changed-paths are all unreadable, then return an empty
1875  * hash. If only some of the changed-paths are unreadable, then return
1876  * an empty hash, except for 'svn:author' and 'svn:date' properties
1877  * (assuming those properties exist).
1878  *
1879  * @since New in 1.1.
1880  */
1881 svn_error_t *
1882 svn_repos_fs_revision_proplist(apr_hash_t **table_p,
1883  svn_repos_t *repos,
1884  svn_revnum_t rev,
1886  authz_read_func,
1887  void *authz_read_baton,
1888  apr_pool_t *pool);
1889 
1890 
1891 
1892 /* ---------------------------------------------------------------*/
1893 
1894 /* Prop-changing wrappers for libsvn_fs routines. */
1895 
1896 /* NOTE: svn_repos_fs_change_rev_prop() also exists, but is located
1897  above with the hook-related functions. */
1898 
1899 
1900 /** Validating wrapper for svn_fs_change_node_prop() (which see for
1901  * argument descriptions).
1902  *
1903  * If @a name's kind is not @c svn_prop_regular_kind, return @c
1904  * SVN_ERR_REPOS_BAD_ARGS. If @a name is an "svn:" property, validate its
1905  * @a value and return SVN_ERR_BAD_PROPERTY_VALUE if it is invalid for the
1906  * property.
1907  *
1908  * @note Currently, the only properties validated are the "svn:" properties
1909  * @c SVN_PROP_REVISION_LOG and @c SVN_PROP_REVISION_DATE. This may change
1910  * in future releases.
1911  */
1912 svn_error_t *
1914  const char *path,
1915  const char *name,
1916  const svn_string_t *value,
1917  apr_pool_t *pool);
1918 
1919 /** Validating wrapper for svn_fs_change_txn_prop() (which see for
1920  * argument descriptions). See svn_repos_fs_change_txn_props() for more
1921  * information.
1922  */
1923 svn_error_t *
1925  const char *name,
1926  const svn_string_t *value,
1927  apr_pool_t *pool);
1928 
1929 /** Validating wrapper for svn_fs_change_txn_props() (which see for
1930  * argument descriptions). Validate properties and their values the
1931  * same way svn_repos_fs_change_node_prop() does.
1932  *
1933  * @since New in 1.5.
1934  */
1935 svn_error_t *
1937  apr_array_header_t *props,
1938  apr_pool_t *pool);
1939 
1940 /** @} */
1941 
1942 /* ---------------------------------------------------------------*/
1943 
1944 /**
1945  * @defgroup svn_repos_inspection Data structures and editor things for
1946  * repository inspection.
1947  * @{
1948  *
1949  * As it turns out, the svn_repos_dir_delta2() interface can be
1950  * extremely useful for examining the repository, or more exactly,
1951  * changes to the repository. svn_repos_dir_delta2() allows for
1952  * differences between two trees to be described using an editor.
1953  *
1954  * By using the editor obtained from svn_repos_node_editor() with
1955  * svn_repos_dir_delta2(), the description of how to transform one tree
1956  * into another can be used to build an in-memory linked-list tree,
1957  * which each node representing a repository node that was changed as a
1958  * result of having svn_repos_dir_delta2() drive that editor.
1959  */
1960 
1961 /** A node in the repository. */
1962 typedef struct svn_repos_node_t
1963 {
1964  /** Node type (file, dir, etc.) */
1966 
1967  /** How this node entered the node tree: 'A'dd, 'D'elete, 'R'eplace */
1968  char action;
1969 
1970  /** Were there any textual mods? (files only) */
1972 
1973  /** Where there any property mods? */
1975 
1976  /** The name of this node as it appears in its parent's entries list */
1977  const char *name;
1978 
1979  /** The filesystem revision where this was copied from (if any) */
1981 
1982  /** The filesystem path where this was copied from (if any) */
1983  const char *copyfrom_path;
1984 
1985  /** Pointer to the next sibling of this node */
1987 
1988  /** Pointer to the first child of this node */
1990 
1991  /** Pointer to the parent of this node */
1993 
1995 
1996 
1997 /** Set @a *editor and @a *edit_baton to an editor that, when driven by
1998  * svn_repos_dir_delta2(), builds an <tt>svn_repos_node_t *</tt> tree
1999  * representing the delta from @a base_root to @a root in @a repos's
2000  * filesystem.
2001  *
2002  * Invoke svn_repos_node_from_baton() on @a edit_baton to obtain the root
2003  * node afterwards.
2004  *
2005  * Note that the delta includes "bubbled-up" directories; that is,
2006  * many of the directory nodes will have no prop_mods.
2007  *
2008  * Allocate the tree and its contents in @a node_pool; do all other
2009  * allocation in @a pool.
2010  */
2011 svn_error_t *
2013  void **edit_baton,
2014  svn_repos_t *repos,
2015  svn_fs_root_t *base_root,
2016  svn_fs_root_t *root,
2017  apr_pool_t *node_pool,
2018  apr_pool_t *pool);
2019 
2020 /** Return the root node of the linked-list tree generated by driving
2021  * the editor created by svn_repos_node_editor() with
2022  * svn_repos_dir_delta2(), which is stored in @a edit_baton. This is
2023  * only really useful if used *after* the editor drive is completed.
2024  */
2026 svn_repos_node_from_baton(void *edit_baton);
2027 
2028 /** @} */
2029 
2030 /* ---------------------------------------------------------------*/
2031 
2032 /**
2033  * @defgroup svn_repos_dump_load Dumping and loading filesystem data
2034  * @{
2035  *
2036  * The filesystem 'dump' format contains nothing but the abstract
2037  * structure of the filesystem -- independent of any internal node-id
2038  * schema or database back-end. All of the data in the dumpfile is
2039  * acquired by public function calls into svn_fs.h. Similarly, the
2040  * parser which reads the dumpfile is able to reconstruct the
2041  * filesystem using only public svn_fs.h routines.
2042  *
2043  * Thus the dump/load feature's main purpose is for *migrating* data
2044  * from one svn filesystem to another -- presumably two filesystems
2045  * which have different internal implementations.
2046  *
2047  * If you simply want to backup your filesystem, you're probably
2048  * better off using the built-in facilities of the DB backend (using
2049  * Berkeley DB's hot-backup feature, for example.)
2050  *
2051  * For a description of the dumpfile format, see
2052  * /trunk/notes/fs_dumprestore.txt.
2053  */
2054 
2055 /* The RFC822-style headers in our dumpfile format. */
2056 #define SVN_REPOS_DUMPFILE_MAGIC_HEADER "SVN-fs-dump-format-version"
2057 #define SVN_REPOS_DUMPFILE_FORMAT_VERSION 3
2058 #define SVN_REPOS_DUMPFILE_UUID "UUID"
2059 #define SVN_REPOS_DUMPFILE_CONTENT_LENGTH "Content-length"
2060 
2061 #define SVN_REPOS_DUMPFILE_REVISION_NUMBER "Revision-number"
2062 
2063 #define SVN_REPOS_DUMPFILE_NODE_PATH "Node-path"
2064 #define SVN_REPOS_DUMPFILE_NODE_KIND "Node-kind"
2065 #define SVN_REPOS_DUMPFILE_NODE_ACTION "Node-action"
2066 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH "Node-copyfrom-path"
2067 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV "Node-copyfrom-rev"
2068 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5 "Text-copy-source-md5"
2069 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1 "Text-copy-source-sha1"
2070 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM \
2071  SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
2072 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5 "Text-content-md5"
2073 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1 "Text-content-sha1"
2074 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM \
2075  SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
2076 
2077 #define SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH "Prop-content-length"
2078 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH "Text-content-length"
2079 
2080 /** @since New in 1.1. */
2081 #define SVN_REPOS_DUMPFILE_PROP_DELTA "Prop-delta"
2082 /** @since New in 1.1. */
2083 #define SVN_REPOS_DUMPFILE_TEXT_DELTA "Text-delta"
2084 /** @since New in 1.5. */
2085 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5 "Text-delta-base-md5"
2086 /** @since New in 1.6. */
2087 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1 "Text-delta-base-sha1"
2088 /** @since New in 1.6. */
2089 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM \
2090  SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
2091 
2092 /** The different "actions" attached to nodes in the dumpfile. */
2094 {
2095  svn_node_action_change,
2096  svn_node_action_add,
2097  svn_node_action_delete,
2098  svn_node_action_replace
2099 };
2100 
2101 /** The different policies for processing the UUID in the dumpfile. */
2103 {
2104  svn_repos_load_uuid_default,
2105  svn_repos_load_uuid_ignore,
2106  svn_repos_load_uuid_force
2107 };
2108 
2109 
2110 /**
2111  * Verify the contents of the file system in @a repos.
2112  *
2113  * If @a feedback_stream is not @c NULL, write feedback to it (lines of
2114  * the form "* Verified revision %ld\n").
2115  *
2116  * If @a start_rev is @c SVN_INVALID_REVNUM, then start verifying at
2117  * revision 0. If @a end_rev is @c SVN_INVALID_REVNUM, then verify
2118  * through the @c HEAD revision.
2119  *
2120  * If @a cancel_func is not @c NULL, call it periodically with @a
2121  * cancel_baton as argument to see if the caller wishes to cancel the
2122  * verification.
2123  *
2124  * @since New in 1.5.
2125  */
2126 svn_error_t *
2128  svn_stream_t *feedback_stream,
2129  svn_revnum_t start_rev,
2130  svn_revnum_t end_rev,
2131  svn_cancel_func_t cancel_func,
2132  void *cancel_baton,
2133  apr_pool_t *pool);
2134 
2135 
2136 /**
2137  * Dump the contents of the filesystem within already-open @a repos into
2138  * writable @a dumpstream. Begin at revision @a start_rev, and dump every
2139  * revision up through @a end_rev. Use @a pool for all allocation. If
2140  * non-@c NULL, send feedback to @a feedback_stream. If @a dumpstream is
2141  * @c NULL, this is effectively a primitive verify. It is not complete,
2142  * however; see svn_fs_verify instead.
2143  *
2144  * If @a start_rev is @c SVN_INVALID_REVNUM, then start dumping at revision
2145  * 0. If @a end_rev is @c SVN_INVALID_REVNUM, then dump through the @c HEAD
2146  * revision.
2147  *
2148  * If @a incremental is @c TRUE, the first revision dumped will be a diff
2149  * against the previous revision (usually it looks like a full dump of
2150  * the tree).
2151  *
2152  * If @a use_deltas is @c TRUE, output only node properties which have
2153  * changed relative to the previous contents, and output text contents
2154  * as svndiff data against the previous contents. Regardless of how
2155  * this flag is set, the first revision of a non-incremental dump will
2156  * be done with full plain text. A dump with @a use_deltas set cannot
2157  * be loaded by Subversion 1.0.x.
2158  *
2159  * If @a cancel_func is not @c NULL, it is called periodically with
2160  * @a cancel_baton as argument to see if the client wishes to cancel
2161  * the dump.
2162  *
2163  * @since New in 1.1.
2164  */
2165 svn_error_t *
2167  svn_stream_t *dumpstream,
2168  svn_stream_t *feedback_stream,
2169  svn_revnum_t start_rev,
2170  svn_revnum_t end_rev,
2171  svn_boolean_t incremental,
2172  svn_boolean_t use_deltas,
2173  svn_cancel_func_t cancel_func,
2174  void *cancel_baton,
2175  apr_pool_t *pool);
2176 
2177 
2178 /**
2179  * Similar to svn_repos_dump_fs2(), but with the @a use_deltas
2180  * parameter always set to @c FALSE.
2181  *
2182  * @deprecated Provided for backward compatibility with the 1.0 API.
2183  */
2185 svn_error_t *
2187  svn_stream_t *dumpstream,
2188  svn_stream_t *feedback_stream,
2189  svn_revnum_t start_rev,
2190  svn_revnum_t end_rev,
2191  svn_boolean_t incremental,
2192  svn_cancel_func_t cancel_func,
2193  void *cancel_baton,
2194  apr_pool_t *pool);
2195 
2196 
2197 /**
2198  * Read and parse dumpfile-formatted @a dumpstream, reconstructing
2199  * filesystem revisions in already-open @a repos, handling uuids
2200  * in accordance with @a uuid_action.
2201  *
2202  * Read and parse dumpfile-formatted @a dumpstream, reconstructing
2203  * filesystem revisions in already-open @a repos. Use @a pool for all
2204  * allocation. If non-@c NULL, send feedback to @a feedback_stream.
2205  *
2206  * If the dumpstream contains copy history that is unavailable in the
2207  * repository, an error will be thrown.
2208  *
2209  * The repository's UUID will be updated iff
2210  * the dumpstream contains a UUID and
2211  * @a uuid_action is not equal to @c svn_repos_load_uuid_ignore and
2212  * either the repository contains no revisions or
2213  * @a uuid_action is equal to @c svn_repos_load_uuid_force.
2214  *
2215  * If the dumpstream contains no UUID, then @a uuid_action is
2216  * ignored and the repository UUID is not touched.
2217  *
2218  * If @a parent_dir is not NULL, then the parser will reparent all the
2219  * loaded nodes, from root to @a parent_dir. The directory @a parent_dir
2220  * must be an existing directory in the repository.
2221  *
2222  * If @a use_pre_commit_hook is set, call the repository's pre-commit
2223  * hook before committing each loaded revision.
2224  *
2225  * If @a use_post_commit_hook is set, call the repository's
2226  * post-commit hook after committing each loaded revision.
2227  *
2228  * If @a cancel_func is not @c NULL, it is called periodically with
2229  * @a cancel_baton as argument to see if the client wishes to cancel
2230  * the load.
2231  *
2232  * @since New in 1.2.
2233  */
2234 svn_error_t *
2236  svn_stream_t *dumpstream,
2237  svn_stream_t *feedback_stream,
2238  enum svn_repos_load_uuid uuid_action,
2239  const char *parent_dir,
2240  svn_boolean_t use_pre_commit_hook,
2241  svn_boolean_t use_post_commit_hook,
2242  svn_cancel_func_t cancel_func,
2243  void *cancel_baton,
2244  apr_pool_t *pool);
2245 
2246 /**
2247  * Similar to svn_repos_load_fs2(), but with @a use_pre_commit_hook and
2248  * @a use_post_commit_hook always @c FALSE.
2249  *
2250  * @deprecated Provided for backward compatibility with the 1.0 API.
2251  */
2253 svn_error_t *
2255  svn_stream_t *dumpstream,
2256  svn_stream_t *feedback_stream,
2257  enum svn_repos_load_uuid uuid_action,
2258  const char *parent_dir,
2259  svn_cancel_func_t cancel_func,
2260  void *cancel_baton,
2261  apr_pool_t *pool);
2262 
2263 
2264 /**
2265  * A vtable that is driven by svn_repos_parse_dumpstream2().
2266  *
2267  * @since New in 1.1.
2268  */
2270 {
2271  /** The parser has discovered a new revision record within the
2272  * parsing session represented by @a parse_baton. All the headers are
2273  * placed in @a headers (allocated in @a pool), which maps <tt>const
2274  * char *</tt> header-name ==> <tt>const char *</tt> header-value.
2275  * The @a revision_baton received back (also allocated in @a pool)
2276  * represents the revision.
2277  */
2278  svn_error_t *(*new_revision_record)(void **revision_baton,
2279  apr_hash_t *headers,
2280  void *parse_baton,
2281  apr_pool_t *pool);
2282 
2283  /** The parser has discovered a new uuid record within the parsing
2284  * session represented by @a parse_baton. The uuid's value is
2285  * @a uuid, and it is allocated in @a pool.
2286  */
2287  svn_error_t *(*uuid_record)(const char *uuid,
2288  void *parse_baton,
2289  apr_pool_t *pool);
2290 
2291  /** The parser has discovered a new node record within the current
2292  * revision represented by @a revision_baton. All the headers are
2293  * placed in @a headers (as with @c new_revision_record), allocated in
2294  * @a pool. The @a node_baton received back is allocated in @a pool
2295  * and represents the node.
2296  */
2297  svn_error_t *(*new_node_record)(void **node_baton,
2298  apr_hash_t *headers,
2299  void *revision_baton,
2300  apr_pool_t *pool);
2301 
2302  /** For a given @a revision_baton, set a property @a name to @a value. */
2303  svn_error_t *(*set_revision_property)(void *revision_baton,
2304  const char *name,
2305  const svn_string_t *value);
2306 
2307  /** For a given @a node_baton, set a property @a name to @a value. */
2308  svn_error_t *(*set_node_property)(void *node_baton,
2309  const char *name,
2310  const svn_string_t *value);
2311 
2312  /** For a given @a node_baton, delete property @a name. */
2313  svn_error_t *(*delete_node_property)(void *node_baton, const char *name);
2314 
2315  /** For a given @a node_baton, remove all properties. */
2316  svn_error_t *(*remove_node_props)(void *node_baton);
2317 
2318  /** For a given @a node_baton, receive a writable @a stream capable of
2319  * receiving the node's fulltext. After writing the fulltext, call
2320  * the stream's close() function.
2321  *
2322  * If a @c NULL is returned instead of a stream, the vtable is
2323  * indicating that no text is desired, and the parser will not
2324  * attempt to send it.
2325  */
2326  svn_error_t *(*set_fulltext)(svn_stream_t **stream,
2327  void *node_baton);
2328 
2329  /** For a given @a node_baton, set @a handler and @a handler_baton
2330  * to a window handler and baton capable of receiving a delta
2331  * against the node's previous contents. A NULL window will be
2332  * sent to the handler after all the windows are sent.
2333  *
2334  * If a @c NULL is returned instead of a handler, the vtable is
2335  * indicating that no delta is desired, and the parser will not
2336  * attempt to send it.
2337  */
2338  svn_error_t *(*apply_textdelta)(svn_txdelta_window_handler_t *handler,
2339  void **handler_baton,
2340  void *node_baton);
2341 
2342  /** The parser has reached the end of the current node represented by
2343  * @a node_baton, it can be freed.
2344  */
2345  svn_error_t *(*close_node)(void *node_baton);
2346 
2347  /** The parser has reached the end of the current revision
2348  * represented by @a revision_baton. In other words, there are no more
2349  * changed nodes within the revision. The baton can be freed.
2350  */
2351  svn_error_t *(*close_revision)(void *revision_baton);
2352 
2354 
2355 /** @deprecated Provided for backward compatibility with the 1.2 API. */
2357 
2358 
2359 /**
2360  * Read and parse dumpfile-formatted @a stream, calling callbacks in
2361  * @a parse_fns/@a parse_baton, and using @a pool for allocations.
2362  *
2363  * If @a cancel_func is not @c NULL, it is called periodically with
2364  * @a cancel_baton as argument to see if the client wishes to cancel
2365  * the dump.
2366  *
2367  * This parser has built-in knowledge of the dumpfile format, but only
2368  * in a general sense:
2369  *
2370  * * it recognizes revision and node records by looking for either
2371  * a REVISION_NUMBER or NODE_PATH headers.
2372  *
2373  * * it recognizes the CONTENT-LENGTH headers, so it knows if and
2374  * how to suck up the content body.
2375  *
2376  * * it knows how to parse a content body into two parts: props
2377  * and text, and pass the pieces to the vtable.
2378  *
2379  * This is enough knowledge to make it easy on vtable implementors,
2380  * but still allow expansion of the format: most headers are ignored.
2381  *
2382  * @since New in 1.1.
2383  */
2384 svn_error_t *
2386  const svn_repos_parse_fns2_t *parse_fns,
2387  void *parse_baton,
2388  svn_cancel_func_t cancel_func,
2389  void *cancel_baton,
2390  apr_pool_t *pool);
2391 
2392 
2393 /**
2394  * Set @a *parser and @a *parse_baton to a vtable parser which commits new
2395  * revisions to the fs in @a repos. The constructed parser will treat
2396  * UUID records in a manner consistent with @a uuid_action. Use @a pool
2397  * to operate on the fs.
2398  *
2399  * If @a use_history is set, then the parser will require relative
2400  * 'copyfrom' history to exist in the repository when it encounters
2401  * nodes that are added-with-history.
2402  *
2403  * If @a parent_dir is not NULL, then the parser will reparent all the
2404  * loaded nodes, from root to @a parent_dir. The directory @a parent_dir
2405  * must be an existing directory in the repository.
2406  *
2407  * Print all parsing feedback to @a outstream (if non-@c NULL).
2408  *
2409  *
2410  * @since New in 1.1.
2411  */
2412 svn_error_t *
2414  void **parse_baton,
2415  svn_repos_t *repos,
2416  svn_boolean_t use_history,
2417  enum svn_repos_load_uuid uuid_action,
2418  svn_stream_t *outstream,
2419  const char *parent_dir,
2420  apr_pool_t *pool);
2421 
2422 
2423 /**
2424  * A vtable that is driven by svn_repos_parse_dumpstream().
2425  * Similar to @c svn_repos_parse_fns2_t except that it lacks
2426  * the delete_node_property and apply_textdelta callbacks.
2427  *
2428  * @deprecated Provided for backward compatibility with the 1.0 API.
2429  */
2431 {
2432  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2433  svn_error_t *(*new_revision_record)(void **revision_baton,
2434  apr_hash_t *headers,
2435  void *parse_baton,
2436  apr_pool_t *pool);
2437  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2438  svn_error_t *(*uuid_record)(const char *uuid,
2439  void *parse_baton,
2440  apr_pool_t *pool);
2441  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2442  svn_error_t *(*new_node_record)(void **node_baton,
2443  apr_hash_t *headers,
2444  void *revision_baton,
2445  apr_pool_t *pool);
2446  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2447  svn_error_t *(*set_revision_property)(void *revision_baton,
2448  const char *name,
2449  const svn_string_t *value);
2450  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2451  svn_error_t *(*set_node_property)(void *node_baton,
2452  const char *name,
2453  const svn_string_t *value);
2454  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2455  svn_error_t *(*remove_node_props)(void *node_baton);
2456  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2457  svn_error_t *(*set_fulltext)(svn_stream_t **stream,
2458  void *node_baton);
2459  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2460  svn_error_t *(*close_node)(void *node_baton);
2461  /** Same as the corresponding field in @c svn_repos_parse_fns2_t. */
2462  svn_error_t *(*close_revision)(void *revision_baton);
2464 
2465 
2466 /**
2467  * Similar to svn_repos_parse_dumpstream2(), but uses the more limited
2468  * @c svn_repos_parser_fns_t vtable type.
2469  *
2470  * @deprecated Provided for backward compatibility with the 1.0 API.
2471  */
2473 svn_error_t *
2475  const svn_repos_parser_fns_t *parse_fns,
2476  void *parse_baton,
2477  svn_cancel_func_t cancel_func,
2478  void *cancel_baton,
2479  apr_pool_t *pool);
2480 
2481 
2482 /**
2483  * Similar to svn_repos_get_fs_build_parser2(), but yields the more
2484  * limited svn_repos_parser_fns_t vtable type.
2485  *
2486  * @deprecated Provided for backward compatibility with the 1.0 API.
2487  */
2489 svn_error_t *
2491  void **parse_baton,
2492  svn_repos_t *repos,
2493  svn_boolean_t use_history,
2494  enum svn_repos_load_uuid uuid_action,
2495  svn_stream_t *outstream,
2496  const char *parent_dir,
2497  apr_pool_t *pool);
2498 
2499 
2500 /** @} */
2501 
2502 /** A data type which stores the authz information.
2503  *
2504  * @since New in 1.3.
2505  */
2506 typedef struct svn_authz_t svn_authz_t;
2507 
2508 /** Read authz configuration data from @a file (a file or registry
2509  * path) into @a *authz_p, allocated in @a pool.
2510  *
2511  * If @a file is not a valid authz rule file, then return
2512  * SVN_AUTHZ_INVALID_CONFIG. The contents of @a *authz_p is then
2513  * undefined. If @a must_exist is TRUE, a missing authz file is also
2514  * an error.
2515  *
2516  * @since New in 1.3.
2517  */
2518 svn_error_t *
2520  const char *file,
2521  svn_boolean_t must_exist,
2522  apr_pool_t *pool);
2523 
2524 /**
2525  * Check whether @a user can access @a path in the repository @a
2526  * repos_name with the @a required_access. @a authz lists the ACLs to
2527  * check against. Set @a *access_granted to indicate if the requested
2528  * access is granted.
2529  *
2530  * If @a path is NULL, then check whether @a user has the @a
2531  * required_access anywhere in the repository. Set @a *access_granted
2532  * to TRUE if at least one path is accessible with the @a
2533  * required_access.
2534  *
2535  * @since New in 1.3.
2536  */
2537 svn_error_t *
2539  const char *repos_name,
2540  const char *path,
2541  const char *user,
2542  svn_repos_authz_access_t required_access,
2543  svn_boolean_t *access_granted,
2544  apr_pool_t *pool);
2545 
2546 
2547 
2548 /** Revision Access Levels
2549  *
2550  * Like most version control systems, access to versioned objects in
2551  * Subversion is determined on primarily path-based system. Users either
2552  * do or don't have the ability to read a given path.
2553  *
2554  * However, unlike many version control systems where versioned objects
2555  * maintain their own distinct version information (revision numbers,
2556  * authors, log messages, change timestamps, etc.), Subversion binds
2557  * multiple paths changed as part of a single commit operation into a
2558  * set, calls the whole thing a revision, and hangs commit metadata
2559  * (author, date, log message, etc.) off of that revision. So, commit
2560  * metadata is shared across all the paths changed as part of a given
2561  * commit operation.
2562  *
2563  * It is common (or, at least, we hope it is) for log messages to give
2564  * detailed information about changes made in the commit to which the log
2565  * message is attached. Such information might include a mention of all
2566  * the files changed, what was changed in them, and so on. But this
2567  * causes a problem when presenting information to readers who aren't
2568  * authorized to read every path in the repository. Simply knowing that
2569  * a given path exists may be a security leak, even if the user can't see
2570  * the contents of the data located at that path.
2571  *
2572  * So Subversion does what it reasonably can to prevent the leak of this
2573  * information, and does so via a staged revision access policy. A
2574  * reader can be said to have one of three levels of access to a given
2575  * revision's metadata, based solely on the reader's access rights to the
2576  * paths changed or copied in that revision:
2577  *
2578  * 'full access' -- Granted when the reader has access to all paths
2579  * changed or copied in the revision, or when no paths were
2580  * changed in the revision at all, this access level permits
2581  * full visibility of all revision property names and values,
2582  * and the full changed-paths information.
2583  *
2584  * 'no access' -- Granted when the reader does not have access to any
2585  * paths changed or copied in the revision, this access level
2586  * denies the reader access to all revision properties and all
2587  * changed-paths information.
2588  *
2589  * 'partial access' -- Granted when the reader has access to at least
2590  * one, but not all, of the paths changed or copied in the revision,
2591  * this access level permits visibility of the svn:date and
2592  * svn:author revision properties and only the paths of the
2593  * changed-paths information to which the reader has access.
2594  *
2595  */
2596 
2597 
2598 /** An enum defining levels of revision access.
2599  *
2600  * @since New in 1.5.
2601  */
2602 typedef enum
2603 {
2604  svn_repos_revision_access_none,
2605  svn_repos_revision_access_partial,
2606  svn_repos_revision_access_full
2607 }
2609 
2610 
2611 /**
2612  * Set @a access to the access level granted for @a revision in @a
2613  * repos, as determined by consulting the @a authz_read_func callback
2614  * function and its associated @a authz_read_baton.
2615  *
2616  * @a authz_read_func may be @c NULL, in which case @a access will be
2617  * set to @c svn_repos_revision_access_full.
2618  *
2619  * @since New in 1.5.
2620  */
2621 svn_error_t *
2623  svn_repos_t *repos,
2624  svn_revnum_t revision,
2625  svn_repos_authz_func_t authz_read_func,
2626  void *authz_read_baton,
2627  apr_pool_t *pool);
2628 
2629 
2630 
2631 /** Capabilities **/
2632 
2633 /**
2634  * Store in @a repos the client-reported capabilities @a capabilities,
2635  * which must be allocated in memory at least as long-lived as @a repos.
2636  *
2637  * The elements of @a capabilities are 'const char *', a subset of
2638  * the constants beginning with @c SVN_RA_CAPABILITY_.
2639  * @a capabilities is not copied, so changing it later will affect
2640  * what is remembered by @a repos.
2641  *
2642  * @note The capabilities are passed along to the start-commit hook;
2643  * see that hook's template for details.
2644  *
2645  * @note As of Subversion 1.5, there are no error conditions defined,
2646  * so this always returns SVN_NO_ERROR. In future releases it may
2647  * return error, however, so callers should check.
2648  *
2649  * @since New in 1.5.
2650  */
2651 svn_error_t *
2653  apr_array_header_t *capabilities);
2654 
2655 
2656 
2657 #ifdef __cplusplus
2658 }
2659 #endif /* __cplusplus */
2660 
2661 #endif /* SVN_REPOS_H */