]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/subversion/subversion/libsvn_wc/diff.h
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / contrib / subversion / subversion / libsvn_wc / diff.h
1 /*
2  * lock.h:  routines for diffing local files and directories.
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_DIFF_H
25 #define SVN_LIBSVN_WC_DIFF_H
26
27 #include <apr_pools.h>
28 #include <apr_hash.h>
29
30 #include "svn_types.h"
31 #include "svn_error.h"
32 #include "svn_wc.h"
33
34 #include "wc_db.h"
35 #include "private/svn_diff_tree.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif /* __cplusplus */
40
41 /* Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to
42    PROCESSOR with as parent baton PROCESSOR_PARENT_BATON.
43
44    The node is expected to have status svn_wc__db_status_normal, or
45    svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
46    version of LOCAL_ABSPATH as ADDED. In this case an
47    svn_wc__db_status_deleted may shadow an added or deleted node.
48
49    If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
50    in the changelist, don't report the node.
51  */
52 svn_error_t *
53 svn_wc__diff_local_only_file(svn_wc__db_t *db,
54                              const char *local_abspath,
55                              const char *relpath,
56                              const svn_diff_tree_processor_t *processor,
57                              void *processor_parent_baton,
58                              apr_hash_t *changelist_hash,
59                              svn_boolean_t diff_pristine,
60                              svn_cancel_func_t cancel_func,
61                              void *cancel_baton,
62                              apr_pool_t *scratch_pool);
63
64 /* Reports the directory LOCAL_ABSPATH and everything below it (limited by
65    DEPTH) as added with relpath RELPATH to PROCESSOR with as parent baton
66    PROCESSOR_PARENT_BATON.
67
68    The node is expected to have status svn_wc__db_status_normal, or
69    svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
70    version of LOCAL_ABSPATH as ADDED. In this case an
71    svn_wc__db_status_deleted may shadow an added or deleted node.
72
73    If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
74    in the changelist, don't report the node.
75  */
76 svn_error_t *
77 svn_wc__diff_local_only_dir(svn_wc__db_t *db,
78                             const char *local_abspath,
79                             const char *relpath,
80                             svn_depth_t depth,
81                             const svn_diff_tree_processor_t *processor,
82                             void *processor_parent_baton,
83                             apr_hash_t *changelist_hash,
84                             svn_boolean_t diff_pristine,
85                             svn_cancel_func_t cancel_func,
86                             void *cancel_baton,
87                             apr_pool_t *scratch_pool);
88
89 /* Reports the BASE-file LOCAL_ABSPATH as deleted to PROCESSOR with relpath
90    RELPATH, revision REVISION and parent baton PROCESSOR_PARENT_BATON.
91
92    If REVISION is invalid, the revision as stored in BASE is used.
93
94    The node is expected to have status svn_wc__db_status_normal in BASE. */
95 svn_error_t *
96 svn_wc__diff_base_only_file(svn_wc__db_t *db,
97                             const char *local_abspath,
98                             const char *relpath,
99                             svn_revnum_t revision,
100                             const svn_diff_tree_processor_t *processor,
101                             void *processor_parent_baton,
102                             apr_pool_t *scratch_pool);
103
104 /* Reports the BASE-directory LOCAL_ABSPATH and everything below it (limited
105    by DEPTH) as deleted to PROCESSOR with relpath RELPATH and parent baton
106    PROCESSOR_PARENT_BATON.
107
108    If REVISION is invalid, the revision as stored in BASE is used.
109
110    The node is expected to have status svn_wc__db_status_normal in BASE. */
111 svn_error_t *
112 svn_wc__diff_base_only_dir(svn_wc__db_t *db,
113                            const char *local_abspath,
114                            const char *relpath,
115                            svn_revnum_t revision,
116                            svn_depth_t depth,
117                            const svn_diff_tree_processor_t *processor,
118                            void *processor_parent_baton,
119                            svn_cancel_func_t cancel_func,
120                            void *cancel_baton,
121                            apr_pool_t *scratch_pool);
122
123 /* Diff the file PATH against the text base of its BASE layer.  At this
124  * stage we are dealing with a file that does exist in the working copy.
125  */
126 svn_error_t *
127 svn_wc__diff_base_working_diff(svn_wc__db_t *db,
128                                const char *local_abspath,
129                                const char *relpath,
130                                svn_revnum_t revision,
131                                apr_hash_t *changelist_hash,
132                                const svn_diff_tree_processor_t *processor,
133                                void *processor_dir_baton,
134                                svn_boolean_t diff_pristine,
135                                svn_cancel_func_t cancel_func,
136                                void *cancel_baton,
137                                apr_pool_t *scratch_pool);
138
139
140 #ifdef __cplusplus
141 }
142 #endif /* __cplusplus */
143
144 #endif /* SVN_LIBSVN_WC_DIFF_H */