tree.h revision 299742
1/* tree.h : internal interface to tree node functions 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_TREE_H 24#define SVN_LIBSVN_FS_TREE_H 25 26#include "fs.h" 27 28#ifdef __cplusplus 29extern "C" { 30#endif /* __cplusplus */ 31 32 33 34/* In POOL, create an instance of a DAG node 1st level cache. 35 The POOL will be cleared at regular intervals. */ 36fs_fs_dag_cache_t* 37svn_fs_fs__create_dag_cache(apr_pool_t *pool); 38 39/* Set *ROOT_P to the root directory of revision REV in filesystem FS. 40 Allocate the structure in POOL. */ 41svn_error_t *svn_fs_fs__revision_root(svn_fs_root_t **root_p, svn_fs_t *fs, 42 svn_revnum_t rev, apr_pool_t *pool); 43 44/* Does nothing, but included for Subversion 1.0.x compatibility. */ 45svn_error_t *svn_fs_fs__deltify(svn_fs_t *fs, svn_revnum_t rev, 46 apr_pool_t *pool); 47 48/* Commit the transaction TXN as a new revision. Return the new 49 revision in *NEW_REV. If the transaction conflicts with other 50 changes return SVN_ERR_FS_CONFLICT and set *CONFLICT_P to a string 51 that details the cause of the conflict. */ 52svn_error_t *svn_fs_fs__commit_txn(const char **conflict_p, 53 svn_revnum_t *new_rev, svn_fs_txn_t *txn, 54 apr_pool_t *pool); 55 56/* Set ROOT_P to the root directory of transaction TXN. Allocate the 57 structure in POOL. */ 58svn_error_t *svn_fs_fs__txn_root(svn_fs_root_t **root_p, svn_fs_txn_t *txn, 59 apr_pool_t *pool); 60 61 62/* Set KIND_P to the node kind of the node at PATH in ROOT. 63 Allocate the structure in POOL. */ 64svn_error_t * 65svn_fs_fs__check_path(svn_node_kind_t *kind_p, 66 svn_fs_root_t *root, 67 const char *path, 68 apr_pool_t *pool); 69 70/* Implement root_vtable_t.node_id(). */ 71svn_error_t * 72svn_fs_fs__node_id(const svn_fs_id_t **id_p, 73 svn_fs_root_t *root, 74 const char *path, 75 apr_pool_t *pool); 76 77/* Set *REVISION to the revision in which PATH under ROOT was created. 78 Use POOL for any temporary allocations. If PATH is in an 79 uncommitted transaction, *REVISION will be set to 80 SVN_INVALID_REVNUM. */ 81svn_error_t * 82svn_fs_fs__node_created_rev(svn_revnum_t *revision, 83 svn_fs_root_t *root, 84 const char *path, 85 apr_pool_t *pool); 86 87/* Verify metadata for ROOT. 88 ### Currently only implemented for revision roots. */ 89svn_error_t * 90svn_fs_fs__verify_root(svn_fs_root_t *root, 91 apr_pool_t *pool); 92 93svn_error_t * 94svn_fs_fs__info_format(int *fs_format, 95 svn_version_t **supports_version, 96 svn_fs_t *fs, 97 apr_pool_t *result_pool, 98 apr_pool_t *scratch_pool); 99 100 101svn_error_t * 102svn_fs_fs__info_config_files(apr_array_header_t **files, 103 svn_fs_t *fs, 104 apr_pool_t *result_pool, 105 apr_pool_t *scratch_pool); 106 107#ifdef __cplusplus 108} 109#endif /* __cplusplus */ 110 111#endif /* SVN_LIBSVN_FS_TREE_H */ 112