Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

svn_props.h File Reference

Subversion properties. More...

#include <apr_pools.h>
#include <apr_tables.h>
#include "svn_string.h"

Go to the source code of this file.

Defines

#define SVN_PROP_PREFIX   "svn:"
 All Subversion property names start with this.
#define SVN_PROP_MIME_TYPE   SVN_PROP_PREFIX "mime-type"
 The mime-type of a given file.
#define SVN_PROP_IGNORE   SVN_PROP_PREFIX "ignore"
 The ignore patterns for a given directory.
#define SVN_PROP_EOL_STYLE   SVN_PROP_PREFIX "eol-style"
 The line ending style for a given file.
#define SVN_PROP_KEYWORDS   SVN_PROP_PREFIX "keywords"
 The "activated" keywords (for keyword substitution) for a given file.
#define SVN_PROP_EXECUTABLE   SVN_PROP_PREFIX "executable"
 Set to either TRUE or FALSE if we want a file to be executable or not.
#define SVN_PROP_EXECUTABLE_VALUE   "*"
 The value to force the executable property to when set.
#define SVN_PROP_NEEDS_LOCK   SVN_PROP_PREFIX "needs-lock"
 Set to TRUE ('*') if we want a file to be set to read-only when not locked.
#define SVN_PROP_NEEDS_LOCK_VALUE   "*"
 The value to force the needs-lock property to when set.
#define SVN_PROP_SPECIAL   SVN_PROP_PREFIX "special"
 Set if the file should be treated as a special file.
#define SVN_PROP_SPECIAL_VALUE   "*"
 The value to force the special property to when set.
#define SVN_PROP_EXTERNALS   SVN_PROP_PREFIX "externals"
 Describes external items to check out into this directory.
#define SVN_PROP_WC_PREFIX   SVN_PROP_PREFIX "wc:"
 The propname *prefix* that makes a propname a "WC property".
#define SVN_PROP_ENTRY_PREFIX   SVN_PROP_PREFIX "entry:"
 Another type of non-user-visible property.
#define SVN_PROP_ENTRY_COMMITTED_REV   SVN_PROP_ENTRY_PREFIX "committed-rev"
 The revision this entry was last committed to on.
#define SVN_PROP_ENTRY_COMMITTED_DATE   SVN_PROP_ENTRY_PREFIX "committed-date"
 The date this entry was last committed to on.
#define SVN_PROP_ENTRY_LAST_AUTHOR   SVN_PROP_ENTRY_PREFIX "last-author"
 The author who last committed to this entry.
#define SVN_PROP_ENTRY_UUID   SVN_PROP_ENTRY_PREFIX "uuid"
 The UUID of this entry's repository.
#define SVN_PROP_ENTRY_LOCK_TOKEN   SVN_PROP_ENTRY_PREFIX "lock-token"
 The lock token for this entry.
#define SVN_PROP_CUSTOM_PREFIX   SVN_PROP_PREFIX "custom:"
 When custom, user-defined properties are passed over the wire, they will have this prefix added to their name.
#define SVN_PROP_REVISION_AUTHOR   SVN_PROP_PREFIX "author"
 The fs revision property that stores a commit's author.
#define SVN_PROP_REVISION_LOG   SVN_PROP_PREFIX "log"
 The fs revision property that stores a commit's log message.
#define SVN_PROP_REVISION_DATE   SVN_PROP_PREFIX "date"
 The fs revision property that stores a commit's date.
#define SVN_PROP_REVISION_ORIG_DATE   SVN_PROP_PREFIX "original-date"
 The fs revision property that stores a commit's "original" date.
#define SVN_PROP_REVISION_AUTOVERSIONED   SVN_PROP_PREFIX "autoversioned"
 The presence of this fs revision property indicates that the revision was automatically generated by the mod_dav_svn autoversioning feature.
#define SVNSYNC_PROP_PREFIX   SVN_PROP_PREFIX "sync-"
 Prefix for all svnsync custom properties.
#define SVNSYNC_PROP_LOCK   SVNSYNC_PROP_PREFIX "lock"
 Used to enforce mutually exclusive destination repository access.
#define SVNSYNC_PROP_FROM_URL   SVNSYNC_PROP_PREFIX "from-url"
 Identifies the repository's source URL.
#define SVNSYNC_PROP_FROM_UUID   SVNSYNC_PROP_PREFIX "from-uuid"
 Identifies the repository's source UUID.
#define SVNSYNC_PROP_LAST_MERGED_REV   SVNSYNC_PROP_PREFIX "last-merged-rev"
 Identifies the last completely mirrored revision.
#define SVNSYNC_PROP_CURRENTLY_COPYING   SVNSYNC_PROP_PREFIX "currently-copying"
 Identifies the revision currently being copied.
#define SVN_PROP_REVISION_ALL_PROPS
 This is a list of all revision properties.

Typedefs

typedef svn_prop_t svn_prop_t
 A general in-memory representation of a single property.
typedef enum svn_prop_kind svn_prop_kind_t
 Subversion distinguishes among several kinds of properties, particularly on the client-side.

Enumerations

enum  svn_prop_kind {
  svn_prop_entry_kind,
  svn_prop_wc_kind,
  svn_prop_regular_kind
}
 Subversion distinguishes among several kinds of properties, particularly on the client-side. More...

Functions

svn_prop_tsvn_prop_dup (const svn_prop_t *prop, apr_pool_t *pool)
 Return a duplicate of prop, allocated in pool.
apr_array_header_t * svn_prop_array_dup (const apr_array_header_t *array, apr_pool_t *pool)
 Duplicate an array of svn_prop_t items using pool.
svn_prop_kind_t svn_property_kind (int *prefix_len, const char *prop_name)
 Return the prop kind of a property named name, and (if prefix_len is non-NULL) set *prefix_len to the length of the prefix of name that was sufficient to distinguish its kind.
svn_boolean_t svn_prop_is_svn_prop (const char *prop_name)
 Return TRUE iff prop_name represents the name of a Subversion property.
svn_boolean_t svn_prop_needs_translation (const char *propname)
 If propname requires that its value be stored as UTF8/LF in the repository, then return TRUE.
svn_error_tsvn_categorize_props (const apr_array_header_t *proplist, apr_array_header_t **entry_props, apr_array_header_t **wc_props, apr_array_header_t **regular_props, apr_pool_t *pool)
 Given a proplist array of svn_prop_t structures, allocate three new arrays in pool.
svn_error_tsvn_prop_diffs (apr_array_header_t **propdiffs, apr_hash_t *target_props, apr_hash_t *source_props, apr_pool_t *pool)
 Given two property hashes (const char *name -> const svn_string_t *value), deduce the differences between them (from source_props -> target_props).


Detailed Description

Subversion properties.

Definition in file svn_props.h.


Typedef Documentation

typedef enum svn_prop_kind svn_prop_kind_t
 

Subversion distinguishes among several kinds of properties, particularly on the client-side.

There is no "unknown" kind; if there's nothing special about a property name, the default category is svn_prop_regular_kind.

typedef struct svn_prop_t svn_prop_t
 

A general in-memory representation of a single property.

Most of the time, property lists will be stored completely in hashes. But sometimes it's useful to have an "ordered" collection of properties, in which case we use an array of these structures.

Also: sometimes we want a list that represents a set of property *changes*, and in this case, an apr_hash_t won't work -- there's no way to represent a property deletion, because we can't store a NULL value in a hash. So instead, we use these structures.


Enumeration Type Documentation

enum svn_prop_kind
 

Subversion distinguishes among several kinds of properties, particularly on the client-side.

There is no "unknown" kind; if there's nothing special about a property name, the default category is svn_prop_regular_kind.

Enumeration values:
svn_prop_entry_kind  In .svn/entries, i.e.

, author, date, etc.

svn_prop_wc_kind  Client-side only, stored by specific RA layer.
svn_prop_regular_kind  Seen if user does "svn proplist"; note that this includes some "svn:" props and all user props, i.e.

ones stored in the repository fs.

Definition at line 80 of file svn_props.h.


Function Documentation

svn_error_t* svn_categorize_props const apr_array_header_t *  proplist,
apr_array_header_t **  entry_props,
apr_array_header_t **  wc_props,
apr_array_header_t **  regular_props,
apr_pool_t *  pool
 

Given a proplist array of svn_prop_t structures, allocate three new arrays in pool.

Categorize each property and then create new svn_prop_t structures in the proper lists. Each new svn_prop_t structure's fields will point to the same data within proplist's structures.

Callers may pass NULL for each of the property lists in which they are uninterested. If no props exist in a certain category, and the property list argument for that category is non-NULL, then that array will come back with ->nelts == 0.

### Hmmm, maybe a better future interface is to return an array of arrays, where the index into the array represents the index into svn_prop_kind_t. That way we can add more prop kinds in the future without changing this interface...

apr_array_header_t* svn_prop_array_dup const apr_array_header_t *  array,
apr_pool_t *  pool
 

Duplicate an array of svn_prop_t items using pool.

Since:
New in 1.3.

svn_error_t* svn_prop_diffs apr_array_header_t **  propdiffs,
apr_hash_t *  target_props,
apr_hash_t *  source_props,
apr_pool_t *  pool
 

Given two property hashes (const char *name -> const svn_string_t *value), deduce the differences between them (from source_props -> target_props).

Return these changes as a series of svn_prop_t structures stored in propdiffs, allocated from pool.

For note, here's a quick little table describing the logic of this routine:

 basehash        localhash         event
 --------        ---------         -----
 value = foo     value = NULL      Deletion occurred.
 value = foo     value = bar       Set occurred (modification)
 value = NULL    value = baz       Set occurred (creation)

svn_prop_t* svn_prop_dup const svn_prop_t prop,
apr_pool_t *  pool
 

Return a duplicate of prop, allocated in pool.

No part of the new structure will be shared with prop.

Since:
New in 1.3.

svn_boolean_t svn_prop_needs_translation const char *  propname  ) 
 

If propname requires that its value be stored as UTF8/LF in the repository, then return TRUE.

Else return FALSE. This is for users of libsvn_client or libsvn_fs, since it their responsibility to do this translation in both directions. (See svn_subst_translate_string()/svn_subst_detranslate_string() for help with this task.)


Generated on Sat Feb 3 13:51:31 2007 for Subversion by  doxygen 1.4.2