~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_wc/conflicts.h

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#define SVN_WC__CONFLICT_KIND_REJECT "reject"
50
50
#define SVN_WC__CONFLICT_KIND_OBSTRUCTED "obstructed"
51
51
 
52
 
 
53
 
 
54
 
/* Return a new conflict skel, allocated in RESULT_POOL. */
 
52
#define SVN_WC__CONFLICT_SRC_SUBVERSION "subversion"
 
53
 
 
54
/* Return a new conflict skel, allocated in RESULT_POOL.
 
55
 
 
56
   Typically creating a conflict starts with calling this function and then
 
57
   collecting details via one or more calls to svn_wc__conflict_skel_add_*().
 
58
 
 
59
   The caller can then (when necessary) add operation details via
 
60
   svn_wc__conflict_skel_set_op_*() and store the resulting conflict together
 
61
   with the result of its operation in the working copy database.
 
62
*/
55
63
svn_skel_t *
56
 
svn_wc__conflict_skel_new(apr_pool_t *result_pool);
 
64
svn_wc__conflict_skel_create(apr_pool_t *result_pool);
 
65
 
 
66
/* Return a boolean in *COMPLETE indicating whether CONFLICT_SKEL contains
 
67
   everything needed for installing in the working copy database.
 
68
 
 
69
   This typically checks if CONFLICT_SKEL contains at least one conflict
 
70
   and an operation.
 
71
 */
 
72
svn_error_t *
 
73
svn_wc__conflict_skel_is_complete(svn_boolean_t *complete,
 
74
                                  const svn_skel_t *conflict_skel);
57
75
 
58
76
 
59
77
/* Set 'update' as the conflicting operation in CONFLICT_SKEL.
60
78
   Allocate data stored in the skel in RESULT_POOL.
61
79
 
62
 
   BASE_REVISION is the revision the node was at before the update.
63
 
   TARGET_REVISION is the revision being updated to.
64
 
 
65
 
   Do temporary allocations in SCRATCH_POOL. */
 
80
   ORIGINAL and TARGET specify the BASE node before and after updating.
 
81
 
 
82
   It is an error to set another operation to a conflict skel that
 
83
   already has an operation.
 
84
 
 
85
   Do temporary allocations in SCRATCH_POOL. The new skel data is
 
86
   completely stored in RESULT-POOL. */
66
87
svn_error_t *
67
88
svn_wc__conflict_skel_set_op_update(svn_skel_t *conflict_skel,
68
 
                                    svn_revnum_t base_revision,
69
 
                                    svn_revnum_t target_revision,
 
89
                                    const svn_wc_conflict_version_t *original,
 
90
                                    const svn_wc_conflict_version_t *target,
70
91
                                    apr_pool_t *result_pool,
71
92
                                    apr_pool_t *scratch_pool);
72
93
 
74
95
/* Set 'switch' as the conflicting operation in CONFLICT_SKEL.
75
96
   Allocate data stored in the skel in RESULT_POOL.
76
97
 
77
 
   BASE_REVISION is the revision the node was at before the switch.
78
 
   TARGET_REVISION is the revision being switched to.
79
 
   REPOS_RELPATH is the path being switched to, relative to the
80
 
   repository root.
 
98
   ORIGINAL and TARGET specify the BASE node before and after switching.
 
99
 
 
100
   It is an error to set another operation to a conflict skel that
 
101
   already has an operation.
81
102
 
82
103
   Do temporary allocations in SCRATCH_POOL. */
83
104
svn_error_t *
84
105
svn_wc__conflict_skel_set_op_switch(svn_skel_t *conflict_skel,
85
 
                                    svn_revnum_t base_revision,
86
 
                                    svn_revnum_t target_revision,
87
 
                                    const char *repos_relpath,
 
106
                                    const svn_wc_conflict_version_t *original,
 
107
                                    const svn_wc_conflict_version_t *target,
 
108
                                    apr_pool_t *result_pool,
88
109
                                    apr_pool_t *scratch_pool);
89
110
 
90
111
 
91
112
/* Set 'merge' as conflicting operation in CONFLICT_SKEL.
92
113
   Allocate data stored in the skel in RESULT_POOL.
93
114
 
94
 
   REPOS_UUID is the UUID of the repository accessed via REPOS_ROOT_URL.
95
 
 
96
 
   LEFT_REPOS_RELPATH and RIGHT_REPOS_RELPATH paths to the merge-left
97
 
   and merge-right merge sources, relative to REPOS_URL
98
 
 
99
 
   LEFT_REVISION is the merge-left revision.
100
 
   RIGHT_REVISION is the merge-right revision.
 
115
   LEFT and RIGHT paths are the merge-left and merge-right merge
 
116
   sources of the merge.
 
117
 
 
118
   It is an error to set another operation to a conflict skel that
 
119
   already has an operation.
101
120
 
102
121
   Do temporary allocations in SCRATCH_POOL. */
103
122
svn_error_t *
104
123
svn_wc__conflict_skel_set_op_merge(svn_skel_t *conflict_skel,
105
 
                                   const char *repos_uuid,
106
 
                                   const char *repos_root_url,
107
 
                                   svn_revnum_t left_revision,
108
 
                                   const char *left_repos_relpath,
109
 
                                   svn_revnum_t right_revision,
110
 
                                   const char *right_repos_relpath,
111
 
                                   apr_pool_t *result_pool,
112
 
                                   apr_pool_t *scratch_pool);
113
 
 
114
 
 
115
 
/* Set 'patch' as the conflicting operation in CONFLICT_SKEL.
116
 
   Allocate data stored in the skel in RESULT_POOL.
117
 
 
118
 
   PATCH_SOURCE_LABEL is a string identifying the patch source in
119
 
   some way, for display purposes. It is usually the absolute path
120
 
   to the patch file, or a token such as "<stdin>" if the patch source
121
 
   is not a file.
122
 
 
123
 
   Do temporary allocations in SCRATCH_POOL.
124
 
*/
125
 
svn_error_t *
126
 
svn_wc__conflict_skel_set_op_patch(svn_skel_t *conflict_skel,
127
 
                                   const char *patch_source_label,
 
124
                                   const svn_wc_conflict_version_t *left,
 
125
                                   const svn_wc_conflict_version_t *right,
128
126
                                   apr_pool_t *result_pool,
129
127
                                   apr_pool_t *scratch_pool);
130
128
 
132
130
/* Add a text conflict to CONFLICT_SKEL.
133
131
   Allocate data stored in the skel in RESULT_POOL.
134
132
 
135
 
   All checksums passed should be suitable for retreiving conflicted
136
 
   versions of the file from the pristine store.
137
 
 
138
 
   ORIGINAL_CHECKSUM is the checksum of the BASE version of the conflicted
139
 
   file (without local modifications).
140
 
   MINE_CHECKSUM is the checksum of the WORKING version of the conflicted
141
 
   file as of the time the conflicting operation was run (i.e. including
142
 
   local modifications).
143
 
   INCOMING_CHECKSUM is the checksum of the incoming file causing the
144
 
   conflict. ### is this needed for update? what about merge?
145
 
 
146
 
   It is an error (### which one?) if no conflicting operation has been
147
 
   set on CONFLICT_SKEL before calling this function.
148
 
   It is an error (### which one?) if CONFLICT_SKEL already contains
149
 
   a text conflict.
150
 
 
151
 
   Do temporary allocations in SCRATCH_POOL.
152
 
*/
153
 
svn_error_t *
154
 
svn_wc__conflict_skel_add_text_conflict(
155
 
  svn_skel_t *conflict_skel,
156
 
  const svn_checksum_t *original_checksum,
157
 
  const svn_checksum_t *mine_checksum,
158
 
  const svn_checksum_t *incoming_checksum,
159
 
  apr_pool_t *result_pool,
160
 
  apr_pool_t *scratch_pool);
161
 
 
162
 
 
163
 
/* Add a property conflict to SKEL.
164
 
 
165
 
   PROP_NAME is the name of the conflicted property.
166
 
 
167
 
   ORIGINAL_VALUE is the property's value at the BASE revision. MINE_VALUE
168
 
   is the property's value in WORKING (BASE + local modifications).
169
 
   INCOMING_VALUE is the incoming property value brought in by the
170
 
   operation. When merging, INCOMING_BASE_VALUE is the base value against
171
 
   which INCOMING_VALUE ws being applied. For updates, INCOMING_BASE_VALUE
172
 
   should be the same as ORIGINAL_VALUE.
173
 
 
174
 
   *_VALUE may be NULL, indicating no value was present.
175
 
 
176
 
   It is an error (### which one?) if no conflicting operation has been
177
 
   set on CONFLICT_SKEL before calling this function.
178
 
   It is an error (### which one?) if CONFLICT_SKEL already cotains
179
 
   a propery conflict for PROP_NAME.
180
 
 
181
 
   The conflict recorded in SKEL will be allocated from RESULT_POOL. Do
182
 
   temporary allocations in SCRATCH_POOL.
183
 
*/
184
 
svn_error_t *
185
 
svn_wc__conflict_skel_add_prop_conflict(
186
 
  svn_skel_t *skel,
187
 
  const char *prop_name,
188
 
  const svn_string_t *original_value,
189
 
  const svn_string_t *mine_value,
190
 
  const svn_string_t *incoming_value,
191
 
  const svn_string_t *incoming_base_value,
192
 
  apr_pool_t *result_pool,
193
 
  apr_pool_t *scratch_pool);
 
133
   The DB, WRI_ABSPATH pair specifies in which working copy the conflict
 
134
   will be recorded. (Needed for making the paths relative).
 
135
 
 
136
   MINE_ABSPATH, THEIR_OLD_ABSPATH and THEIR_ABSPATH specify the marker
 
137
   files for this text conflict. Each of these values can be NULL to specify
 
138
   that the node doesn't exist in this case.
 
139
 
 
140
   ### It is expected that in a future version we will also want to store
 
141
   ### the sha1 checksum of these files to allow reinstalling the conflict
 
142
   ### markers from the pristine store.
 
143
 
 
144
   It is an error to add another text conflict to a conflict skel that
 
145
   already contains a text conflict.
 
146
 
 
147
   Do temporary allocations in SCRATCH_POOL.
 
148
*/
 
149
svn_error_t *
 
150
svn_wc__conflict_skel_add_text_conflict(svn_skel_t *conflict_skel,
 
151
                                        svn_wc__db_t *db,
 
152
                                        const char *wri_abspath,
 
153
                                        const char *mine_abspath,
 
154
                                        const char *their_old_abspath,
 
155
                                        const char *their_abspath,
 
156
                                        apr_pool_t *result_pool,
 
157
                                        apr_pool_t *scratch_pool);
 
158
 
 
159
 
 
160
/* Add property conflict details to CONFLICT_SKEL.
 
161
   Allocate data stored in the skel in RESULT_POOL.
 
162
 
 
163
   The DB, WRI_ABSPATH pair specifies in which working copy the conflict
 
164
   will be recorded. (Needed for making the paths relative).
 
165
 
 
166
   The MARKER_ABSPATH is NULL when raising a conflict in v1.8+.  See below.
 
167
 
 
168
   The MINE_PROPS, THEIR_OLD_PROPS and THEIR_PROPS are hashes mapping a
 
169
   const char * property name to a const svn_string_t* value.
 
170
 
 
171
   The CONFLICTED_PROP_NAMES is a const char * property name value mapping
 
172
   to "", recording which properties aren't resolved yet in the current
 
173
   property values.
 
174
   ### Needed for creating the marker file from this conflict data.
 
175
   ### Would also allow per property marking as resolved.
 
176
   ### Maybe useful for calling (legacy) conflict resolvers that expect one
 
177
   ### property conflict per invocation.
 
178
 
 
179
   When raising a property conflict in the course of upgrading an old WC,
 
180
   MARKER_ABSPATH is the path to the file containing a human-readable
 
181
   description of the conflict, MINE_PROPS and THEIR_OLD_PROPS and
 
182
   THEIR_PROPS are all NULL, and CONFLICTED_PROP_NAMES is an empty hash.
 
183
 
 
184
   It is an error to add another prop conflict to a conflict skel that
 
185
   already contains a prop conflict.  (A single call to this function can
 
186
   record that multiple properties are in conflict.)
 
187
 
 
188
   Do temporary allocations in SCRATCH_POOL.
 
189
*/
 
190
svn_error_t *
 
191
svn_wc__conflict_skel_add_prop_conflict(svn_skel_t *conflict_skel,
 
192
                                        svn_wc__db_t *db,
 
193
                                        const char *wri_abspath,
 
194
                                        const char *marker_abspath,
 
195
                                        const apr_hash_t *mine_props,
 
196
                                        const apr_hash_t *their_old_props,
 
197
                                        const apr_hash_t *their_props,
 
198
                                        const apr_hash_t *conflicted_prop_names,
 
199
                                        apr_pool_t *result_pool,
 
200
                                        apr_pool_t *scratch_pool);
194
201
 
195
202
 
196
203
/* Add a tree conflict to CONFLICT_SKEL.
197
204
   Allocate data stored in the skel in RESULT_POOL.
198
205
 
199
206
   LOCAL_CHANGE is the local tree change made to the node.
200
 
   ORIGINAL_LOCAL_KIND is the kind of the local node in BASE.
201
 
   If ORIGINAL_LOCAL_KIND is svn_node_file, ORIGINAL_CHECKSUM is the checksum
202
 
   for the BASE of the file, for retrieval from the pristine store.
203
 
 
204
 
   MINE_LOCAL_KIND is the kind of the local node in WORKING at the
205
 
   time the conflict was flagged.
206
 
   If MINE_LOCAL_KIND is svn_node_file, ORIGINAL_CHECKSUM is the checksum
207
 
   of the WORKING version of the file at the time the conflict was flagged,
208
 
   for retrieval from the pristine store.
209
 
 
210
 
   INCOMING_KIND is the kind of the incoming node.
211
 
   If INCOMING_KIND is svn_node_file, INCOMING_CHECKSUM is the checksum
212
 
   of the INCOMING version of the file, for retrieval from the pristine store.
213
 
 
214
 
   It is an error (### which one?) if no conflicting operation has been
215
 
   set on CONFLICT_SKEL before calling this function.
216
 
   It is an error (### which one?) if CONFLICT_SKEL already contains
217
 
   a tree conflict.
218
 
 
219
 
   Do temporary allocations in SCRATCH_POOL.
220
 
*/
221
 
svn_error_t *
222
 
svn_wc__conflict_skel_add_tree_conflict(
223
 
  svn_skel_t *skel,
224
 
  svn_wc_conflict_reason_t local_change,
225
 
  svn_wc__db_kind_t original_local_kind,
226
 
  const svn_checksum_t *original_checksum,
227
 
  svn_wc__db_kind_t mine_local_kind,
228
 
  const svn_checksum_t *mine_checksum,
229
 
  svn_wc_conflict_action_t incoming_change,
230
 
  svn_wc__db_kind_t incoming_kind,
231
 
  const svn_checksum_t *incoming_checksum,
232
 
  apr_pool_t *result_pool,
233
 
  apr_pool_t *scratch_pool);
234
 
 
235
 
 
236
 
/* Add a reject conflict to CONFLICT_SKEL.
237
 
   Allocate data stored in the skel in RESULT_POOL.
238
 
 
239
 
   HUNK_ORIGINAL_OFFSET, HUNK_ORIGINAL_LENGTH, HUNK_MODIFIED_OFFSET,
240
 
   and HUNK_MODIFIED_LENGTH is hunk-header data identifying the hunk
241
 
   which was rejected.
242
 
 
243
 
   REJECT_DIFF_CHECKSUM is the checksum of the text of the rejected
244
 
   diff, for retrieval from the pristine store.
245
 
 
246
 
   It is an error (### which one?) if no conflicting operation has been
247
 
   set on CONFLICT_SKEL before calling this function.
248
 
   It is an error (### which one?) if CONFLICT_SKEL already contains
249
 
   a reject conflict for the hunk.
250
 
 
251
 
   Do temporary allocations in SCRATCH_POOL.
252
 
*/
253
 
svn_error_t *
254
 
svn_wc__conflict_skel_add_reject_conflict(
255
 
  svn_skel_t *conflict_skel,
256
 
  svn_linenum_t hunk_original_offset,
257
 
  svn_linenum_t hunk_original_length,
258
 
  svn_linenum_t hunk_modified_offset,
259
 
  svn_linenum_t hunk_modified_length,
260
 
  const svn_checksum_t *reject_diff_checksum,
261
 
  apr_pool_t *result_pool,
262
 
  apr_pool_t *scratch_pool);
263
 
 
264
 
 
265
 
/* Add an obstruction conflict to CONFLICT_SKEL.
266
 
   Allocate data stored in the skel in RESULT_POOL.
267
 
 
268
 
   It is an error (### which one?) if no conflicting operation has been
269
 
   set on CONFLICT_SKEL before calling this function.
270
 
   It is an error (### which one?) if CONFLICT_SKEL already contains
271
 
   an obstruction.
272
 
 
273
 
   Do temporary allocations in SCRATCH_POOL.
274
 
*/
275
 
svn_error_t *
276
 
svn_wc__conflict_skel_add_obstruction(svn_skel_t *conflict_skel,
277
 
                                      apr_pool_t *result_pool,
278
 
                                      apr_pool_t *scratch_pool);
279
 
 
280
 
 
281
 
/* Resolve text conflicts on the given node.  */
282
 
svn_error_t *
283
 
svn_wc__resolve_text_conflict(svn_wc__db_t *db,
284
 
                              const char *local_abspath,
285
 
                              apr_pool_t *scratch_pool);
286
 
 
 
207
   INCOMING_CHANGE is the incoming change made to the node.
 
208
 
 
209
   MOVE_SRC_OP_ROOT_ABSPATH must be set when LOCAL_CHANGE is
 
210
   svn_wc_conflict_reason_moved_away and NULL otherwise and the operation
 
211
   is svn_wc_operation_update or svn_wc_operation_switch.  It should be
 
212
   set to the op-root of the move-away unless the move is inside a
 
213
   delete in which case it should be set to the op-root of the delete
 
214
   (the delete can be a replace). So given:
 
215
       A/B/C moved away (1)
 
216
       A deleted and replaced
 
217
       A/B/C moved away (2)
 
218
       A/B deleted
 
219
   MOVE_SRC_OP_ROOT_ABSPATH should be A for a conflict associated
 
220
   with (1), MOVE_SRC_OP_ROOT_ABSPATH should be A/B for a conflict
 
221
   associated with (2).
 
222
 
 
223
   It is an error to add another tree conflict to a conflict skel that
 
224
   already contains a tree conflict.  (It is not an error, at this level,
 
225
   to add a tree conflict to an existing text or property conflict skel.)
 
226
 
 
227
   Do temporary allocations in SCRATCH_POOL.
 
228
*/
 
229
svn_error_t *
 
230
svn_wc__conflict_skel_add_tree_conflict(svn_skel_t *conflict_skel,
 
231
                                        svn_wc__db_t *db,
 
232
                                        const char *wri_abspath,
 
233
                                        svn_wc_conflict_reason_t local_change,
 
234
                                        svn_wc_conflict_action_t incoming_change,
 
235
                                        const char *move_src_op_root_abspath,
 
236
                                        apr_pool_t *result_pool,
 
237
                                        apr_pool_t *scratch_pool);
 
238
 
 
239
/* Allows resolving specific conflicts stored in CONFLICT_SKEL.
 
240
 
 
241
   When RESOLVE_TEXT is TRUE and CONFLICT_SKEL contains a text conflict,
 
242
   resolve/remove the text conflict in CONFLICT_SKEL.
 
243
 
 
244
   When RESOLVE_PROP is "" and CONFLICT_SKEL contains a property conflict,
 
245
   resolve/remove all property conflicts in CONFLICT_SKEL.
 
246
 
 
247
   When RESOLVE_PROP is not NULL and not "", remove the property conflict on
 
248
   the property RESOLVE_PROP in CONFLICT_SKEL. When RESOLVE_PROP was the last
 
249
   property in CONFLICT_SKEL remove the property conflict info from
 
250
   CONFLICT_SKEL.
 
251
 
 
252
   When RESOLVE_TREE is TRUE and CONFLICT_SKEL contains a tree conflict,
 
253
   resolve/remove the tree conflict in CONFLICT_SKEL.
 
254
 
 
255
   If COMPLETELY_RESOLVED is not NULL, then set *COMPLETELY_RESOLVED to TRUE,
 
256
   when no conflict registration is left in CONFLICT_SKEL after editting,
 
257
   otherwise to FALSE.
 
258
 
 
259
   Allocate data stored in the skel in RESULT_POOL.
 
260
 
 
261
   This functions edits CONFLICT_SKEL. New skels might be created in
 
262
   RESULT_POOL. Temporary allocations will use SCRATCH_POOL.
 
263
 */
 
264
/* ### db, wri_abspath is currently unused. Remove? */
 
265
svn_error_t *
 
266
svn_wc__conflict_skel_resolve(svn_boolean_t *completely_resolved,
 
267
                              svn_skel_t *conflict_skel,
 
268
                              svn_wc__db_t *db,
 
269
                              const char *wri_abspath,
 
270
                              svn_boolean_t resolve_text,
 
271
                              const char *resolve_prop,
 
272
                              svn_boolean_t resolve_tree,
 
273
                              apr_pool_t *result_pool,
 
274
                              apr_pool_t *scratch_pool);
 
275
 
 
276
/*
 
277
 * -----------------------------------------------------------
 
278
 * Reading conflict skels. Maybe this can be made private later
 
279
 * -----------------------------------------------------------
 
280
 */
 
281
 
 
282
/* Read common information from CONFLICT_SKEL to determine the operation
 
283
 * and merge origins.
 
284
 *
 
285
 * Output arguments can be NULL if the value is not necessary.
 
286
 *
 
287
 * Set *LOCATIONS to an array of (svn_wc_conflict_version_t *).  For
 
288
 * conflicts written by current code, there are 2 elements: index [0] is
 
289
 * the 'old' or 'left' side and [1] is the 'new' or 'right' side.
 
290
 *
 
291
 * For conflicts written by 1.6 or 1.7 there are 2 locations for a tree
 
292
 * conflict, but none for a text or property conflict.
 
293
 *
 
294
 * TEXT_, PROP_ and TREE_CONFLICTED (when not NULL) will be set to TRUE
 
295
 * when the conflict contains the specified kind of conflict, otherwise
 
296
 * to false.
 
297
 *
 
298
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
299
 * SCRATCH_POOL.
 
300
 */
 
301
svn_error_t *
 
302
svn_wc__conflict_read_info(svn_wc_operation_t *operation,
 
303
                           const apr_array_header_t **locations,
 
304
                           svn_boolean_t *text_conflicted,
 
305
                           svn_boolean_t *prop_conflicted,
 
306
                           svn_boolean_t *tree_conflicted,
 
307
                           svn_wc__db_t *db,
 
308
                           const char *wri_abspath,
 
309
                           const svn_skel_t *conflict_skel,
 
310
                           apr_pool_t *result_pool,
 
311
                           apr_pool_t *scratch_pool);
 
312
 
 
313
/* Reads back the original data stored by svn_wc__conflict_skel_add_text_conflict()
 
314
 * in CONFLICT_SKEL for a node in DB, WRI_ABSPATH.
 
315
 *
 
316
 * Values as documented for svn_wc__conflict_skel_add_text_conflict().
 
317
 *
 
318
 * Output arguments can be NULL if the value is not necessary.
 
319
 *
 
320
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
321
 * SCRATCH_POOL.
 
322
 */
 
323
svn_error_t *
 
324
svn_wc__conflict_read_text_conflict(const char **mine_abspath,
 
325
                                    const char **their_old_abspath,
 
326
                                    const char **their_abspath,
 
327
                                    svn_wc__db_t *db,
 
328
                                    const char *wri_abspath,
 
329
                                    const svn_skel_t *conflict_skel,
 
330
                                    apr_pool_t *result_pool,
 
331
                                    apr_pool_t *scratch_pool);
 
332
 
 
333
/* Reads back the original data stored by svn_wc__conflict_skel_add_prop_conflict()
 
334
 * in CONFLICT_SKEL for a node in DB, WRI_ABSPATH.
 
335
 *
 
336
 * Values as documented for svn_wc__conflict_skel_add_prop_conflict().
 
337
 *
 
338
 * Output arguments can be NULL if the value is not necessary
 
339
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
340
 * SCRATCH_POOL.
 
341
 */
 
342
svn_error_t *
 
343
svn_wc__conflict_read_prop_conflict(const char **marker_abspath,
 
344
                                    apr_hash_t **mine_props,
 
345
                                    apr_hash_t **their_old_props,
 
346
                                    apr_hash_t **their_props,
 
347
                                    apr_hash_t **conflicted_prop_names,
 
348
                                    svn_wc__db_t *db,
 
349
                                    const char *wri_abspath,
 
350
                                    const svn_skel_t *conflict_skel,
 
351
                                    apr_pool_t *result_pool,
 
352
                                    apr_pool_t *scratch_pool);
 
353
 
 
354
/* Reads back the original data stored by svn_wc__conflict_skel_add_tree_conflict()
 
355
 * in CONFLICT_SKEL for a node in DB, WRI_ABSPATH.
 
356
 *
 
357
 * Values as documented for svn_wc__conflict_skel_add_tree_conflict().
 
358
 *
 
359
 * Output arguments can be NULL if the value is not necessary
 
360
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
361
 * SCRATCH_POOL.
 
362
 */
 
363
svn_error_t *
 
364
svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *local_change,
 
365
                                    svn_wc_conflict_action_t *incoming_change,
 
366
                                    const char **move_src_op_root_abspath,
 
367
                                    svn_wc__db_t *db,
 
368
                                    const char *wri_abspath,
 
369
                                    const svn_skel_t *conflict_skel,
 
370
                                    apr_pool_t *result_pool,
 
371
                                    apr_pool_t *scratch_pool);
 
372
 
 
373
/* Reads in *MARKERS a list of const char * absolute paths of the marker files
 
374
   referenced from CONFLICT_SKEL.
 
375
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
376
 * SCRATCH_POOL.
 
377
 */
 
378
svn_error_t *
 
379
svn_wc__conflict_read_markers(const apr_array_header_t **markers,
 
380
                              svn_wc__db_t *db,
 
381
                              const char *wri_abspath,
 
382
                              const svn_skel_t *conflict_skel,
 
383
                              apr_pool_t *result_pool,
 
384
                              apr_pool_t *scratch_pool);
 
385
 
 
386
/* Create the necessary marker files for the conflicts stored in
 
387
 * CONFLICT_SKEL and return the work items to fill the markers from
 
388
 * the work queue.
 
389
 *
 
390
 * Currently only used for property conflicts as text conflict markers
 
391
 * are just in-wc files.
 
392
 *
 
393
 * Allocate the result in RESULT_POOL. Perform temporary allocations in
 
394
 * SCRATCH_POOL.
 
395
 */
 
396
svn_error_t *
 
397
svn_wc__conflict_create_markers(svn_skel_t **work_item,
 
398
                                svn_wc__db_t *db,
 
399
                                const char *local_abspath,
 
400
                                svn_skel_t *conflict_skel,
 
401
                                apr_pool_t *result_pool,
 
402
                                apr_pool_t *scratch_pool);
 
403
 
 
404
/* Call the interactive conflict resolver RESOLVER_FUNC with RESOLVER_BATON to
 
405
   allow resolving the conflicts on LOCAL_ABSPATH.
 
406
 
 
407
   Call RESOLVER_FUNC once for each property conflict, and again for any
 
408
   text conflict, and again for any tree conflict on the node.
 
409
 
 
410
   CONFLICT_SKEL contains the details of the conflicts on LOCAL_ABSPATH.
 
411
 
 
412
   Resolver actions are directly applied to the in-db state of LOCAL_ABSPATH,
 
413
   so the conflict and the state in CONFLICT_SKEL must already be installed in
 
414
   wc.db. */
 
415
svn_error_t *
 
416
svn_wc__conflict_invoke_resolver(svn_wc__db_t *db,
 
417
                                 const char *local_abspath,
 
418
                                 const svn_skel_t *conflict_skel,
 
419
                                 const apr_array_header_t *merge_options,
 
420
                                 svn_wc_conflict_resolver_func2_t resolver_func,
 
421
                                 void *resolver_baton,
 
422
                                 svn_cancel_func_t cancel_func,
 
423
                                 void *cancel_baton,
 
424
                                 apr_pool_t *scratch_pool);
 
425
 
 
426
 
 
427
/* Mark as resolved any text conflict on the node at DB/LOCAL_ABSPATH.  */
 
428
svn_error_t *
 
429
svn_wc__mark_resolved_text_conflict(svn_wc__db_t *db,
 
430
                                    const char *local_abspath,
 
431
                                    apr_pool_t *scratch_pool);
 
432
 
 
433
/* Mark as resolved any prop conflicts on the node at DB/LOCAL_ABSPATH.  */
 
434
svn_error_t *
 
435
svn_wc__mark_resolved_prop_conflicts(svn_wc__db_t *db,
 
436
                                     const char *local_abspath,
 
437
                                     apr_pool_t *scratch_pool);
287
438
 
288
439
#ifdef __cplusplus
289
440
}