Mark many merge tests as skip-against-old-server.
[svn.git] / subversion / libsvn_fs_base / bdb / copies-table.h
blob29ec0672a30e0d62340edf21ce32a7d46b0261aa
1 /* copies-table.h : internal interface to ops on `copies' 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_COPIES_TABLE_H
19 #define SVN_LIBSVN_FS_COPIES_TABLE_H
21 #include "svn_fs.h"
22 #include "../fs.h"
23 #include "../trail.h"
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
30 /* Open a `copies' table in ENV. If CREATE is non-zero, create
31 one if it doesn't exist. Set *COPIES_P to the new table.
32 Return a Berkeley DB error code. */
33 int svn_fs_bdb__open_copies_table(DB **copies_p,
34 DB_ENV *env,
35 svn_boolean_t create);
37 /* Reserve a slot in the `copies' table in FS for a new copy operation
38 as part of TRAIL. Return the slot's id in *COPY_ID_P, allocated in
39 POOL. */
40 svn_error_t *svn_fs_bdb__reserve_copy_id(const char **copy_id_p,
41 svn_fs_t *fs,
42 trail_t *trail,
43 apr_pool_t *pool);
45 /* Create a new copy with id COPY_ID in FS as part of TRAIL.
46 SRC_PATH/SRC_TXN_ID are the path/transaction ID (respectively) of
47 the copy source, and DST_NODEREV_ID is the node revision id of the
48 copy destination. KIND describes the type of copy operation.
50 SRC_PATH is expected to be a canonicalized filesystem path (see
51 svn_fs__canonicalize_abspath).
53 COPY_ID should generally come from a call to
54 svn_fs_bdb__reserve_copy_id(). */
55 svn_error_t *svn_fs_bdb__create_copy(svn_fs_t *fs,
56 const char *copy_id,
57 const char *src_path,
58 const char *src_txn_id,
59 const svn_fs_id_t *dst_noderev_id,
60 copy_kind_t kind,
61 trail_t *trail,
62 apr_pool_t *pool);
64 /* Remove the copy whose name is COPY_ID from the `copies' table of
65 FS, as part of TRAIL. If there is no such copy,
66 SVN_ERR_FS_NO_SUCH_COPY is the error returned. */
67 svn_error_t *svn_fs_bdb__delete_copy(svn_fs_t *fs,
68 const char *copy_id,
69 trail_t *trail,
70 apr_pool_t *pool);
72 /* Retrieve the copy *COPY_P named COPY_ID from the `copies' table of
73 FS, as part of TRAIL. Perform all allocations in POOL. If
74 there is no such copy, SVN_ERR_FS_NO_SUCH_COPY is the error
75 returned. */
76 svn_error_t *svn_fs_bdb__get_copy(copy_t **copy_p,
77 svn_fs_t *fs,
78 const char *copy_id,
79 trail_t *trail,
80 apr_pool_t *pool);
84 #ifdef __cplusplus
86 #endif /* __cplusplus */
88 #endif /* SVN_LIBSVN_FS_COPIES_TABLE_H */