tree.h revision 289180
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 RESULT_POOL, create an instance of a DAG node 1st level cache. */ 35svn_fs_x__dag_cache_t* 36svn_fs_x__create_dag_cache(apr_pool_t *result_pool); 37 38/* Set *ROOT_P to the root directory of revision REV in filesystem FS. 39 Allocate the structure in POOL. */ 40svn_error_t * 41svn_fs_x__revision_root(svn_fs_root_t **root_p, 42 svn_fs_t *fs, 43 svn_revnum_t rev, 44 apr_pool_t *pool); 45 46/* Does nothing, but included for Subversion 1.0.x compatibility. */ 47svn_error_t * 48svn_fs_x__deltify(svn_fs_t *fs, 49 svn_revnum_t rev, 50 apr_pool_t *scratch_pool); 51 52/* Commit the transaction TXN as a new revision. Return the new 53 revision in *NEW_REV. If the transaction conflicts with other 54 changes return SVN_ERR_FS_CONFLICT and set *CONFLICT_P to a string 55 that details the cause of the conflict. */ 56svn_error_t * 57svn_fs_x__commit_txn(const char **conflict_p, 58 svn_revnum_t *new_rev, 59 svn_fs_txn_t *txn, 60 apr_pool_t *pool); 61 62/* Set ROOT_P to the root directory of transaction TXN. Allocate the 63 structure in POOL. */ 64svn_error_t * 65svn_fs_x__txn_root(svn_fs_root_t **root_p, 66 svn_fs_txn_t *txn, 67 apr_pool_t *pool); 68 69 70/* Set KIND_P to the node kind of the node at PATH in ROOT. 71 Use SCRATCH_POOL for temporary allocations. */ 72svn_error_t * 73svn_fs_x__check_path(svn_node_kind_t *kind_p, 74 svn_fs_root_t *root, 75 const char *path, 76 apr_pool_t *scratch_pool); 77 78/* Set *REVISION to the revision in which PATH under ROOT was created. 79 Use SCRATCH_POOL for any temporary allocations. If PATH is in an 80 uncommitted transaction, *REVISION will be set to 81 SVN_INVALID_REVNUM. */ 82svn_error_t * 83svn_fs_x__node_created_rev(svn_revnum_t *revision, 84 svn_fs_root_t *root, 85 const char *path, 86 apr_pool_t *scratch_pool); 87 88/* Verify metadata for ROOT. 89 ### Currently only implemented for revision roots. */ 90svn_error_t * 91svn_fs_x__verify_root(svn_fs_root_t *root, 92 apr_pool_t *scratch_pool); 93 94svn_error_t * 95svn_fs_x__info_format(int *fs_format, 96 svn_version_t **supports_version, 97 svn_fs_t *fs, 98 apr_pool_t *result_pool, 99 apr_pool_t *scratch_pool); 100 101 102svn_error_t * 103svn_fs_x__info_config_files(apr_array_header_t **files, 104 svn_fs_t *fs, 105 apr_pool_t *result_pool, 106 apr_pool_t *scratch_pool); 107 108#ifdef __cplusplus 109} 110#endif /* __cplusplus */ 111 112#endif /* SVN_LIBSVN_FS_TREE_H */ 113