Subversion
|
Modules | |
Visible properties | |
Visible properties. | |
Invisible properties | |
WC props are props that are invisible to users: they're generated by an RA layer, and stored in secret parts of .svn/. | |
Revision properties | |
These are reserved properties attached to a "revision" object in the repository filesystem. | |
Ephemeral transaction properties | |
These are reserved properties attached to a "transaction" object in the repository filesystem in advance of the pre-commit hook script running on the server, but then automatically removed from the transaction before its promotion to a new revision. | |
Data Structures | |
struct | svn_prop_t |
A general in-memory representation of a single property. More... | |
struct | svn_prop_inherited_item_t |
A structure to represent inherited properties. More... | |
Macros | |
#define | SVN_PROP_PREFIX "svn:" |
All Subversion property names start with this. | |
Typedefs | |
typedef struct svn_prop_t | svn_prop_t |
A general in-memory representation of a single property. More... | |
typedef struct svn_prop_inherited_item_t | svn_prop_inherited_item_t |
A structure to represent inherited properties. More... | |
typedef enum svn_prop_kind | svn_prop_kind_t |
Subversion distinguishes among several kinds of properties, particularly on the client-side. More... | |
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_t * | svn_prop_dup (const svn_prop_t *prop, apr_pool_t *pool) |
Return a duplicate of prop, allocated in pool. More... | |
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. More... | |
apr_array_header_t * | svn_prop_hash_to_array (const apr_hash_t *hash, apr_pool_t *pool) |
Given a hash (keys const char * and values const svn_string_t ) of properties, returns an array of svn_prop_t items using pool. More... | |
apr_hash_t * | svn_prop_array_to_hash (const apr_array_header_t *properties, apr_pool_t *result) |
Given an array of svn_prop_t items, return a hash mapping const char * property names to const svn_string_t * values. More... | |
apr_hash_t * | svn_prop_hash_dup (const apr_hash_t *hash, apr_pool_t *pool) |
Creates a deep copy of hash (keys const char * and values const svn_string_t * ) in pool. More... | |
const char * | svn_prop_get_value (const apr_hash_t *properties, const char *prop_name) |
Return the value of property prop_name as it is in properties, with values const svn_string_t . More... | |
svn_prop_kind_t | svn_property_kind2 (const char *prop_name) |
Return the property kind of a property named prop_name. More... | |
svn_prop_kind_t | svn_property_kind (int *prefix_len, const char *prop_name) |
Return the prop kind of a property named prop_name, and (if prefix_len is non-NULL ) set *prefix_len to the length of the prefix of prop_name that was sufficient to distinguish its kind. More... | |
svn_boolean_t | svn_prop_is_svn_prop (const char *prop_name) |
Return TRUE iff prop_name represents the name of a Subversion property. More... | |
svn_boolean_t | svn_prop_has_svn_prop (const apr_hash_t *props, apr_pool_t *pool) |
Return TRUE iff props has at least one property whose name represents the name of a Subversion property, in the sense of svn_prop_is_svn_prop(). More... | |
svn_boolean_t | svn_prop_is_boolean (const char *prop_name) |
Return TRUE iff prop_name is a Subversion property whose value is interpreted as a boolean. More... | |
svn_boolean_t | svn_prop_is_known_svn_rev_prop (const char *prop_name) |
Return TRUE iff prop_name is in the "svn:" name space and is a known revision property ("svn:log" or "svn:date", e.g.). More... | |
svn_boolean_t | svn_prop_is_known_svn_node_prop (const char *prop_name) |
Return TRUE iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a file and/or on a directory ("svn:eol-style", "svn:ignore", or "svn:mergeinfo", e.g.). More... | |
svn_boolean_t | svn_prop_is_known_svn_file_prop (const char *prop_name) |
Return TRUE iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a file ("svn:eol-style" or "svn:mergeinfo", e.g.). More... | |
svn_boolean_t | svn_prop_is_known_svn_dir_prop (const char *prop_name) |
Return TRUE iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a directory ("svn:ignore" or "svn:mergeinfo", e.g.). More... | |
svn_boolean_t | svn_prop_needs_translation (const char *prop_name) |
If prop_name requires that its value be stored as UTF8/LF in the repository, then return TRUE . More... | |
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. More... | |
svn_error_t * | svn_prop_diffs (apr_array_header_t **propdiffs, const apr_hash_t *target_props, const 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 ). More... | |
svn_boolean_t | svn_prop_name_is_valid (const char *prop_name) |
Return TRUE iff prop_name is a valid property name. More... | |
typedef struct svn_prop_inherited_item_t svn_prop_inherited_item_t |
A structure to represent inherited properties.
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.
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
.
Definition at line 159 of file svn_props.h.
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
.
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.
apr_hash_t* svn_prop_array_to_hash | ( | const apr_array_header_t * | properties, |
apr_pool_t * | result | ||
) |
Given an array of svn_prop_t items, return a hash mapping const char * property names to const svn_string_t * values.
NULL
svn_prop_t.value
member is undefined.svn_error_t* svn_prop_diffs | ( | apr_array_header_t ** | propdiffs, |
const apr_hash_t * | target_props, | ||
const 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
).
Set propdiffs to a new array of svn_prop_t
structures, with one entry for each property that differs, including properties that exist in source_props or target_props but not both. The value
field of each entry is that property's value from target_props or NULL if that property only exists in source_props.
Allocate the array from pool. Allocate the contents of the array from pool or by reference to the storage of the input hashes or both.
For note, here's a quick little table describing the logic of this routine:
source_props target_props 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.
const char* svn_prop_get_value | ( | const apr_hash_t * | properties, |
const char * | prop_name | ||
) |
Return the value of property prop_name as it is in properties, with values const svn_string_t
.
If prop_name is not in properties or properties is NULL, return NULL.
svn_boolean_t svn_prop_has_svn_prop | ( | const apr_hash_t * | props, |
apr_pool_t * | pool | ||
) |
Return TRUE
iff props has at least one property whose name represents the name of a Subversion property, in the sense of svn_prop_is_svn_prop().
apr_hash_t* svn_prop_hash_dup | ( | const apr_hash_t * | hash, |
apr_pool_t * | pool | ||
) |
Creates a deep copy of hash (keys const char *
and values const svn_string_t *
) in pool.
apr_array_header_t* svn_prop_hash_to_array | ( | const apr_hash_t * | hash, |
apr_pool_t * | pool | ||
) |
Given a hash (keys const char *
and values const svn_string_t
) of properties, returns an array of svn_prop_t items using pool.
svn_boolean_t svn_prop_is_boolean | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is a Subversion property whose value is interpreted as a boolean.
svn_boolean_t svn_prop_is_known_svn_dir_prop | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a directory ("svn:ignore" or "svn:mergeinfo", e.g.).
This will return FALSE
for any property name that is not known by this version of the library, even though the name may be known to other (for example, later) Subversion software.
svn_boolean_t svn_prop_is_known_svn_file_prop | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a file ("svn:eol-style" or "svn:mergeinfo", e.g.).
This will return FALSE
for any property name that is not known by this version of the library, even though the name may be known to other (for example, later) Subversion software.
svn_boolean_t svn_prop_is_known_svn_node_prop | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is in the "svn:" name space and is a known versioned property that is allowed on a file and/or on a directory ("svn:eol-style", "svn:ignore", or "svn:mergeinfo", e.g.).
This will return FALSE
for any property name that is not known by this version of the library, even though the name may be known to other (for example, later) Subversion software.
svn_boolean_t svn_prop_is_known_svn_rev_prop | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is in the "svn:" name space and is a known revision property ("svn:log" or "svn:date", e.g.).
This will return FALSE
for any property name that is not known by this version of the library, even though the name may be known to other (for example, later) Subversion software.
svn_boolean_t svn_prop_is_svn_prop | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name represents the name of a Subversion property.
That is, any property name in Subversion's name space for versioned or unversioned properties, regardless whether the particular property name is recognized.
svn_boolean_t svn_prop_name_is_valid | ( | const char * | prop_name | ) |
Return TRUE
iff prop_name is a valid property name.
For now, "valid" means the ASCII subset of an XML "Name". XML "Name" is defined at http://www.w3.org/TR/REC-xml#sec-common-syn
svn_boolean_t svn_prop_needs_translation | ( | const char * | prop_name | ) |
If prop_name 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.)
svn_prop_kind_t svn_property_kind | ( | int * | prefix_len, |
const char * | prop_name | ||
) |
Return the prop kind of a property named prop_name, and (if prefix_len is non-NULL
) set *prefix_len to the length of the prefix of prop_name that was sufficient to distinguish its kind.
svn_prop_kind_t svn_property_kind2 | ( | const char * | prop_name | ) |
Return the property kind of a property named prop_name.