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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
20 * ====================================================================
23 * @file svn_branch_repos.h
24 * @brief Operating on a repository
30 #ifndef SVN_BRANCH_REPOS_H
31 #define SVN_BRANCH_REPOS_H
33 #include <apr_pools.h>
35 #include "svn_types.h"
37 #include "private/svn_branch.h"
41 #endif /* __cplusplus */
44 /* Create a new branching metadata object */
46 svn_branch__repos_create(apr_pool_t *result_pool);
48 /* Add REV_ROOT as the next revision in the repository REPOS.
50 * (This does not change the REV and BASE_REV fields of REV_ROOT. The
51 * caller should set those, before or after this call.)
54 svn_branch__repos_add_revision(svn_branch__repos_t *repos,
55 svn_branch__txn_t *rev_root);
57 /* Return a pointer to revision REVNUM of the repository REPOS.
59 struct svn_branch__txn_t *
60 svn_branch__repos_get_revision(const svn_branch__repos_t *repos,
63 /* Return the revision root that represents the base revision (or,
64 * potentially, txn) of the revision or txn REV_ROOT.
67 svn_branch__repos_get_base_revision_root(svn_branch__txn_t *rev_root);
69 /* Set *BRANCH_P to the branch found in REPOS : REVNUM : BRANCH_ID.
71 * Return an error if REVNUM or BRANCH_ID is not found.
74 svn_branch__repos_get_branch_by_id(svn_branch__state_t **branch_p,
75 const svn_branch__repos_t *repos,
77 const char *branch_id,
78 apr_pool_t *scratch_pool);
80 /* Set *EL_REV_P to the el-rev-id of the element at branch id BRANCH_ID,
81 * element id EID, in revision REVNUM in REPOS.
83 * If there is no element there, set *EL_REV_P to point to an id in which
84 * the BRANCH field is the nearest enclosing branch of RRPATH and the EID
87 * Allocate *EL_REV_P (but not the branch object that it refers to) in
91 svn_branch__repos_find_el_rev_by_id(svn_branch__el_rev_id_t **el_rev_p,
92 const svn_branch__repos_t *repos,
94 const char *branch_id,
96 apr_pool_t *result_pool,
97 apr_pool_t *scratch_pool);
102 #endif /* __cplusplus */
104 #endif /* SVN_BRANCH_REPOS_H */