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