diff options
Diffstat (limited to 'subversion/include/svn_diff.h')
-rw-r--r-- | subversion/include/svn_diff.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/subversion/include/svn_diff.h b/subversion/include/svn_diff.h index d9c7c88..ac9f8fc 100644 --- a/subversion/include/svn_diff.h +++ b/subversion/include/svn_diff.h @@ -279,6 +279,9 @@ svn_diff_contains_diffs(svn_diff_t *diff); * Differences, similarities, and conflicts are described by lining up * "ranges" of data. * + * Any of the function pointers in this vtable may be NULL to ignore the + * corresponding kinds of output. + * * @note These callbacks describe data ranges in units of "tokens". * A "token" is whatever you've defined it to be in your datasource * @c svn_diff_fns_t vtable. @@ -477,6 +480,7 @@ svn_diff_file_options_create(apr_pool_t *pool); * - --ignore-space-change, -b * - --ignore-all-space, -w * - --ignore-eol-style + * - --show-c-function, -p @since New in 1.5. * - --unified, -u (for compatibility, does nothing). */ svn_error_t * @@ -744,17 +748,21 @@ svn_diff_mem_string_diff4(svn_diff_t **diff, /** Outputs the @a diff object generated by svn_diff_mem_string_diff() * in unified diff format on @a output_stream, using @a original * and @a modified for the text in the output. - * A diff header is only written to the output if @a with_diff_header - * is TRUE. + * + * If @a with_diff_header is TRUE, write a diff header ("---" and "+++" + * lines), using @a original_header and @a modified_header to fill the field + * after the "---" and "+++" markers; otherwise @a original_header and + * @a modified_header are ignored and may be NULL. * * Outputs the header and hunk delimiters in @a header_encoding. * A @a hunk_delimiter can optionally be specified. * If @a hunk_delimiter is NULL, use the default hunk delimiter "@@". * - * @a original_header and @a modified header are - * used to fill the field after the "---" and "+++" header markers. + * As a special case, if the hunk delimiter is "##", then for an incomplete + * final line use the text "\ No newline at end of property" instead of + * "\ No newline at end of file". * - * @since New in 1.7. + * @since New in 1.7. Hunk delimiter "##" has the special meaning since 1.8. */ svn_error_t * svn_diff_mem_string_output_unified2(svn_stream_t *output_stream, @@ -839,7 +847,6 @@ svn_diff_mem_string_output_merge(svn_stream_t *output_stream, apr_pool_t *pool); - /* Diff parsing. If you want to apply a patch to a working copy * rather than parse it, see svn_client_patch(). */ @@ -904,8 +911,8 @@ typedef struct svn_diff_hunk_t svn_diff_hunk_t; /** * Allocate @a *stringbuf in @a result_pool, and read into it one line - * of the diff text of @a hunk. The first line returned is the hunk header. - * Any subsequent lines are unidiff data (starting with '+', '-', or ' '). + * of the diff text of @a hunk. The hunk header is not returned only the + * unidiff data lines (starting with '+', '-', or ' ') are returned. * If the @a hunk is being interpreted in reverse (i.e. the reverse * parameter of svn_diff_parse_next_patch() was @c TRUE), the diff * text will be returned in reversed form. @@ -915,6 +922,13 @@ typedef struct svn_diff_hunk_t svn_diff_hunk_t; * hunk does not end with a newline character and @a eol is not NULL. * Temporary allocations will be performed in @a scratch_pool. * + * @note The hunk header information can be retrievied with the following + * functions: + * @see svn_diff_hunk_get_original_start() + * @see svn_diff_hunk_get_original_length() + * @see svn_diff_hunk_get_modified_start() + * @see svn_diff_hunk_get_modified_length() + * * @since New in 1.7. */ svn_error_t * @@ -1044,7 +1058,7 @@ typedef struct svn_patch_t { const char *new_filename; /** - * An array containing an svn_diff_hunk_t object for each hunk parsed + * An array containing an svn_diff_hunk_t * for each hunk parsed * from the patch. */ apr_array_header_t *hunks; @@ -1062,12 +1076,12 @@ typedef struct svn_patch_t { svn_boolean_t reverse; } svn_patch_t; -/* An opaque type representing an open patch file. +/** An opaque type representing an open patch file. * * @since New in 1.7. */ typedef struct svn_patch_file_t svn_patch_file_t; -/* Open @a patch_file at @a local_abspath. +/** Open @a patch_file at @a local_abspath. * Allocate @a patch_file in @a result_pool. * * @since New in 1.7. */ |