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
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
,
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
40 svn_error_t
*svn_fs_bdb__reserve_copy_id(const char **copy_id_p
,
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
,
58 const char *src_txn_id
,
59 const svn_fs_id_t
*dst_noderev_id
,
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
,
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
76 svn_error_t
*svn_fs_bdb__get_copy(copy_t
**copy_p
,
86 #endif /* __cplusplus */
88 #endif /* SVN_LIBSVN_FS_COPIES_TABLE_H */