2 * svn_fs_mergeinfo.h: Declarations for the APIs of libsvn_fs_util to
3 * be consumed by only fs_* libs.
5 * ====================================================================
6 * Copyright (c) 2006-2007 CollabNet. All rights reserved.
8 * This software is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution. The terms
10 * are also available at http://subversion.tigris.org/license-1.html.
11 * If newer versions of this license are posted there, you may use a
12 * newer version instead, at your option.
14 * This software consists of voluntary contributions made by many
15 * individuals. For exact contribution history, see the revision
16 * history and logs, available at http://subversion.tigris.org/.
17 * ====================================================================
20 #ifndef SVN_FS_MERGEINFO_H
21 #define SVN_FS_MERGEINFO_H
25 #endif /* __cplusplus */
27 /* The functions declared here are the API between the two FS
28 libraries and the mergeinfo index. Currently, the index is stored
29 in a sqlite database (which is created using a function in
30 private/svn_fs_sqlite.h); to implement a different backend, just
31 change these three functions.
35 /* Update the mergeinfo index according to the changes made in
36 transaction TXN for revision NEW_REV. MERGEINFO_FOR_PATHS is the
37 mergeinfo for each path changed in the transaction (a mapping of
38 const char * -> svn_string_t *), or NULL if there was no mergeinfo
39 recorded for that transaction. Use POOL for any temporary allocations.
41 NOTE: Even if there is no mergeinfo, this function should be
42 called to make sure there is no stray mergeinfo for this revision
43 left from a previous failed commit. */
45 svn_fs_mergeinfo__update_index(svn_fs_txn_t
*txn
,
47 apr_hash_t
*mergeinfo_for_paths
,
50 /* Get the mergeinfo for the set of PATHS (an array of
51 absolute-in-the-fs paths) under ROOT and return it in *MERGEINFO,
52 mapping char * paths to char * strings with mergeinfo, allocated in
53 POOL. INHERIT indicates whether to get explicit, explicit or inherited,
54 or only inherited mergeinfo for PATHS. If a path has no mergeinfo,
55 just return no info for that path. Return an error if the mergeinfo
56 store does not exist or doesn't use the 'mergeinfo' schema. */
58 svn_fs_mergeinfo__get_mergeinfo(apr_hash_t
**mergeinfo
,
60 const apr_array_header_t
*paths
,
61 svn_mergeinfo_inheritance_t inherit
,
64 /* Get the combined mergeinfo for the tree under each one of PATHS
65 (an array of absolute-in-the-fs paths) under ROOT, and return it
66 in *MERGEINFO, mapping char * paths to mergeinfo hashs. The resulting
67 mergeinfo also includes elided mergeinfo for each one of PATHS. This
68 function conforms to the get_mergeinfo_for_tree() interface. */
70 svn_fs_mergeinfo__get_mergeinfo_for_tree(
71 apr_hash_t
**mergeinfo
,
73 const apr_array_header_t
*paths
,
74 svn_fs_mergeinfo_filter_func_t filter_func
,
75 void *filter_func_baton
,
80 #endif /* __cplusplus */
82 #endif /* SVN_FS_MERGEINFO_H */