Main Page   Modules   Data Structures   File List   Data Fields  

property functions

Properties. More...

Functions

svn_error_tsvn_client_propset2 (const char *propname, const svn_string_t *propval, const char *target, svn_boolean_t recurse, svn_boolean_t skip_checks, svn_client_ctx_t *ctx, apr_pool_t *pool)
 
Since:
New in 1.2.
More...


svn_error_tsvn_client_propset (const char *propname, const svn_string_t *propval, const char *target, svn_boolean_t recurse, apr_pool_t *pool)
svn_error_tsvn_client_revprop_set (const char *propname, const svn_string_t *propval, const char *URL, const svn_opt_revision_t *revision, svn_revnum_t *set_rev, svn_boolean_t force, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Set propname to propval on revision revision in the repository represented by URL. More...

svn_error_tsvn_client_propget2 (apr_hash_t **props, const char *propname, const char *target, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
 
Since:
New in 1.2.
More...


svn_error_tsvn_client_propget (apr_hash_t **props, const char *propname, const char *target, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
svn_error_tsvn_client_revprop_get (const char *propname, svn_string_t **propval, const char *URL, const svn_opt_revision_t *revision, svn_revnum_t *set_rev, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Set *propval to the value of propname on revision revision in the repository represented by URL. More...

svn_error_tsvn_client_proplist2 (apr_array_header_t **props, const char *target, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
 
Since:
New in 1.2.
More...


svn_error_tsvn_client_proplist (apr_array_header_t **props, const char *target, const svn_opt_revision_t *revision, svn_boolean_t recurse, svn_client_ctx_t *ctx, apr_pool_t *pool)
svn_error_tsvn_client_revprop_list (apr_hash_t **props, const char *URL, const svn_opt_revision_t *revision, svn_revnum_t *set_rev, svn_client_ctx_t *ctx, apr_pool_t *pool)
 Set *props to a hash of the revision props attached to revision in the repository represented by URL. More...


Detailed Description

Properties.

Note that certain svn-controlled properties must always have their values set and stored in UTF8 with LF line endings. When retrieving these properties, callers must convert the values back to native locale and native line-endings before displaying them to the user. For help with this task, see svn_prop_needs_translation, svn_subst_translate_string, and svn_subst_detranslate_string.


Function Documentation

svn_error_t* svn_client_propget apr_hash_t **    props,
const char *    propname,
const char *    target,
const svn_opt_revision_t   revision,
svn_boolean_t    recurse,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Deprecated:
Provided for backward compatibility with the 1.1 API.
Similar to svn_client_propget2, except that the peg revision is always the same as revision.

svn_error_t* svn_client_propget2 apr_hash_t **    props,
const char *    propname,
const char *    target,
const svn_opt_revision_t   peg_revision,
const svn_opt_revision_t   revision,
svn_boolean_t    recurse,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Since:
New in 1.2.

Set *props to a hash table whose keys are `char *' paths, prefixed by target (a working copy path or a URL), of items on which property propname is set, and whose values are `svn_string_t *' representing the property value for propname at that path.

Allocate *props, its keys, and its values in pool.

Don't store any path, not even target, if it does not have a property named propname.

If revision->kind is svn_opt_revision_unspecified, then: get properties from the working copy if target is a working copy path, or from the repository head if target is a URL. Else get the properties as of revision. The actual node revision selected is determined by the path as it exists in peg_revision. If peg_revision->kind is svn_opt_revision_unspecified, then it defaults to svn_opt_revision_head for URLs or svn_opt_revision_working for WC targets. Use the authentication baton in ctx for authentication if contacting the repository.

If target is a file or recurse is false, *props will have at most one element.

If error, don't touch *props, otherwise *props is a hash table even if empty.

svn_error_t* svn_client_proplist apr_array_header_t **    props,
const char *    target,
const svn_opt_revision_t   revision,
svn_boolean_t    recurse,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Deprecated:
Provided for backward compatibility with the 1.1 API.
Similar to svn_client_proplist2, except that the peg revision is always the same as revision.

svn_error_t* svn_client_proplist2 apr_array_header_t **    props,
const char *    target,
const svn_opt_revision_t   peg_revision,
const svn_opt_revision_t   revision,
svn_boolean_t    recurse,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Since:
New in 1.2.

Set *props to the regular properties of target, a URL or working copy path.

Each element of the returned array is (svn_client_proplist_item_t *). For each item, item->node_name contains the name relative to the same base as target, and item->prop_hash maps (const char *) property names to (svn_string_t *) values.

Allocate *props and its contents in pool.

If revision->kind is svn_opt_revision_unspecified, then get properties from the working copy, if target is a working copy path, or from the repository head if target is a URL. Else get the properties as of revision. The actual node revision selected is determined by the path as it exists in peg_revision. If peg_revision is svn_opt_revision_unspecified, then it defaults to svn_opt_revision_head for URLs or svn_opt_revision_working for WC targets. Use the authentication baton cached in ctx for authentication if contacting the repository.

If recurse is false, or target is a file, *props will contain only a single element. Otherwise, it will contain one element for each versioned entry below (and including) target.

If target is not found, return the error SVN_ERR_ENTRY_NOT_FOUND.

svn_error_t* svn_client_propset const char *    propname,
const svn_string_t   propval,
const char *    target,
svn_boolean_t    recurse,
apr_pool_t *    pool
 

Deprecated:
Provided for backward compatibility with the 1.1 API.
Like svn_client_propset2(), but with skip_checks always false and a newly created ctx.

svn_error_t* svn_client_propset2 const char *    propname,
const svn_string_t   propval,
const char *    target,
svn_boolean_t    recurse,
svn_boolean_t    skip_checks,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Since:
New in 1.2.

Set propname to propval on target. If recurse is true, then propname will be set on recursively on target and all children. If recurse is false, and target is a directory, propname will be set on _only_ target.

A propval of NULL will delete the property.

If propname is an svn-controlled property (i.e. prefixed with SVN_PROP_PREFIX), then the caller is responsible for ensuring that the value is UTF8-encoded and uses LF line-endings.

If skip_checks is true, do no validity checking. But if skip_checks is false, and propname is not a valid property for target, return an error, either SVN_ERR_ILLEGAL_TARGET (if the property is not appropriate for target), or SVN_ERR_BAD_MIME_TYPE (if propname is "svn:mime-type", but propval is not a valid mime-type).

If ctx->cancel_func is non-null, invoke it passing ctx->cancel_baton at various places during the operation.

Use pool for all memory allocation.

svn_error_t* svn_client_revprop_get const char *    propname,
svn_string_t **    propval,
const char *    URL,
const svn_opt_revision_t   revision,
svn_revnum_t *    set_rev,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Set *propval to the value of propname on revision revision in the repository represented by URL.

Use the authentication baton in ctx for authentication, and pool for all memory allocation. Return the actual rev queried in *set_rev.

Note that unlike its cousin svn_client_propget, this routine doesn't affect the working copy at all; it's a pure network operation that queries an *unversioned* property attached to a revision. This can query log messages, dates, authors, and the like.

svn_error_t* svn_client_revprop_list apr_hash_t **    props,
const char *    URL,
const svn_opt_revision_t   revision,
svn_revnum_t *    set_rev,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Set *props to a hash of the revision props attached to revision in the repository represented by URL.

Use the authentication baton cached in ctx for authentication, and pool for all memory allocation. Return the actual rev queried in *set_rev.

The allocated hash maps (const char *) property names to (svn_string_t *) property values.

Note that unlike its cousin svn_client_proplist, this routine doesn't read a working copy at all; it's a pure network operation that reads *unversioned* properties attached to a revision.

svn_error_t* svn_client_revprop_set const char *    propname,
const svn_string_t   propval,
const char *    URL,
const svn_opt_revision_t   revision,
svn_revnum_t *    set_rev,
svn_boolean_t    force,
svn_client_ctx_t   ctx,
apr_pool_t *    pool
 

Set propname to propval on revision revision in the repository represented by URL.

Use the authentication baton in ctx for authentication, and pool for all memory allocation. Return the actual rev affected in *set_rev. A propval of NULL will delete the property.

If force is true, allow newlines in the author property.

If propname is an svn-controlled property (i.e. prefixed with SVN_PROP_PREFIX), then the caller is responsible for ensuring that the value UTF8-encoded and uses LF line-endings.

Note that unlike its cousin svn_client_propset2, this routine doesn't affect the working copy at all; it's a pure network operation that changes an *unversioned* property attached to a revision. This can be used to tweak log messages, dates, authors, and the like. Be careful: it's a lossy operation.

Also note that unless the administrator creates a pre-revprop-change hook in the repository, this feature will fail.


Generated on Wed Aug 31 01:47:57 2005 for Subversion by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002