]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/subversion/subversion/include/private/svn_branch_repos.h
Update svn-1.9.7 to 1.10.0.
[FreeBSD/FreeBSD.git] / contrib / subversion / subversion / include / private / svn_branch_repos.h
1 /**
2  * @copyright
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  * @endcopyright
22  *
23  * @file svn_branch_repos.h
24  * @brief Operating on a repository
25  *
26  * @since New in ???.
27  */
28
29
30 #ifndef SVN_BRANCH_REPOS_H
31 #define SVN_BRANCH_REPOS_H
32
33 #include <apr_pools.h>
34
35 #include "svn_types.h"
36
37 #include "private/svn_branch.h"
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif /* __cplusplus */
42
43
44 /* Create a new branching metadata object */
45 svn_branch__repos_t *
46 svn_branch__repos_create(apr_pool_t *result_pool);
47
48 /* Add REV_ROOT as the next revision in the repository REPOS.
49  *
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.)
52  */
53 svn_error_t *
54 svn_branch__repos_add_revision(svn_branch__repos_t *repos,
55                                svn_branch__txn_t *rev_root);
56
57 /* Return a pointer to revision REVNUM of the repository REPOS.
58  */
59 struct svn_branch__txn_t *
60 svn_branch__repos_get_revision(const svn_branch__repos_t *repos,
61                                svn_revnum_t revnum);
62
63 /* Return the revision root that represents the base revision (or,
64  * potentially, txn) of the revision or txn REV_ROOT.
65  */
66 svn_branch__txn_t *
67 svn_branch__repos_get_base_revision_root(svn_branch__txn_t *rev_root);
68
69 /* Set *BRANCH_P to the branch found in REPOS : REVNUM : BRANCH_ID.
70  *
71  * Return an error if REVNUM or BRANCH_ID is not found.
72  */
73 svn_error_t *
74 svn_branch__repos_get_branch_by_id(svn_branch__state_t **branch_p,
75                                    const svn_branch__repos_t *repos,
76                                    svn_revnum_t revnum,
77                                    const char *branch_id,
78                                    apr_pool_t *scratch_pool);
79
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.
82  *
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
85  * field is -1.
86  *
87  * Allocate *EL_REV_P (but not the branch object that it refers to) in
88  * RESULT_POOL.
89  */
90 svn_error_t *
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,
93                                     svn_revnum_t revnum,
94                                     const char *branch_id,
95                                     int eid,
96                                     apr_pool_t *result_pool,
97                                     apr_pool_t *scratch_pool);
98
99
100 #ifdef __cplusplus
101 }
102 #endif /* __cplusplus */
103
104 #endif /* SVN_BRANCH_REPOS_H */