svn_wc_prop_set4

Function svn_wc_prop_set4 

Source
pub unsafe extern "C" fn svn_wc_prop_set4(
    wc_ctx: *mut svn_wc_context_t,
    local_abspath: *const c_char,
    name: *const c_char,
    value: *const svn_string_t,
    depth: svn_depth_t,
    skip_checks: svn_boolean_t,
    changelist_filter: *const apr_array_header_t,
    cancel_func: svn_cancel_func_t,
    cancel_baton: *mut c_void,
    notify_func: svn_wc_notify_func2_t,
    notify_baton: *mut c_void,
    scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Set property @a name to @a value for @a local_abspath, or if @a value is NULL, remove property @a name from @a local_abspath. Use @a wc_ctx to access @a local_abspath.

@a name may be a regular property or a “wc property”. If @a name is an “entry property”, return the error #SVN_ERR_BAD_PROP_KIND (even if @a skip_checks is TRUE).

If @a name is a “wc property”, then just update the WC DAV cache for @a local_abspath with @a name and @a value. In this case, @a depth must be #svn_depth_empty.

The rest of this description applies when @a name is a regular property.

If @a name is a name in the reserved “svn:” name space, and @a value is non-null, then canonicalize the property value and check the property name and value as documented for svn_wc_canonicalize_svn_prop(). @a skip_checks controls the level of checking as documented there.

Return an error if the canonicalization or the check fails. The error will be either #SVN_ERR_ILLEGAL_TARGET (if the property is not appropriate for @a path), or #SVN_ERR_BAD_MIME_TYPE (if @a name is “svn:mime-type”, but @a value is not a valid mime-type).

§That is not currently right – several other errors can be raised.

@a depth follows the usual semantics for depth.

@a changelist_filter is an array of const char * changelist names, used as a restrictive filter on items whose properties are set; that is, don’t set properties on any item unless it’s a member of one of those changelists. If @a changelist_filter is empty (or altogether @c NULL), no changelist filtering occurs.

If @a cancel_func is non-NULL, then it will be invoked (with the @a cancel_baton value passed) during the processing of the property set (i.e. when @a depth indicates some amount of recursion).

For each file or directory operated on, @a notify_func will be called with its path and the @a notify_baton. @a notify_func may be @c NULL if you are not interested in this information.

Use @a scratch_pool for temporary allocation.

@note If the caller is setting both svn:mime-type and svn:eol-style in separate calls, and @a skip_checks is false, there is an ordering dependency between them, as the validity check for svn:eol-style makes use of the current value of svn:mime-type.

§The error code on validity check failure should be specified, and

should be a single code or a very small set of possibilities.

@since New in 1.7.