1289177Speter/* tree.h : internal interface to tree node functions 2289177Speter * 3289177Speter * ==================================================================== 4289177Speter * Licensed to the Apache Software Foundation (ASF) under one 5289177Speter * or more contributor license agreements. See the NOTICE file 6289177Speter * distributed with this work for additional information 7289177Speter * regarding copyright ownership. The ASF licenses this file 8289177Speter * to you under the Apache License, Version 2.0 (the 9289177Speter * "License"); you may not use this file except in compliance 10289177Speter * with the License. You may obtain a copy of the License at 11289177Speter * 12289177Speter * http://www.apache.org/licenses/LICENSE-2.0 13289177Speter * 14289177Speter * Unless required by applicable law or agreed to in writing, 15289177Speter * software distributed under the License is distributed on an 16289177Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17289177Speter * KIND, either express or implied. See the License for the 18289177Speter * specific language governing permissions and limitations 19289177Speter * under the License. 20289177Speter * ==================================================================== 21289177Speter */ 22289177Speter 23362181Sdim#ifndef SVN_LIBSVN_FS_X_TREE_H 24362181Sdim#define SVN_LIBSVN_FS_X_TREE_H 25289177Speter 26289177Speter#include "fs.h" 27362181Sdim#include "dag.h" 28289177Speter 29289177Speter#ifdef __cplusplus 30289177Speterextern "C" { 31289177Speter#endif /* __cplusplus */ 32289177Speter 33289177Speter 34289177Speter 35362181Sdim/* Return the transaction ID to a given transaction ROOT. */ 36362181Sdimsvn_fs_x__txn_id_t 37362181Sdimsvn_fs_x__root_txn_id(svn_fs_root_t *root); 38289177Speter 39362181Sdim/* Return the change set to a given ROOT. */ 40362181Sdimsvn_fs_x__change_set_t 41362181Sdimsvn_fs_x__root_change_set(svn_fs_root_t *root); 42362181Sdim 43289177Speter/* Set *ROOT_P to the root directory of revision REV in filesystem FS. 44289177Speter Allocate the structure in POOL. */ 45289177Spetersvn_error_t * 46289177Spetersvn_fs_x__revision_root(svn_fs_root_t **root_p, 47289177Speter svn_fs_t *fs, 48289177Speter svn_revnum_t rev, 49289177Speter apr_pool_t *pool); 50289177Speter 51289177Speter/* Does nothing, but included for Subversion 1.0.x compatibility. */ 52289177Spetersvn_error_t * 53289177Spetersvn_fs_x__deltify(svn_fs_t *fs, 54289177Speter svn_revnum_t rev, 55289177Speter apr_pool_t *scratch_pool); 56289177Speter 57289177Speter/* Commit the transaction TXN as a new revision. Return the new 58289177Speter revision in *NEW_REV. If the transaction conflicts with other 59289177Speter changes return SVN_ERR_FS_CONFLICT and set *CONFLICT_P to a string 60289177Speter that details the cause of the conflict. */ 61289177Spetersvn_error_t * 62289177Spetersvn_fs_x__commit_txn(const char **conflict_p, 63289177Speter svn_revnum_t *new_rev, 64289177Speter svn_fs_txn_t *txn, 65289177Speter apr_pool_t *pool); 66289177Speter 67289177Speter/* Set ROOT_P to the root directory of transaction TXN. Allocate the 68289177Speter structure in POOL. */ 69289177Spetersvn_error_t * 70289177Spetersvn_fs_x__txn_root(svn_fs_root_t **root_p, 71289177Speter svn_fs_txn_t *txn, 72289177Speter apr_pool_t *pool); 73289177Speter 74289177Speter 75289177Speter/* Set KIND_P to the node kind of the node at PATH in ROOT. 76289177Speter Use SCRATCH_POOL for temporary allocations. */ 77289177Spetersvn_error_t * 78289177Spetersvn_fs_x__check_path(svn_node_kind_t *kind_p, 79289177Speter svn_fs_root_t *root, 80289177Speter const char *path, 81289177Speter apr_pool_t *scratch_pool); 82289177Speter 83289177Speter/* Set *REVISION to the revision in which PATH under ROOT was created. 84289177Speter Use SCRATCH_POOL for any temporary allocations. If PATH is in an 85289177Speter uncommitted transaction, *REVISION will be set to 86289177Speter SVN_INVALID_REVNUM. */ 87289177Spetersvn_error_t * 88289177Spetersvn_fs_x__node_created_rev(svn_revnum_t *revision, 89289177Speter svn_fs_root_t *root, 90289177Speter const char *path, 91289177Speter apr_pool_t *scratch_pool); 92289177Speter 93289177Speter/* Verify metadata for ROOT. 94289177Speter ### Currently only implemented for revision roots. */ 95289177Spetersvn_error_t * 96289177Spetersvn_fs_x__verify_root(svn_fs_root_t *root, 97289177Speter apr_pool_t *scratch_pool); 98289177Speter 99289177Spetersvn_error_t * 100289177Spetersvn_fs_x__info_format(int *fs_format, 101289177Speter svn_version_t **supports_version, 102289177Speter svn_fs_t *fs, 103289177Speter apr_pool_t *result_pool, 104289177Speter apr_pool_t *scratch_pool); 105289177Speter 106289177Speter 107289177Spetersvn_error_t * 108289177Spetersvn_fs_x__info_config_files(apr_array_header_t **files, 109289177Speter svn_fs_t *fs, 110289177Speter apr_pool_t *result_pool, 111289177Speter apr_pool_t *scratch_pool); 112289177Speter 113289177Speter#ifdef __cplusplus 114289177Speter} 115289177Speter#endif /* __cplusplus */ 116289177Speter 117362181Sdim#endif /* SVN_LIBSVN_FS_X_TREE_H */ 118