svn_diff_file_output_unified4

Function svn_diff_file_output_unified4 

Source
pub unsafe extern "C" fn svn_diff_file_output_unified4(
    output_stream: *mut svn_stream_t,
    diff: *mut svn_diff_t,
    original_path: *const c_char,
    modified_path: *const c_char,
    original_header: *const c_char,
    modified_header: *const c_char,
    header_encoding: *const c_char,
    relative_to_dir: *const c_char,
    show_c_function: svn_boolean_t,
    context_size: c_int,
    cancel_func: svn_cancel_func_t,
    cancel_baton: *mut c_void,
    scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

A convenience function to produce unified diff output from the diff generated by svn_diff_file_diff().

Output a @a diff between @a original_path and @a modified_path in unified context diff format to @a output_stream. Optionally supply @a original_header and/or @a modified_header to be displayed in the header of the output. If @a original_header or @a modified_header is @c NULL, a default header will be displayed, consisting of path and last modified time. Output all headers and markers in @a header_encoding. If @a relative_to_dir is not @c NULL, the @a original_path and @a modified_path will have the @a relative_to_dir stripped from the front of the respective paths. If @a relative_to_dir is @c NULL, paths will be not be modified. If @a relative_to_dir is not @c NULL but @a relative_to_dir is not a parent path of the target, an error is returned. Finally, if @a relative_to_dir is a URL, an error will be returned.

If @a context_size is not negative, then this number of context lines will be used in the generated diff output. Otherwise the legacy compile time default will be used.

If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple times while processing larger diffs.

@since New in 1.9.