Subversion
Typedefs | Functions
Properties
Working copy management

Typedefs

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.

Functions

svn_error_tsvn_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.
svn_error_tsvn_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_tsvn_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.
svn_error_tsvn_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.
svn_error_tsvn_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.
svn_error_tsvn_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.
svn_error_tsvn_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 cancelation.
svn_error_tsvn_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_error_tsvn_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_boolean_t svn_wc_is_normal_prop (const char *name)
 Return TRUE iff name is a 'normal' property name.
svn_boolean_t svn_wc_is_wc_prop (const char *name)
 Return TRUE iff name is a 'wc' property name.
svn_boolean_t svn_wc_is_entry_prop (const char *name)
 Return TRUE iff name is a 'entry' property name.
svn_error_tsvn_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.

Typedef Documentation

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.)

Definition at line 6020 of file svn_wc.h.


Function Documentation

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. If skip_some_checks is TRUE, only some validity checks are taken.

Some validity checks require access to the contents and MIME type of the target if it is a file; they will call prop_getter with getter_baton, which then needs to set the MIME type and print the contents of the file to the given stream.

path should be the path of the file in question; it is only used for error messages.

### This is not actually related to the WC, but it does need to call ### svn_wc_parse_externals_description2.

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.

Since:
New in 1.7.
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:

  • 'svn:wc:' ==> a wcprop, stored/accessed separately via different API.
  • 'svn:entry:' ==> an "entry" prop, shunted into the 'entries' file.

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_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.

Deprecated:
Provided for backwards compatibility with the 1.6 API.
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

Since:
New in 1.7.
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.

Deprecated:
Provided for backwards compatibility with the 1.6 API.
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.

Since:
New in 1.7.
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.

Deprecated:
Provided for backward compatibility with the 1.1 API.
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.

Since:
New in 1.2.
Deprecated:
Provided for backwards compatibility with the 1.5 API.
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 cancelation.

Since:
New in 1.6.
Deprecated:
Provided for backwards compatibility with the 1.6 API.
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.

If skip_checks is TRUE, do no validity checking. But if skip_checks is FALSE, and name is not a valid property for path, return an error, 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).

depth follows the usual semeatic for depth. If the property is a wc property, depth must be svn_depth_empty.

name may be a wc property or a regular property; but if it is an entry property, return the error SVN_ERR_BAD_PROP_KIND, even if skip_checks is TRUE.

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.

Since:
New in 1.7.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines