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