OSDN Git Service

fail try to porting svndiff
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / libsvn_diff / svn_diff.h
1 /**\r
2  * @copyright\r
3  * ====================================================================\r
4  * Copyright (c) 2000-2008 CollabNet.  All rights reserved.\r
5  *\r
6  * This software is licensed as described in the file COPYING, which\r
7  * you should have received as part of this distribution.  The terms\r
8  * are also available at http://subversion.tigris.org/license-1.html.\r
9  * If newer versions of this license are posted there, you may use a\r
10  * newer version instead, at your option.\r
11  *\r
12  * This software consists of voluntary contributions made by many\r
13  * individuals.  For exact contribution history, see the revision\r
14  * history and logs, available at http://subversion.tigris.org/.\r
15  * ====================================================================\r
16  * @endcopyright\r
17  *\r
18  * @file svn_diff.h\r
19  * @brief Contextual diffing.\r
20  *\r
21  * This is an internalized library for performing contextual diffs\r
22  * between sources of data.\r
23  *\r
24  * @note This is different than Subversion's binary-diffing engine.\r
25  * That API lives in @c svn_delta.h -- see the "text deltas" section.  A\r
26  * "text delta" is way of representing precise binary diffs between\r
27  * strings of data.  The Subversion client and server send text deltas\r
28  * to one another during updates and commits.\r
29  *\r
30  * This API, however, is (or will be) used for performing *contextual*\r
31  * merges between files in the working copy.  During an update or\r
32  * merge, 3-way file merging is needed.  And 'svn diff' needs to show\r
33  * the differences between 2 files.\r
34  *\r
35  * The nice thing about this API is that it's very general.  It\r
36  * operates on any source of data (a "datasource") and calculates\r
37  * contextual differences on "tokens" within the data.  In our\r
38  * particular usage, the datasources are files and the tokens are\r
39  * lines.  But the possibilities are endless.\r
40  */\r
41 \r
42 \r
43 #ifndef SVN_DIFF_H\r
44 #define SVN_DIFF_H\r
45 \r
46 #include <apr.h>\r
47 #include <apr_pools.h>\r
48 #include <apr_file_io.h>\r
49 \r
50 #include "svn_types.h"\r
51 #include "svn_error.h"\r
52 #include "svn_pools.h"\r
53 //#include "svn_version.h"\r
54 \r
55 #ifdef __cplusplus\r
56 extern "C" {\r
57 #endif /* __cplusplus */\r
58 \r
59 \r
60 \r
61 /**\r
62  * Get libsvn_diff version information.\r
63  *\r
64  * @since New in 1.1.\r
65  */\r
66 const svn_version_t *\r
67 svn_diff_version(void);\r
68 \r
69 \r
70 /* Diffs. */\r
71 \r
72 /** An opaque type that represents a difference between either two or\r
73  * three datasources.   This object is returned by svn_diff_diff(),\r
74  * svn_diff_diff3() and svn_diff_diff4(), and consumed by a number of\r
75  * other routines.\r
76  */\r
77 typedef struct svn_diff_t svn_diff_t;\r
78 \r
79 /**\r
80  * There are four types of datasources.  In GNU diff3 terminology,\r
81  * the first three types correspond to the phrases "older", "mine",\r
82  * and "yours".\r
83  */\r
84 typedef enum svn_diff_datasource_e\r
85 {\r
86   /** The oldest form of the data. */\r
87   svn_diff_datasource_original,\r
88 \r
89   /** The same data, but potentially changed by the user. */\r
90   svn_diff_datasource_modified,\r
91 \r
92   /** The latest version of the data, possibly different than the\r
93    * user's modified version.\r
94    */\r
95   svn_diff_datasource_latest,\r
96 \r
97   /** The common ancestor of original and modified. */\r
98   svn_diff_datasource_ancestor\r
99 \r
100 } svn_diff_datasource_e;\r
101 \r
102 \r
103 /** A vtable for reading data from the three datasources. */\r
104 typedef struct svn_diff_fns_t\r
105 {\r
106   /** Open the datasource of type @a datasource. */\r
107   svn_error_t *(*datasource_open)(void *diff_baton,\r
108                                   svn_diff_datasource_e datasource);\r
109 \r
110   /** Close the datasource of type @a datasource. */\r
111   svn_error_t *(*datasource_close)(void *diff_baton,\r
112                                    svn_diff_datasource_e datasource);\r
113 \r
114   /** Get the next "token" from the datasource of type @a datasource.\r
115    *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.\r
116    *  Leave @a token and @a hash untouched when the datasource is exhausted.\r
117    */\r
118   svn_error_t *(*datasource_get_next_token)(apr_uint32_t *hash, void **token,\r
119                                             void *diff_baton,\r
120                                             svn_diff_datasource_e datasource);\r
121 \r
122   /** A function for ordering the tokens, resembling 'strcmp' in functionality.\r
123    * @a compare should contain the return value of the comparison:\r
124    * If @a ltoken and @a rtoken are "equal", return 0.  If @a ltoken is\r
125    * "less than" @a rtoken, return a number < 0.  If @a ltoken  is\r
126    * "greater than" @a rtoken, return a number > 0.\r
127    */\r
128   svn_error_t *(*token_compare)(void *diff_baton,\r
129                                 void *ltoken,\r
130                                 void *rtoken,\r
131                                 int *compare);\r
132 \r
133   /** Free @a token from memory, the diff algorithm is done with it. */\r
134   void (*token_discard)(void *diff_baton,\r
135                         void *token);\r
136 \r
137   /** Free *all* tokens from memory, they're no longer needed. */\r
138   void (*token_discard_all)(void *diff_baton);\r
139 } svn_diff_fns_t;\r
140 \r
141 \r
142 /* The Main Events */\r
143 \r
144 /** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
145  * return a diff object in @a *diff that represents a difference between\r
146  * an "original" and "modified" datasource.  Do all allocation in @a pool.\r
147  */\r
148 svn_error_t *\r
149 svn_diff_diff(svn_diff_t **diff,\r
150               void *diff_baton,\r
151               const svn_diff_fns_t *diff_fns,\r
152               apr_pool_t *pool);\r
153 \r
154 /** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
155  * return a diff object in @a *diff that represents a difference between\r
156  * three datasources: "original", "modified", and "latest".  Do all\r
157  * allocation in @a pool.\r
158  */\r
159 svn_error_t *\r
160 svn_diff_diff3(svn_diff_t **diff,\r
161                void *diff_baton,\r
162                const svn_diff_fns_t *diff_fns,\r
163                apr_pool_t *pool);\r
164 \r
165 /** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
166  * return a diff object in @a *diff that represents a difference between\r
167  * two datasources: "original" and "latest", adjusted to become a full\r
168  * difference between "original", "modified" and "latest" using "ancestor".\r
169  * Do all allocation in @a pool.\r
170  */\r
171 svn_error_t *\r
172 svn_diff_diff4(svn_diff_t **diff,\r
173                void *diff_baton,\r
174                const svn_diff_fns_t *diff_fns,\r
175                apr_pool_t *pool);\r
176 \r
177 \f\r
178 /* Utility functions */\r
179 \r
180 /** Determine if a diff object contains conflicts.  If it does, return\r
181  * @c TRUE, else return @c FALSE.\r
182  */\r
183 svn_boolean_t\r
184 svn_diff_contains_conflicts(svn_diff_t *diff);\r
185 \r
186 \r
187 /** Determine if a diff object contains actual differences between the\r
188  * datasources.  If so, return @c TRUE, else return @c FALSE.\r
189  */\r
190 svn_boolean_t\r
191 svn_diff_contains_diffs(svn_diff_t *diff);\r
192 \r
193 \r
194 \r
195 \f\r
196 /* Displaying Diffs */\r
197 \r
198 /** A vtable for displaying (or consuming) differences between datasources.\r
199  *\r
200  * Differences, similarities, and conflicts are described by lining up\r
201  * "ranges" of data.\r
202  *\r
203  * @note These callbacks describe data ranges in units of "tokens".\r
204  * A "token" is whatever you've defined it to be in your datasource\r
205  * @c svn_diff_fns_t vtable.\r
206  */\r
207 typedef struct svn_diff_output_fns_t\r
208 {\r
209   /* Two-way and three-way diffs both call the first two output functions: */\r
210 \r
211   /**\r
212    * If doing a two-way diff, then an *identical* data range was found\r
213    * between the "original" and "modified" datasources.  Specifically,\r
214    * the match starts at @a original_start and goes for @a original_length\r
215    * tokens in the original data, and at @a modified_start for\r
216    * @a modified_length tokens in the modified data.\r
217    *\r
218    * If doing a three-way diff, then all three datasources have\r
219    * matching data ranges.  The range @a latest_start, @a latest_length in\r
220    * the "latest" datasource is identical to the range @a original_start,\r
221    * @a original_length in the original data, and is also identical to\r
222    * the range @a modified_start, @a modified_length in the modified data.\r
223    */\r
224   svn_error_t *(*output_common)(void *output_baton,\r
225                                 apr_off_t original_start,\r
226                                 apr_off_t original_length,\r
227                                 apr_off_t modified_start,\r
228                                 apr_off_t modified_length,\r
229                                 apr_off_t latest_start,\r
230                                 apr_off_t latest_length);\r
231 \r
232   /**\r
233    * If doing a two-way diff, then an *conflicting* data range was found\r
234    * between the "original" and "modified" datasources.  Specifically,\r
235    * the conflict starts at @a original_start and goes for @a original_length\r
236    * tokens in the original data, and at @a modified_start for\r
237    * @a modified_length tokens in the modified data.\r
238    *\r
239    * If doing a three-way diff, then an identical data range was discovered\r
240    * between the "original" and "latest" datasources, but this conflicts with\r
241    * a range in the "modified" datasource.\r
242    */\r
243   svn_error_t *(*output_diff_modified)(void *output_baton,\r
244                                        apr_off_t original_start,\r
245                                        apr_off_t original_length,\r
246                                        apr_off_t modified_start,\r
247                                        apr_off_t modified_length,\r
248                                        apr_off_t latest_start,\r
249                                        apr_off_t latest_length);\r
250 \r
251   /* ------ The following callbacks are used by three-way diffs only --- */\r
252 \r
253   /** An identical data range was discovered between the "original" and\r
254    * "modified" datasources, but this conflicts with a range in the\r
255    * "latest" datasource.\r
256    */\r
257   svn_error_t *(*output_diff_latest)(void *output_baton,\r
258                                      apr_off_t original_start,\r
259                                      apr_off_t original_length,\r
260                                      apr_off_t modified_start,\r
261                                      apr_off_t modified_length,\r
262                                      apr_off_t latest_start,\r
263                                      apr_off_t latest_length);\r
264 \r
265   /** An identical data range was discovered between the "modified" and\r
266    * "latest" datasources, but this conflicts with a range in the\r
267    * "original" datasource.\r
268    */\r
269   svn_error_t *(*output_diff_common)(void *output_baton,\r
270                                      apr_off_t original_start,\r
271                                      apr_off_t original_length,\r
272                                      apr_off_t modified_start,\r
273                                      apr_off_t modified_length,\r
274                                      apr_off_t latest_start,\r
275                                      apr_off_t latest_length);\r
276 \r
277   /** All three datasources have conflicting data ranges.  The range\r
278    * @a latest_start, @a latest_length in the "latest" datasource conflicts\r
279    * with the range @a original_start, @a original_length in the "original"\r
280    * datasource, and also conflicts with the range @a modified_start,\r
281    * @a modified_length in the "modified" datasource.\r
282    * If there are common ranges in the "modified" and "latest" datasources\r
283    * in this conflicting range, @a resolved_diff will contain a diff\r
284    * which can be used to retrieve the common and conflicting ranges.\r
285    */\r
286   svn_error_t *(*output_conflict)(void *output_baton,\r
287                                   apr_off_t original_start,\r
288                                   apr_off_t original_length,\r
289                                   apr_off_t modified_start,\r
290                                   apr_off_t modified_length,\r
291                                   apr_off_t latest_start,\r
292                                   apr_off_t latest_length,\r
293                                   svn_diff_t *resolved_diff);\r
294 } svn_diff_output_fns_t;\r
295 \r
296 /** Style for displaying conflicts during diff3 output.\r
297  *\r
298  * @since New in 1.6.\r
299  */\r
300 typedef enum svn_diff_conflict_display_style_t\r
301 {\r
302   /** Display modified and latest, with conflict markers. */\r
303   svn_diff_conflict_display_modified_latest,\r
304 \r
305   /** Like svn_diff_conflict_display_modified_latest, but with an\r
306       extra effort to identify common sequences between modified and\r
307       latest. */\r
308   svn_diff_conflict_display_resolved_modified_latest,\r
309 \r
310   /** Display modified, original, and latest, with conflict\r
311       markers. */\r
312   svn_diff_conflict_display_modified_original_latest,\r
313 \r
314   /** Just display modified, with no markers. */\r
315   svn_diff_conflict_display_modified,\r
316 \r
317   /** Just display latest, with no markers. */\r
318   svn_diff_conflict_display_latest,\r
319 \r
320   /** Like svn_diff_conflict_display_modified_original_latest, but\r
321       *only* showing conflicts. */\r
322   svn_diff_conflict_display_only_conflicts\r
323 } svn_diff_conflict_display_style_t;\r
324 \r
325 \r
326 /** Given a vtable of @a output_fns/@a output_baton for consuming\r
327  * differences, output the differences in @a diff.\r
328  */\r
329 svn_error_t *\r
330 svn_diff_output(svn_diff_t *diff,\r
331                 void *output_baton,\r
332                 const svn_diff_output_fns_t *output_fns);\r
333 \r
334 \r
335 \f\r
336 /* Diffs on files */\r
337 \r
338 /** To what extent whitespace should be ignored when comparing lines.\r
339  *\r
340  * @since New in 1.4.\r
341  */\r
342 typedef enum svn_diff_file_ignore_space_t\r
343 {\r
344   /** Ignore no whitespace. */\r
345   svn_diff_file_ignore_space_none,\r
346 \r
347   /** Ignore changes in sequences of whitespace characters, treating each\r
348    * sequence of whitespace characters as a single space. */\r
349   svn_diff_file_ignore_space_change,\r
350 \r
351   /** Ignore all whitespace characters. */\r
352   svn_diff_file_ignore_space_all\r
353 } svn_diff_file_ignore_space_t;\r
354 \r
355 /** Options to control the behaviour of the file diff routines.\r
356  *\r
357  * @since New in 1.4.\r
358  *\r
359  * @note This structure may be extended in the future, so to preserve binary\r
360  * compatibility, users must not allocate structs of this type themselves.\r
361  * @see svn_diff_file_options_create().\r
362  *\r
363  * @note Although its name suggests otherwise, this structure is used to\r
364  *       pass options to file as well as in-memory diff functions.\r
365  */\r
366 typedef struct svn_diff_file_options_t\r
367 {\r
368   /** To what extent whitespace should be ignored when comparing lines.\r
369    * The default is @c svn_diff_file_ignore_space_none. */\r
370   svn_diff_file_ignore_space_t ignore_space;\r
371   /** Whether to treat all end-of-line markers the same when comparing lines.\r
372    * The default is @c FALSE. */\r
373   svn_boolean_t ignore_eol_style;\r
374   /** Whether the '@@' lines of the unified diff output should include a prefix\r
375     * of the nearest preceding line that starts with a character that might be\r
376     * the initial character of a C language identifier.  The default is\r
377     * @c FALSE.\r
378     */\r
379   svn_boolean_t show_c_function;\r
380 } svn_diff_file_options_t;\r
381 \r
382 /** Allocate a @c svn_diff_file_options_t structure in @a pool, initializing\r
383  * it with default values.\r
384  *\r
385  * @since New in 1.4.\r
386  */\r
387 svn_diff_file_options_t *\r
388 svn_diff_file_options_create(apr_pool_t *pool);\r
389 \r
390 /**\r
391  * Parse @a args, an array of <tt>const char *</tt> command line switches\r
392  * and adjust @a options accordingly.  @a options is assumed to be initialized\r
393  * with default values.  @a pool is used for temporary allocation.\r
394  *\r
395  * @since New in 1.4.\r
396  *\r
397  * The following options are supported:\r
398  * - --ignore-space-change, -b\r
399  * - --ignore-all-space, -w\r
400  * - --ignore-eol-style\r
401  * - --unified, -u (for compatibility, does nothing).\r
402  */\r
403 #if 0\r
404 svn_error_t *\r
405 svn_diff_file_options_parse(svn_diff_file_options_t *options,\r
406                             const apr_array_header_t *args,\r
407                             apr_pool_t *pool);\r
408 #endif\r
409 \r
410 /** A convenience function to produce a diff between two files.\r
411  *\r
412  * @since New in 1.4.\r
413  *\r
414  * Return a diff object in @a *diff (allocated from @a pool) that represents\r
415  * the difference between an @a original file and @a modified file.\r
416  * (The file arguments must be full paths to the files.)\r
417  *\r
418  * Compare lines according to the relevant fields of @a options.\r
419  */\r
420 svn_error_t *\r
421 svn_diff_file_diff_2(svn_diff_t **diff,\r
422                      const char *original,\r
423                      const char *modified,\r
424                      const svn_diff_file_options_t *options,\r
425                      apr_pool_t *pool);\r
426 \r
427 /** Similar to svn_file_diff_2(), but with @a options set to a struct with\r
428  * default options.\r
429  *\r
430  * @deprecated Provided for backwards compatibility with the 1.3 API.\r
431  */\r
432 SVN_DEPRECATED\r
433 svn_error_t *\r
434 svn_diff_file_diff(svn_diff_t **diff,\r
435                    const char *original,\r
436                    const char *modified,\r
437                    apr_pool_t *pool);\r
438 \r
439 /** A convenience function to produce a diff between three files.\r
440  *\r
441  * @since New in 1.4.\r
442  *\r
443  * Return a diff object in @a *diff (allocated from @a pool) that represents\r
444  * the difference between an @a original file, @a modified file, and @a latest\r
445  * file.\r
446  *\r
447  * Compare lines according to the relevant fields of @a options.\r
448  */\r
449 svn_error_t *\r
450 svn_diff_file_diff3_2(svn_diff_t **diff,\r
451                       const char *original,\r
452                       const char *modified,\r
453                       const char *latest,\r
454                       const svn_diff_file_options_t *options,\r
455                       apr_pool_t *pool);\r
456 \r
457 /** Similar to svn_diff_file_diff3_2(), but with @a options set to a struct\r
458  * with default options.\r
459  *\r
460  * @deprecated Provided for backwards compatibility with the 1.3 API.\r
461  */\r
462 SVN_DEPRECATED\r
463 svn_error_t *\r
464 svn_diff_file_diff3(svn_diff_t **diff,\r
465                     const char *original,\r
466                     const char *modified,\r
467                     const char *latest,\r
468                     apr_pool_t *pool);\r
469 \r
470 /** A convenience function to produce a diff between four files.\r
471  *\r
472  * @since New in 1.4.\r
473  *\r
474  * Return a diff object in @a *diff (allocated from @a pool) that represents\r
475  * the difference between an @a original file, @a modified file, @a latest\r
476  * and @a ancestor file. (The file arguments must be full paths to the files.)\r
477  *\r
478  * Compare lines according to the relevant fields of @a options.\r
479  */\r
480 svn_error_t *\r
481 svn_diff_file_diff4_2(svn_diff_t **diff,\r
482                       const char *original,\r
483                       const char *modified,\r
484                       const char *latest,\r
485                       const char *ancestor,\r
486                       const svn_diff_file_options_t *options,\r
487                       apr_pool_t *pool);\r
488 \r
489 /** Simliar to svn_file_diff4_2(), but with @a options set to a struct with\r
490  * default options.\r
491  *\r
492  * @deprecated Provided for backwards compatibility with the 1.3 API.\r
493  */\r
494 SVN_DEPRECATED\r
495 svn_error_t *\r
496 svn_diff_file_diff4(svn_diff_t **diff,\r
497                     const char *original,\r
498                     const char *modified,\r
499                     const char *latest,\r
500                     const char *ancestor,\r
501                     apr_pool_t *pool);\r
502 \r
503 /** A convenience function to produce unified diff output from the\r
504  * diff generated by svn_diff_file_diff().\r
505  *\r
506  * @since New in 1.5.\r
507  *\r
508  * Output a @a diff between @a original_path and @a modified_path in unified\r
509  * context diff format to @a output_stream.  Optionally supply\r
510  * @a original_header and/or @a modified_header to be displayed in the header\r
511  * of the output.  If @a original_header or @a modified_header is @c NULL, a\r
512  * default header will be displayed, consisting of path and last modified time.\r
513  * Output all headers and markers in @a header_encoding.  If @a relative_to_dir\r
514  * is not @c NULL, the @a original_path and @a modified_path will have the\r
515  * @a relative_to_dir stripped from the front of the respective paths.  If\r
516  * @a relative_to_dir is @c NULL, paths will be not be modified.  If\r
517  * @a relative_to_dir is not @c NULL but @a relative_to_dir is not a parent\r
518  * path of the target, an error is returned. Finally, if @a relative_to_dir\r
519  * is a URL, an error will be returned.\r
520  */\r
521 svn_error_t *\r
522 svn_diff_file_output_unified3(svn_stream_t *output_stream,\r
523                               svn_diff_t *diff,\r
524                               const char *original_path,\r
525                               const char *modified_path,\r
526                               const char *original_header,\r
527                               const char *modified_header,\r
528                               const char *header_encoding,\r
529                               const char *relative_to_dir,\r
530                               svn_boolean_t show_c_function,\r
531                               apr_pool_t *pool);\r
532 \r
533 /** Similar to svn_diff_file_output_unified3(), but with @a relative_to_dir\r
534  * set to NULL and @a show_c_function to false.\r
535  *\r
536  * @deprecated Provided for backwards compatibility with the 1.3 API.\r
537  */\r
538 SVN_DEPRECATED\r
539 svn_error_t *\r
540 svn_diff_file_output_unified2(svn_stream_t *output_stream,\r
541                               svn_diff_t *diff,\r
542                               const char *original_path,\r
543                               const char *modified_path,\r
544                               const char *original_header,\r
545                               const char *modified_header,\r
546                               const char *header_encoding,\r
547                               apr_pool_t *pool);\r
548 \r
549 /** Similar to svn_diff_file_output_unified2(), but with @a header_encoding\r
550  * set to @c APR_LOCALE_CHARSET.\r
551  *\r
552  * @deprecated Provided for backward compatibility with the 1.2 API.\r
553  */\r
554 SVN_DEPRECATED\r
555 svn_error_t *\r
556 svn_diff_file_output_unified(svn_stream_t *output_stream,\r
557                              svn_diff_t *diff,\r
558                              const char *original_path,\r
559                              const char *modified_path,\r
560                              const char *original_header,\r
561                              const char *modified_header,\r
562                              apr_pool_t *pool);\r
563 \r
564 \r
565 /** A convenience function to produce diff3 output from the\r
566  * diff generated by svn_diff_file_diff3().\r
567  *\r
568  * Output a @a diff between @a original_path, @a modified_path and\r
569  * @a latest_path in merged format to @a output_stream.  Optionally supply\r
570  * @a conflict_modified, @a conflict_original, @a conflict_separator and/or\r
571  * @a conflict_latest to be displayed as conflict markers in the output.\r
572  * If @a conflict_original, @a conflict_modified, @a conflict_latest and/or\r
573  * @a conflict_separator is @c NULL, a default marker will be displayed.\r
574  * @a conflict_style dictates how conflicts are displayed.\r
575  *\r
576  * @since New in 1.6.\r
577  */\r
578 svn_error_t *\r
579 svn_diff_file_output_merge2(svn_stream_t *output_stream,\r
580                             svn_diff_t *diff,\r
581                             const char *original_path,\r
582                             const char *modified_path,\r
583                             const char *latest_path,\r
584                             const char *conflict_original,\r
585                             const char *conflict_modified,\r
586                             const char *conflict_latest,\r
587                             const char *conflict_separator,\r
588                             svn_diff_conflict_display_style_t conflict_style,\r
589                             apr_pool_t *pool);\r
590 \r
591 \r
592 /** Similar to svn_diff_file_output_merge2, but with @a\r
593  * display_original_in_conflict and @a display_resolved_conflicts\r
594  * booleans instead of the @a conflict_style enum.\r
595  *\r
596  * If both booleans are false, acts like\r
597  * svn_diff_conflict_display_modified_latest; if @a\r
598  * display_original_in_conflict is true, acts like\r
599  * svn_diff_conflict_display_modified_original_latest; if @a\r
600  * display_resolved_conflicts is true, acts like\r
601  * svn_diff_conflict_display_resolved_modified_latest.  The booleans\r
602  * may not both be true.\r
603  *\r
604  * @deprecated Provided for backward compatibility with the 1.5 API.\r
605  */\r
606 SVN_DEPRECATED\r
607 svn_error_t *\r
608 svn_diff_file_output_merge(svn_stream_t *output_stream,\r
609                            svn_diff_t *diff,\r
610                            const char *original_path,\r
611                            const char *modified_path,\r
612                            const char *latest_path,\r
613                            const char *conflict_original,\r
614                            const char *conflict_modified,\r
615                            const char *conflict_latest,\r
616                            const char *conflict_separator,\r
617                            svn_boolean_t display_original_in_conflict,\r
618                            svn_boolean_t display_resolved_conflicts,\r
619                            apr_pool_t *pool);\r
620 \r
621 \r
622 \f\r
623 /* Diffs on in-memory structures */\r
624 \r
625 /** Generate @a diff output from the @a original and @a modified\r
626  * in-memory strings.  @a diff will be allocated from @a pool.\r
627  *\r
628  * @since New in 1.5.\r
629  */\r
630 #if 0\r
631 svn_error_t *\r
632 svn_diff_mem_string_diff(svn_diff_t **diff,\r
633                          const svn_string_t *original,\r
634                          const svn_string_t *modified,\r
635                          const svn_diff_file_options_t *options,\r
636                          apr_pool_t *pool);\r
637 \r
638 #endif\r
639 /** Generate @a diff output from the @a orginal, @a modified and @a latest\r
640  * in-memory strings.  @a diff will be allocated in @a pool.\r
641  *\r
642  * @since New in 1.5.\r
643  */\r
644 #if 0\r
645 svn_error_t *\r
646 svn_diff_mem_string_diff3(svn_diff_t **diff,\r
647                           const svn_string_t *original,\r
648                           const svn_string_t *modified,\r
649                           const svn_string_t *latest,\r
650                           const svn_diff_file_options_t *options,\r
651                           apr_pool_t *pool);\r
652 #endif\r
653 \r
654 /** Generate @a diff output from the @a original, @a modified and @a latest\r
655  * in-memory strings, using @a ancestor.  @a diff will be allocated in @a pool.\r
656  *\r
657  * @since New in 1.5.\r
658  */\r
659 #if 0\r
660 svn_error_t *\r
661 svn_diff_mem_string_diff4(svn_diff_t **diff,\r
662                           const svn_string_t *original,\r
663                           const svn_string_t *modified,\r
664                           const svn_string_t *latest,\r
665                           const svn_string_t *ancestor,\r
666                           const svn_diff_file_options_t *options,\r
667                           apr_pool_t *pool);\r
668 #endif\r
669 \r
670 /** Outputs the @a diff object generated by svn_diff_mem_string_diff()\r
671  * in unified diff format on @a output_stream, using @a original\r
672  * and @a modified for the text in the output.\r
673  * Outputs the header and markers in @a header_encoding.\r
674  *\r
675  * @a original_header and @a modified header are\r
676  * used to fill the field after the "---" and "+++" header markers.\r
677  *\r
678  * @since New in 1.5.\r
679  */\r
680 #if 0\r
681 svn_error_t *\r
682 svn_diff_mem_string_output_unified(svn_stream_t *output_stream,\r
683                                    svn_diff_t *diff,\r
684                                    const char *original_header,\r
685                                    const char *modified_header,\r
686                                    const char *header_encoding,\r
687                                    const svn_string_t *original,\r
688                                    const svn_string_t *modified,\r
689                                    apr_pool_t *pool);\r
690 #endif\r
691 /** Output the @a diff generated by svn_diff_mem_string_diff3() in diff3\r
692  * format on @a output_stream, using @a original, @a modified and @a latest\r
693  * for content changes.\r
694  *\r
695  * Use the conflict markers @a conflict_original, @a conflict_modified,\r
696  * @a conflict_latest and @a conflict_separator or the default one for\r
697  * each of these if @c NULL is passed.\r
698  *\r
699  * @a conflict_style dictates how conflicts are displayed.\r
700  *\r
701  * @since New in 1.6.\r
702  */\r
703 #if 0\r
704 svn_error_t *\r
705 svn_diff_mem_string_output_merge2(svn_stream_t *output_stream,\r
706                                   svn_diff_t *diff,\r
707                                   const svn_string_t *original,\r
708                                   const svn_string_t *modified,\r
709                                   const svn_string_t *latest,\r
710                                   const char *conflict_original,\r
711                                   const char *conflict_modified,\r
712                                   const char *conflict_latest,\r
713                                   const char *conflict_separator,\r
714                                   svn_diff_conflict_display_style_t style,\r
715                                   apr_pool_t *pool);\r
716 #endif\r
717 /** Similar to svn_diff_mem_string_output_merge2, but with @a\r
718  * display_original_in_conflict and @a display_resolved_conflicts\r
719  * booleans instead of the @a conflict_style enum.\r
720  *\r
721  * If both booleans are false, acts like\r
722  * svn_diff_conflict_display_modified_latest; if @a\r
723  * display_original_in_conflict is true, acts like\r
724  * svn_diff_conflict_display_modified_original_latest; if @a\r
725  * display_resolved_conflicts is true, acts like\r
726  * svn_diff_conflict_display_resolved_modified_latest.  The booleans\r
727  * may not both be true.\r
728  *\r
729  * @deprecated Provided for backward compatibility with the 1.5 API.\r
730  */\r
731 #if 0\r
732 SVN_DEPRECATED\r
733 svn_error_t *\r
734 svn_diff_mem_string_output_merge(svn_stream_t *output_stream,\r
735                                  svn_diff_t *diff,\r
736                                  const svn_string_t *original,\r
737                                  const svn_string_t *modified,\r
738                                  const svn_string_t *latest,\r
739                                  const char *conflict_original,\r
740                                  const char *conflict_modified,\r
741                                  const char *conflict_latest,\r
742                                  const char *conflict_separator,\r
743                                  svn_boolean_t display_original_in_conflict,\r
744                                  svn_boolean_t display_resolved_conflicts,\r
745                                  apr_pool_t *pool);\r
746 \r
747 #endif\r
748 #ifdef __cplusplus\r
749 }\r
750 #endif /* __cplusplus */\r
751 \r
752 #endif /* SVN_DIFF_H */\r