1 /* copies-table.h : internal interface to ops on `copies' table
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
20 * ====================================================================
23 #ifndef SVN_LIBSVN_FS_COPIES_TABLE_H
24 #define SVN_LIBSVN_FS_COPIES_TABLE_H
32 #endif /* __cplusplus */
35 /* Open a `copies' table in ENV. If CREATE is non-zero, create
36 one if it doesn't exist. Set *COPIES_P to the new table.
37 Return a Berkeley DB error code. */
38 int svn_fs_bdb__open_copies_table(DB **copies_p,
40 svn_boolean_t create);
42 /* Reserve a slot in the `copies' table in FS for a new copy operation
43 as part of TRAIL. Return the slot's id in *COPY_ID_P, allocated in
45 svn_error_t *svn_fs_bdb__reserve_copy_id(const char **copy_id_p,
50 /* Create a new copy with id COPY_ID in FS as part of TRAIL.
51 SRC_PATH/SRC_TXN_ID are the path/transaction ID (respectively) of
52 the copy source, and DST_NODEREV_ID is the node revision id of the
53 copy destination. KIND describes the type of copy operation.
55 SRC_PATH is expected to be a canonicalized filesystem path (see
56 svn_fs__canonicalize_abspath).
58 COPY_ID should generally come from a call to
59 svn_fs_bdb__reserve_copy_id(). */
60 svn_error_t *svn_fs_bdb__create_copy(svn_fs_t *fs,
63 const char *src_txn_id,
64 const svn_fs_id_t *dst_noderev_id,
69 /* Remove the copy whose name is COPY_ID from the `copies' table of
70 FS, as part of TRAIL. If there is no such copy,
71 SVN_ERR_FS_NO_SUCH_COPY is the error returned. */
72 svn_error_t *svn_fs_bdb__delete_copy(svn_fs_t *fs,
77 /* Retrieve the copy *COPY_P named COPY_ID from the `copies' table of
78 FS, as part of TRAIL. Perform all allocations in POOL. If
79 there is no such copy, SVN_ERR_FS_NO_SUCH_COPY is the error
81 svn_error_t *svn_fs_bdb__get_copy(copy_t **copy_p,
91 #endif /* __cplusplus */
93 #endif /* SVN_LIBSVN_FS_COPIES_TABLE_H */