GME
13
|
typedef svn_error_t*(* svn_wc_canonicalize_svn_prop_get_file_t)(const svn_string_t **mime_type, svn_stream_t *stream, void *baton, apr_pool_t *pool) |
Callback type used by svn_wc_canonicalize_svn_prop.
If mime_type is non-null, it sets *mime_type to the value of SVN_PROP_MIME_TYPE for the path passed to svn_wc_canonicalize_svn_prop (allocated from pool). If stream is non-null, it writes the contents of the file to stream.
(Currently, this is used if you are attempting to set the SVN_PROP_EOL_STYLE property, to make sure that the value matches the mime type and contents.)
svn_error_t* svn_wc_canonicalize_svn_prop | ( | const svn_string_t ** | propval_p, |
const char * | propname, | ||
const svn_string_t * | propval, | ||
const char * | path, | ||
svn_node_kind_t | kind, | ||
svn_boolean_t | skip_some_checks, | ||
svn_wc_canonicalize_svn_prop_get_file_t | prop_getter, | ||
void * | getter_baton, | ||
apr_pool_t * | pool | ||
) |
Canonicalize the value of an svn:* property propname with value propval.
If the property is not appropriate for a node of kind kind, or is otherwise invalid, throw an error. Otherwise, set *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:
Also, unless skip_some_checks is TRUE:
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 prop_getter with getter_baton. The callback must set the MIME type and/or write the contents of the file to the given stream. If skip_some_checks is true, then prop_getter is not used and may be NULL.
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.
svn_error_t* svn_wc_get_pristine_props | ( | apr_hash_t ** | props, |
svn_wc_context_t * | wc_ctx, | ||
const char * | local_abspath, | ||
apr_pool_t * | result_pool, | ||
apr_pool_t * | scratch_pool | ||
) |
Return the set of "pristine" properties for local_abspath.
There are node states where properties do not make sense. For these cases, NULL will be returned in *props. Otherwise, a hash table will always be returned (but may be empty, indicating no properties).
If the node is locally-added, then *props will be set to NULL since pristine properties are undefined. Note: if this addition is replacing a previously-deleted node, then the replaced node's properties are not available until the addition is reverted.
If the node has been copied (from another node in the repository), then the pristine properties will correspond to those original properties.
If the node is locally-deleted, these properties will correspond to the BASE node's properties, as checked-out from the repository. Note: if this deletion is a child of a copy, then the pristine properties will correspond to that copy's properties, not any potential BASE node. The BASE node's properties will not be accessible until the copy is reverted.
Nodes that are incomplete, excluded, absent, or not present at the node's revision will return NULL in props.
If the node is not versioned, SVN_ERR_WC_PATH_NOT_FOUND will be returned.
props will be allocated in result_pool, and all temporary allocations will be performed in scratch_pool.
svn_boolean_t svn_wc_is_entry_prop | ( | const char * | name | ) |
Return TRUE iff name is a 'entry' property name.
svn_boolean_t svn_wc_is_normal_prop | ( | const char * | name | ) |
Return TRUE iff name is a 'normal' property name. 'Normal' is defined as a user-visible and user-tweakable property that shows up when you fetch a proplist.
The function currently parses the namespace like so:
If these patterns aren't found, then the property is assumed to be Normal.
svn_boolean_t svn_wc_is_wc_prop | ( | const char * | name | ) |
Return TRUE iff name is a 'wc' property name.
SVN_DEPRECATED svn_error_t* svn_wc_prop_get | ( | const svn_string_t ** | value, |
const char * | name, | ||
const char * | path, | ||
svn_wc_adm_access_t * | adm_access, | ||
apr_pool_t * | pool | ||
) |
Similar to svn_wc_prop_get2(), but with a svn_wc_adm_access_t / relative path parameter pair.
When path is not versioned, set *value to NULL.
svn_error_t* svn_wc_prop_get2 | ( | const svn_string_t ** | value, |
svn_wc_context_t * | wc_ctx, | ||
const char * | local_abspath, | ||
const char * | name, | ||
apr_pool_t * | result_pool, | ||
apr_pool_t * | scratch_pool | ||
) |
Set *value to the value of property name for local_abspath, allocating *value in result_pool. If no such prop, set *value to NULL
. name may be a regular or wc property; if it is an entry property, return the error SVN_ERR_BAD_PROP_KIND. wc_ctx is used to access the working copy.
If local_abspath is not a versioned path, return SVN_ERR_WC_PATH_NOT_FOUND
SVN_DEPRECATED svn_error_t* svn_wc_prop_list | ( | apr_hash_t ** | props, |
const char * | path, | ||
svn_wc_adm_access_t * | adm_access, | ||
apr_pool_t * | pool | ||
) |
Similar to svn_wc_prop_list2() but with a svn_wc_adm_access_t / relative path parameter pair.
svn_error_t* svn_wc_prop_list2 | ( | apr_hash_t ** | props, |
svn_wc_context_t * | wc_ctx, | ||
const char * | local_abspath, | ||
apr_pool_t * | result_pool, | ||
apr_pool_t * | scratch_pool | ||
) |
Set *props to a hash table mapping char *
names onto svn_string_t *
values for all the regular properties of local_abspath. Allocate the table, names, and values in result_pool. If the node has no properties, then an empty hash is returned. Use wc_ctx to access the working copy, and scratch_pool for temporary allocations.
If the node does not exist, SVN_ERR_WC_PATH_NOT_FOUND is returned.
SVN_DEPRECATED svn_error_t* svn_wc_prop_set | ( | const char * | name, |
const svn_string_t * | value, | ||
const char * | path, | ||
svn_wc_adm_access_t * | adm_access, | ||
apr_pool_t * | pool | ||
) |
Like svn_wc_prop_set2(), but with skip_checks always FALSE.
SVN_DEPRECATED svn_error_t* svn_wc_prop_set2 | ( | const char * | name, |
const svn_string_t * | value, | ||
const char * | path, | ||
svn_wc_adm_access_t * | adm_access, | ||
svn_boolean_t | skip_checks, | ||
apr_pool_t * | pool | ||
) |
Like svn_wc_prop_set3(), but without the notification callbacks.
SVN_DEPRECATED svn_error_t* svn_wc_prop_set3 | ( | const char * | name, |
const svn_string_t * | value, | ||
const char * | path, | ||
svn_wc_adm_access_t * | adm_access, | ||
svn_boolean_t | skip_checks, | ||
svn_wc_notify_func2_t | notify_func, | ||
void * | notify_baton, | ||
apr_pool_t * | pool | ||
) |
Similar to svn_wc_prop_set4(), but with a svn_wc_adm_access_t / relative path parameter pair, no depth parameter, no changelist filtering (for the depth-based property setting), and no cancellation.
svn_error_t* svn_wc_prop_set4 | ( | svn_wc_context_t * | wc_ctx, |
const char * | local_abspath, | ||
const char * | name, | ||
const svn_string_t * | value, | ||
svn_depth_t | depth, | ||
svn_boolean_t | skip_checks, | ||
const apr_array_header_t * | changelist_filter, | ||
svn_cancel_func_t | cancel_func, | ||
void * | cancel_baton, | ||
svn_wc_notify_func2_t | notify_func, | ||
void * | notify_baton, | ||
apr_pool_t * | scratch_pool | ||
) |
Set property name to value for local_abspath, or if value is NULL, remove property name from local_abspath. Use wc_ctx to access local_abspath.
name may be a regular property or a "wc property". If name is an "entry property", return the error SVN_ERR_BAD_PROP_KIND (even if skip_checks is TRUE).
If name is a "wc property", then just update the WC DAV cache for local_abspath with name and value. In this case, depth must be svn_depth_empty.
The rest of this description applies when name is a regular property.
If name is a name in the reserved "svn:" name space, and value is non-null, then canonicalize the property value and check the property name and value as documented for svn_wc_canonicalize_svn_prop(). 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 path), or SVN_ERR_BAD_MIME_TYPE (if name is "svn:mime-type", but value is not a valid mime-type). ### That is not currently right -- several other errors can be raised.
depth follows the usual semantics for depth.
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 changelist_filter is empty (or altogether NULL
), no changelist filtering occurs.
If cancel_func is non-NULL, then it will be invoked (with the cancel_baton value passed) during the processing of the property set (i.e. when depth indicates some amount of recursion).
For each file or directory operated on, notify_func will be called with its path and the notify_baton. notify_func may be NULL
if you are not interested in this information.
Use scratch_pool for temporary allocation.
### The error code on validity check failure should be specified, and should be a single code or a very small set of possibilities.