pub unsafe extern "C" fn svn_wc_canonicalize_svn_prop(
propval_p: *mut *const svn_string_t,
propname: *const c_char,
propval: *const svn_string_t,
path: *const c_char,
kind: svn_node_kind_t,
skip_some_checks: svn_boolean_t,
prop_getter: svn_wc_canonicalize_svn_prop_get_file_t,
getter_baton: *mut c_void,
pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Canonicalize the value of an svn:* property @a propname with value @a propval.
If the property is not appropriate for a node of kind @a kind, or is otherwise invalid, throw an error. Otherwise, set @a *propval_p to a canonicalized version of the property value.
The exact set of canonicalizations and checks may vary across different versions of this API. Currently:
-
svn:executable
-
svn:needs-lock
-
svn:special
- set the value to ‘*’
-
svn:keywords
- strip leading and trailing white space
-
svn:ignore
-
svn:global-ignores
-
svn:auto-props
- add a final a newline character if missing
-
svn:externals
- add a final a newline character if missing
- check for valid syntax
- check for no duplicate entries
-
svn:mergeinfo
- canonicalize
- check for validity
Also, unless @a skip_some_checks is TRUE:
-
svn:eol-style
- strip leading and trailing white space
- check value is recognized
- check file content has a self-consistent EOL style (but not necessarily that it matches @a propval)
-
svn:mime-type
- strip white space
- check for reasonable syntax
The EOL-style check (if not skipped) requires access to the contents and MIME type of the target if it is a file. It will call @a prop_getter with @a getter_baton. The callback must set the MIME type and/or write the contents of the file to the given stream. If @a skip_some_checks is true, then @a prop_getter is not used and may be NULL.
@a path should be the path of the file in question; it is only used for error messages.
§The error code on validity check failure should be specified, and
should be a single code or a very small set of possibilities.
§This is not actually related to the WC, but it does need to call
§svn_wc_parse_externals_description3.
@since New in 1.5.