2 * tree_conflicts.h: declarations related to tree conflicts
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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
21 * ====================================================================
24 #ifndef SVN_LIBSVN_WC_TREE_CONFLICTS_H
25 #define SVN_LIBSVN_WC_TREE_CONFLICTS_H
27 #include <apr_pools.h>
28 #include <apr_tables.h>
30 #include "svn_string.h"
33 #include "private/svn_token.h"
34 #include "private/svn_skel.h"
38 #endif /* __cplusplus */
42 * See the notes/tree-conflicts/ directory for more information
43 * about tree conflicts in general.
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.
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.
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.
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.
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);
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.
76 svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
77 const svn_skel_t *skel,
79 apr_pool_t *result_pool,
80 apr_pool_t *scratch_pool);
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[];
91 #endif /* __cplusplus */
93 #endif /* SVN_LIBSVN_WC_TREE_CONFLICTS_H */