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