svn_wc_translated_file2

Function svn_wc_translated_file2 

Source
pub unsafe extern "C" fn svn_wc_translated_file2(
    xlated_path: *mut *const c_char,
    src: *const c_char,
    versioned_file: *const c_char,
    adm_access: *mut svn_wc_adm_access_t,
    flags: apr_uint32_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Set @a xlated_path to a translated copy of @a src or to @a src itself if no translation is necessary. That is, if @a versioned_file’s properties indicate newline conversion or keyword expansion, point @a *xlated_path to a copy of @a src whose newlines and keywords are converted using the translation as requested by @a flags.

If @a cancel_func is non-NULL, call it with @a cancel_baton to determine if the client has canceled the operation.

When translating to the normal form, inconsistent eol styles will be repaired when appropriate for the given setting. When translating from normal form, no EOL repair is performed (consistency is assumed). This behaviour can be overridden by specifying #SVN_WC_TRANSLATE_FORCE_EOL_REPAIR.

The caller can explicitly request a new file to be returned by setting the #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.

This function is generally used to get a file that can be compared meaningfully against @a versioned_file’s text base, if @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself if @c SVN_WC_TRANSLATE_FROM_NF is specified.

If a new output file is created, it is created in the temp file area belonging to @a versioned_file. By default it will be deleted at pool cleanup. If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the default pool cleanup handler to remove @a *xlated_path is not registered. If the input file is returned as the output, its lifetime is not specified.

If an error is returned, the effect on @a *xlated_path is undefined.

@since New in 1.4 @deprecated Provided for compatibility with the 1.6 API