Mark many merge tests as skip-against-old-server.
[svn.git] / subversion / libsvn_fs_base / bdb / changes-table.h
blob57acce3cf53899b5cd0439942d63badb817f6d93
1 /* changes-table.h : internal interface to `changes' table
3 * ====================================================================
4 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
18 #ifndef SVN_LIBSVN_FS_CHANGES_TABLE_H
19 #define SVN_LIBSVN_FS_CHANGES_TABLE_H
21 #define APU_WANT_DB
22 #include <apu_want.h>
24 #include "svn_io.h"
25 #include "svn_fs.h"
26 #include "../fs.h"
27 #include "../trail.h"
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
34 /* Open a `changes' table in ENV. If CREATE is non-zero, create one
35 if it doesn't exist. Set *CHANGES_P to the new table. Return a
36 Berkeley DB error code. */
37 int svn_fs_bdb__open_changes_table(DB **changes_p,
38 DB_ENV *env,
39 svn_boolean_t create);
42 /* Add CHANGE as a record to the `changes' table in FS as part of
43 TRAIL, keyed on KEY.
45 CHANGE->path is expected to be a canonicalized filesystem path (see
46 svn_fs__canonicalize_abspath).
48 Note that because the `changes' table uses duplicate keys, this
49 function will not overwrite prior additions that have the KEY
50 key, but simply adds this new record alongside previous ones. */
51 svn_error_t *svn_fs_bdb__changes_add(svn_fs_t *fs,
52 const char *key,
53 change_t *change,
54 trail_t *trail,
55 apr_pool_t *pool);
58 /* Remove all changes associated with KEY from the `changes' table in
59 FS, as part of TRAIL. */
60 svn_error_t *svn_fs_bdb__changes_delete(svn_fs_t *fs,
61 const char *key,
62 trail_t *trail,
63 apr_pool_t *pool);
65 /* Return a hash *CHANGES_P, keyed on const char * paths, and
66 containing svn_fs_path_change_t * values representing summarized
67 changed records associated with KEY in FS, as part of TRAIL.
68 Allocate the array and its items in POOL. */
69 svn_error_t *svn_fs_bdb__changes_fetch(apr_hash_t **changes_p,
70 svn_fs_t *fs,
71 const char *key,
72 trail_t *trail,
73 apr_pool_t *pool);
75 /* Return an array *CHANGES_P of change_t * items representing
76 all the change records associated with KEY in FS, as part of TRAIL.
77 Allocate the array and its items in POOL. */
78 svn_error_t *svn_fs_bdb__changes_fetch_raw(apr_array_header_t **changes_p,
79 svn_fs_t *fs,
80 const char *key,
81 trail_t *trail,
82 apr_pool_t *pool);
85 #ifdef __cplusplus
87 #endif /* __cplusplus */
89 #endif /* SVN_LIBSVN_FS_CHANGES_TABLE_H */