]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/subversion/subversion/libsvn_wc/tree_conflicts.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / subversion / subversion / libsvn_wc / tree_conflicts.h
1 /*
2  * tree_conflicts.h: declarations related to tree conflicts
3  *
4  * ====================================================================
5  *    Licensed to the Apache Software Foundation (ASF) under one
6  *    or more contributor license agreements.  See the NOTICE file
7  *    distributed with this work for additional information
8  *    regarding copyright ownership.  The ASF licenses this file
9  *    to you under the Apache License, Version 2.0 (the
10  *    "License"); you may not use this file except in compliance
11  *    with the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *    Unless required by applicable law or agreed to in writing,
16  *    software distributed under the License is distributed on an
17  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  *    KIND, either express or implied.  See the License for the
19  *    specific language governing permissions and limitations
20  *    under the License.
21  * ====================================================================
22  */
23
24 #ifndef SVN_LIBSVN_WC_TREE_CONFLICTS_H
25 #define SVN_LIBSVN_WC_TREE_CONFLICTS_H
26
27 #include <apr_pools.h>
28 #include <apr_tables.h>
29
30 #include "svn_string.h"
31 #include "svn_wc.h"
32
33 #include "private/svn_token.h"
34 #include "private/svn_skel.h"
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* __cplusplus */
39
40
41 /*
42  * See the notes/tree-conflicts/ directory for more information
43  * about tree conflicts in general.
44  *
45  * A given directory may contain potentially many tree conflicts.
46  * Each tree conflict is identified by the path of the file
47  * or directory (both a.k.a node) that it affects.
48  * We call this file or directory the "victim" of the tree conflict.
49  *
50  * For example, a file that is deleted by an update but locally
51  * modified by the user is a victim of a tree conflict.
52  *
53  * For now, tree conflict victims are always direct children of the
54  * directory in which the tree conflict is recorded.
55  * This may change once the way Subversion handles adm areas changes.
56  *
57  * If a directory has tree conflicts, the "tree-conflict-data" field
58  * in the entry for the directory contains one or more tree conflict
59  * descriptions stored using the "skel" format.
60  */
61
62
63 svn_error_t *
64 svn_wc__serialize_conflict(svn_skel_t **skel,
65                            const svn_wc_conflict_description2_t *conflict,
66                            apr_pool_t *result_pool,
67                            apr_pool_t *scratch_pool);
68
69
70 /* Parse a newly allocated svn_wc_conflict_description2_t object from the
71  * provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL.
72  * DIR_PATH is the path to the WC directory whose conflicts are being read.
73  * Use SCRATCH_POOL for temporary allocations.
74  */
75 svn_error_t *
76 svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
77                              const svn_skel_t *skel,
78                              const char *dir_path,
79                              apr_pool_t *result_pool,
80                              apr_pool_t *scratch_pool);
81
82
83 /* Token mapping tables.  */
84 extern const svn_token_map_t svn_wc__operation_map[];
85 extern const svn_token_map_t svn_wc__conflict_action_map[];
86 extern const svn_token_map_t svn_wc__conflict_reason_map[];
87
88
89 #ifdef __cplusplus
90 }
91 #endif /* __cplusplus */
92
93 #endif /* SVN_LIBSVN_WC_TREE_CONFLICTS_H */