@a hash (keys const char * and * values const svn_string_t *) in @a pool. * * @since New in 1.6. */ apr_hash_t * svn_prop_hash_dup(const apr_hash_t *hash, apr_pool_t *pool); /** * Return the value of property @a prop_name as it is in @a properties, * with values const svn_string_t. If @a prop_name is not * in @a properties or @a properties is NULL, return NULL. * * @since New in 1.7. */ const char * svn_prop_get_value(const apr_hash_t *properties, const char *prop_name); /** * 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 @c svn_prop_regular_kind. */ typedef enum svn_prop_kind { /** In .svn/entries, i.e., author, date, etc. */ svn_prop_entry_kind, /** Client-side only, stored by specific RA layer. */ svn_prop_wc_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. */ svn_prop_regular_kind } svn_prop_kind_t; /** Return the property kind of a property named @a prop_name. * * @since New in 1.8. */ svn_prop_kind_t svn_property_kind2(const char *prop_name); /** Return the prop kind of a property named @a prop_name, and * (if @a prefix_len is non-@c NULL) set @a *prefix_len to the length of * the prefix of @a prop_name that was sufficient to distinguish its kind. * * @deprecated Provided for backward compatibility with the 1.7 API. */ SVN_DEPRECATED svn_prop_kind_t svn_property_kind(int *prefix_len, const char *prop_name); /** Return @c TRUE iff @a 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_is_svn_prop(const char *prop_name); /** Return @c TRUE iff @a props has at least one property whose name * represents the name of a Subversion property, in the sense of * svn_prop_is_svn_prop(). * * @since New in 1.5. */ svn_boolean_t svn_prop_has_svn_prop(const apr_hash_t *props, apr_pool_t *pool); /** Return @c TRUE iff @a prop_name is a Subversion property whose * value is interpreted as a boolean. * * @since New in 1.5. */ svn_boolean_t svn_prop_is_boolean(const char *prop_name); /** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a * known revision property ("svn:log" or "svn:date", e.g.). * * This will return @c 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. * * @since New in 1.8. */ svn_boolean_t svn_prop_is_known_svn_rev_prop(const char *prop_name); /** Return @c TRUE iff @a 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 @c 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. * * @since New in 1.8. */ svn_boolean_t svn_prop_is_known_svn_node_prop(const char *prop_name); /** Return @c TRUE iff @a 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 @c 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. * * @since New in 1.8. */ svn_boolean_t svn_prop_is_known_svn_file_prop(const char *prop_name); /** Return @c TRUE iff @a 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 @c 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. * * @since New in 1.8. */ svn_boolean_t svn_prop_is_known_svn_dir_prop(const char *prop_name); /** If @a prop_name requires that its value be stored as UTF8/LF in the * repository, then return @c TRUE. Else return @c 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_boolean_t svn_prop_needs_translation(const char *prop_name); /** Given a @a proplist array of @c svn_prop_t structures, allocate * three new arrays in @a pool. Categorize each property and then * create new @c svn_prop_t structures in the proper lists. Each new * @c svn_prop_t structure's fields will point to the same data within * @a 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. */ 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 two property hashes (const char *name -> const * svn_string_t *value), deduce the differences between them (from * @a source_props -> @c target_props). Set @a propdiffs to a new array of * @c svn_prop_t structures, with one entry for each property that differs, * including properties that exist in @a source_props or @a target_props but * not both. The @c value field of each entry is that property's value from * @a target_props or NULL if that property only exists in @a source_props. * * Allocate the array from @a pool. Allocate the contents of the array from * @a 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: * * @verbatim 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) @endverbatim */ 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); /** * Return @c TRUE iff @a 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 * * @since New in 1.5. */ svn_boolean_t svn_prop_name_is_valid(const char *prop_name);