1 /* node-rev.h : interface to node revision retrieval and storage 2 * 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 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 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 19 * under the License. 20 * ==================================================================== 21 */ 22 23 #ifndef SVN_LIBSVN_FS_NODE_REV_H 24 #define SVN_LIBSVN_FS_NODE_REV_H 25 26 #define SVN_WANT_BDB 27 #include "svn_private_config.h" 28 29 #include "svn_fs.h" 30 #include "trail.h" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif /* __cplusplus */ 35 36 37 /*** Functions. ***/ 38 39 /* Create an entirely new, mutable node in the filesystem FS, whose 40 NODE-REVISION is NODEREV, as part of TRAIL. Set *ID_P to the new 41 node revision's ID. Use POOL for any temporary allocation. 42 43 COPY_ID is the copy_id to use in the node revision ID returned in 44 *ID_P. 45 46 TXN_ID is the Subversion transaction under which this occurs. 47 48 After this call, the node table manager assumes that the new node's 49 contents will change frequently. */ 50 svn_error_t *svn_fs_base__create_node(const svn_fs_id_t **id_p, 51 svn_fs_t *fs, 52 node_revision_t *noderev, 53 const char *copy_id, 54 const char *txn_id, 55 trail_t *trail, 56 apr_pool_t *pool); 57 58 /* Create a node revision in FS which is an immediate successor of 59 OLD_ID, whose contents are NEW_NR, as part of TRAIL. Set *NEW_ID_P 60 to the new node revision's ID. Use POOL for any temporary 61 allocation. 62 63 COPY_ID, if non-NULL, is a key into the `copies' table, and 64 indicates that this new node is being created as the result of a 65 copy operation, and specifically which operation that was. 66 67 TXN_ID is the Subversion transaction under which this occurs. 68 69 After this call, the deltification code assumes that the new node's 70 contents will change frequently, and will avoid representing other 71 nodes as deltas against this node's contents. */ 72 svn_error_t *svn_fs_base__create_successor(const svn_fs_id_t **new_id_p, 73 svn_fs_t *fs, 74 const svn_fs_id_t *old_id, 75 node_revision_t *new_nr, 76 const char *copy_id, 77 const char *txn_id, 78 trail_t *trail, 79 apr_pool_t *pool); 80 81 82 /* Delete node revision ID from FS's `nodes' table, as part of TRAIL. 83 If ORIGIN_ALSO is set, also delete the record for this ID's node ID 84 from the `node-origins' index table (which is typically only done 85 if the caller thinks that ID points to the only node revision ID in 86 its line of history). 87 88 WARNING: This does not check that the node revision is mutable! 89 Callers should do that check themselves. */ 90 svn_error_t *svn_fs_base__delete_node_revision(svn_fs_t *fs, 91 const svn_fs_id_t *id, 92 svn_boolean_t origin_also, 93 trail_t *trail, 94 apr_pool_t *pool); 95 96 97 #ifdef __cplusplus 98 } 99 #endif /* __cplusplus */ 100 101 #endif /* SVN_LIBSVN_FS_NODE_REV_H */ 102