Subversion
svn_props.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_props.h
24  * @brief Subversion properties
25  */
26 
27 /* ==================================================================== */
28 
29 #ifndef SVN_PROPS_H
30 #define SVN_PROPS_H
31 
32 #include <apr_pools.h> /* for apr_pool_t */
33 #include <apr_tables.h> /* for apr_array_header_t */
34 #include <apr_hash.h> /* for apr_hash_t */
35 
36 #include "svn_types.h" /* for svn_boolean_t, svn_error_t */
37 #include "svn_string.h" /* for svn_string_t */
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif /* __cplusplus */
42 
43 /**
44  * @defgroup svn_props_support Properties management utilities
45  * @{
46  */
47 
48 
49 
50 /** A general in-memory representation of a single property. Most of
51  * the time, property lists will be stored completely in hashes. But
52  * sometimes it's useful to have an "ordered" collection of
53  * properties, in which case we use an array of these structures.
54  *
55  * Also: sometimes we want a list that represents a set of property
56  * *changes*, and in this case, an @c apr_hash_t won't work -- there's no
57  * way to represent a property deletion, because we can't store a @c NULL
58  * value in a hash. So instead, we use these structures.
59  */
60 typedef struct svn_prop_t
61 {
62  const char *name; /**< Property name */
63  const svn_string_t *value; /**< Property value */
64 } svn_prop_t;
65 
66 
67 /**
68  * Return a duplicate of @a prop, allocated in @a pool. No part of the new
69  * structure will be shared with @a prop.
70  *
71  * @since New in 1.3.
72  */
73 svn_prop_t *
74 svn_prop_dup(const svn_prop_t *prop,
75  apr_pool_t *pool);
76 
77 
78 /**
79  * Duplicate an @a array of svn_prop_t items using @a pool.
80  *
81  * @since New in 1.3.
82  */
83 apr_array_header_t *
84 svn_prop_array_dup(const apr_array_header_t *array,
85  apr_pool_t *pool);
86 
87 
88 /** A structure to represent inherited properties.
89  *
90  * @since New in 1.8.
91  */
93 {
94  /** The absolute working copy path, relative filesystem path, or URL
95  * from which the properties in @a prop_hash are inherited. (For
96  * details about which path specification format is in use for a
97  * particular instance of this structure, consult the documentation
98  * for the API which produced it.) */
99  const char *path_or_url;
100 
101  /** A hash of (<tt>const char *</tt>) inherited property names, and
102  * (<tt>svn_string_t *</tt>) property values. */
103  apr_hash_t *prop_hash;
104 
106 
107 
108 /**
109  * Given a hash (keys <tt>const char *</tt> and values <tt>const
110  * svn_string_t</tt>) of properties, returns an array of svn_prop_t
111  * items using @a pool.
112  *
113  * @since New in 1.5.
114  */
115 apr_array_header_t *
116 svn_prop_hash_to_array(const apr_hash_t *hash,
117  apr_pool_t *pool);
118 
119 /**
120  * Given an array of svn_prop_t items, return a hash mapping const char *
121  * property names to const svn_string_t * values.
122  *
123  * @warning The behaviour on #svn_prop_t objects with a @c NULL @c
124  * svn_prop_t.value member is undefined.
125  *
126  * @since New in 1.7.
127  */
128 apr_hash_t *
129 svn_prop_array_to_hash(const apr_array_header_t *properties,
130  apr_pool_t *result);
131 
132 /**
133  * Creates a deep copy of @a hash (keys <tt>const char *</tt> and
134  * values <tt>const svn_string_t *</tt>) in @a pool.
135  *
136  * @since New in 1.6.
137  */
138 apr_hash_t *
139 svn_prop_hash_dup(const apr_hash_t *hash,
140  apr_pool_t *pool);
141 
142 /**
143  * Return the value of property @a prop_name as it is in @a properties,
144  * with values <tt>const svn_string_t</tt>. If @a prop_name is not
145  * in @a properties or @a properties is NULL, return NULL.
146  *
147  * @since New in 1.7.
148  */
149 const char *
150 svn_prop_get_value(const apr_hash_t *properties,
151  const char *prop_name);
152 
153 /**
154  * Subversion distinguishes among several kinds of properties,
155  * particularly on the client-side. There is no "unknown" kind; if
156  * there's nothing special about a property name, the default category
157  * is @c svn_prop_regular_kind.
158  */
159 typedef enum svn_prop_kind
160 {
161  /** In .svn/entries, i.e., author, date, etc. */
163 
164  /** Client-side only, stored by specific RA layer. */
166 
167  /** Seen if user does "svn proplist"; note that this includes some "svn:"
168  * props and all user props, i.e. ones stored in the repository fs.
169  */
172 
173 /** Return the property kind of a property named @a prop_name.
174  *
175  * @since New in 1.8.
176  */
178 svn_property_kind2(const char *prop_name);
179 
180 /** Return the prop kind of a property named @a prop_name, and
181  * (if @a prefix_len is non-@c NULL) set @a *prefix_len to the length of
182  * the prefix of @a prop_name that was sufficient to distinguish its kind.
183  *
184  * @deprecated Provided for backward compatibility with the 1.7 API.
185  */
188 svn_property_kind(int *prefix_len,
189  const char *prop_name);
190 
191 
192 /** Return @c TRUE iff @a prop_name represents the name of a Subversion
193  * property. That is, any property name in Subversion's name space for
194  * versioned or unversioned properties, regardless whether the particular
195  * property name is recognized.
196  */
198 svn_prop_is_svn_prop(const char *prop_name);
199 
200 
201 /** Return @c TRUE iff @a props has at least one property whose name
202  * represents the name of a Subversion property, in the sense of
203  * svn_prop_is_svn_prop().
204  *
205  * @since New in 1.5.
206  */
208 svn_prop_has_svn_prop(const apr_hash_t *props,
209  apr_pool_t *pool);
210 
211 /** Return @c TRUE iff @a prop_name is a Subversion property whose
212  * value is interpreted as a boolean.
213  *
214  * @since New in 1.5.
215  */
217 svn_prop_is_boolean(const char *prop_name);
218 
219 /** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a
220  * known revision property ("svn:log" or "svn:date", e.g.).
221  *
222  * This will return @c FALSE for any property name that is not known by this
223  * version of the library, even though the name may be known to other (for
224  * example, later) Subversion software.
225  *
226  * @since New in 1.8.
227  */
229 svn_prop_is_known_svn_rev_prop(const char *prop_name);
230 
231 /** Return @c TRUE iff @a prop_name is in the "svn:" name space and is a
232  * known versioned property that is allowed on a file and/or on a
233  * directory ("svn:eol-style", "svn:ignore", or "svn:mergeinfo", e.g.).
234  *
235  * This will return @c FALSE for any property name that is not known
236  * by this version of the library, even though the name may be known
237  * to other (for example, later) Subversion software.
238  *
239  * @since New in 1.8.
240  */
242 svn_prop_is_known_svn_node_prop(const char *prop_name);
243 
244 /** Return @c TRUE iff @a prop_name is in the "svn:" name space and is
245  * a known versioned property that is allowed on a file
246  * ("svn:eol-style" or "svn:mergeinfo", e.g.).
247  *
248  * This will return @c FALSE for any property name that is not known
249  * by this version of the library, even though the name may be known
250  * to other (for example, later) Subversion software.
251  *
252  * @since New in 1.8.
253  */
255 svn_prop_is_known_svn_file_prop(const char *prop_name);
256 
257 /** Return @c TRUE iff @a prop_name is in the "svn:" name space and is
258  * a known versioned property that is allowed on a directory
259  * ("svn:ignore" or "svn:mergeinfo", e.g.).
260  *
261  * This will return @c FALSE for any property name that is not known
262  * by this version of the library, even though the name may be known
263  * to other (for example, later) Subversion software.
264  *
265  * @since New in 1.8.
266  */
268 svn_prop_is_known_svn_dir_prop(const char *prop_name);
269 
270 /** If @a prop_name requires that its value be stored as UTF8/LF in the
271  * repository, then return @c TRUE. Else return @c FALSE. This is for
272  * users of libsvn_client or libsvn_fs, since it their responsibility
273  * to do this translation in both directions. (See
274  * svn_subst_translate_string()/svn_subst_detranslate_string() for
275  * help with this task.)
276  */
278 svn_prop_needs_translation(const char *prop_name);
279 
280 
281 /** Given a @a proplist array of @c svn_prop_t structures, allocate
282  * three new arrays in @a pool. Categorize each property and then
283  * create new @c svn_prop_t structures in the proper lists. Each new
284  * @c svn_prop_t structure's fields will point to the same data within
285  * @a proplist's structures.
286  *
287  * Callers may pass NULL for each of the property lists in which they
288  * are uninterested. If no props exist in a certain category, and the
289  * property list argument for that category is non-NULL, then that
290  * array will come back with <tt>->nelts == 0</tt>.
291  */
292 svn_error_t *
293 svn_categorize_props(const apr_array_header_t *proplist,
294  apr_array_header_t **entry_props,
295  apr_array_header_t **wc_props,
296  apr_array_header_t **regular_props,
297  apr_pool_t *pool);
298 
299 
300 /** Given two property hashes (<tt>const char *name</tt> -> <tt>const
301  * svn_string_t *value</tt>), deduce the differences between them (from
302  * @a source_props -> @c target_props). Set @a propdiffs to a new array of
303  * @c svn_prop_t structures, with one entry for each property that differs,
304  * including properties that exist in @a source_props or @a target_props but
305  * not both. The @c value field of each entry is that property's value from
306  * @a target_props or NULL if that property only exists in @a source_props.
307  *
308  * Allocate the array from @a pool. Allocate the contents of the array from
309  * @a pool or by reference to the storage of the input hashes or both.
310  *
311  * For note, here's a quick little table describing the logic of this
312  * routine:
313  *
314  * @verbatim
315  source_props target_props event
316  ------------ ------------ -----
317  value = foo value = NULL Deletion occurred.
318  value = foo value = bar Set occurred (modification)
319  value = NULL value = baz Set occurred (creation) @endverbatim
320  */
321 svn_error_t *
322 svn_prop_diffs(apr_array_header_t **propdiffs,
323  const apr_hash_t *target_props,
324  const apr_hash_t *source_props,
325  apr_pool_t *pool);
326 
327 
328 /**
329  * Return @c TRUE iff @a prop_name is a valid property name.
330  *
331  * For now, "valid" means the ASCII subset of an XML "Name".
332  * XML "Name" is defined at http://www.w3.org/TR/REC-xml#sec-common-syn
333  *
334  * @since New in 1.5.
335  */
337 svn_prop_name_is_valid(const char *prop_name);
338 
339 
340 
341 /* Defines for reserved ("svn:") property names. */
342 
343 /** All Subversion property names start with this. */
344 #define SVN_PROP_PREFIX "svn:"
345 
346 
347 /** Visible properties
348  *
349  * These are regular properties that are attached to ordinary files
350  * and dirs, and are visible (and tweakable) by svn client programs
351  * and users. Adding these properties causes specific effects.
352  *
353  * @note the values of these properties are always UTF8-encoded with
354  * LF line-endings. It is the burden of svn library users to enforce
355  * this. Use svn_prop_needs_translation() to discover if a
356  * certain property needs translation, and you can use
357  * svn_subst_translate_string()/svn_subst_detranslate_string()
358  * to do the translation.
359  *
360  * @defgroup svn_prop_visible_props Visible properties
361  * @{
362  */
363 
364 /** Properties whose values are interpreted as booleans (such as
365  * svn:executable, svn:needs_lock, and svn:special) always fold their
366  * value to this.
367  *
368  * @since New in 1.5.
369  */
370 #define SVN_PROP_BOOLEAN_TRUE "*"
371 
372 /** The mime-type of a given file. */
373 #define SVN_PROP_MIME_TYPE SVN_PROP_PREFIX "mime-type"
374 
375 /** The ignore patterns for a given directory. */
376 #define SVN_PROP_IGNORE SVN_PROP_PREFIX "ignore"
377 
378 /** The line ending style for a given file. */
379 #define SVN_PROP_EOL_STYLE SVN_PROP_PREFIX "eol-style"
380 
381 /** The "activated" keywords (for keyword substitution) for a given file. */
382 #define SVN_PROP_KEYWORDS SVN_PROP_PREFIX "keywords"
383 
384 /** Set to either TRUE or FALSE if we want a file to be executable or not. */
385 #define SVN_PROP_EXECUTABLE SVN_PROP_PREFIX "executable"
386 
387 /** The value to force the executable property to when set.
388  *
389  * @deprecated Provided for backward compatibility with the 1.4 API.
390  * Use @c SVN_PROP_BOOLEAN_TRUE instead.
391  */
392 #define SVN_PROP_EXECUTABLE_VALUE SVN_PROP_BOOLEAN_TRUE
393 
394 /** Set to TRUE ('*') if we want a file to be set to read-only when
395  * not locked. FALSE is indicated by deleting the property. */
396 #define SVN_PROP_NEEDS_LOCK SVN_PROP_PREFIX "needs-lock"
397 
398 /** The value to force the needs-lock property to when set.
399  *
400  * @deprecated Provided for backward compatibility with the 1.4 API.
401  * Use @c SVN_PROP_BOOLEAN_TRUE instead.
402  */
403 #define SVN_PROP_NEEDS_LOCK_VALUE SVN_PROP_BOOLEAN_TRUE
404 
405 /** Set if the file should be treated as a special file. */
406 #define SVN_PROP_SPECIAL SVN_PROP_PREFIX "special"
407 
408 /** The value to force the special property to when set.
409  *
410  * @deprecated Provided for backward compatibility with the 1.4 API.
411  * Use @c SVN_PROP_BOOLEAN_TRUE instead.
412  */
413 #define SVN_PROP_SPECIAL_VALUE SVN_PROP_BOOLEAN_TRUE
414 
415 /** Describes external items to check out into this directory.
416  *
417  * The format is a series of lines, each in the following format:
418  *
419  * [-r REV] URL[@PEG] LOCALPATH
420  *
421  * LOCALPATH is relative to the directory having this property.
422  * REV pins the external to revision REV.
423  * URL may be a full URL or a relative URL starting with one of:
424  *
425  * ../ to the parent directory of the extracted external
426  * ^/ to the repository root
427  * / to the server root
428  * // to the URL scheme
429  *
430  * The following format is supported for interoperability with
431  * Subversion 1.4 and earlier clients:
432  *
433  * LOCALPATH [-r PEG] URL
434  *
435  * The ambiguous format 'relative_path relative_path' is taken as
436  * 'relative_url relative_path' with peg revision support.
437  *
438  * Lines starting with a '#' character are ignored.
439  */
440 #define SVN_PROP_EXTERNALS SVN_PROP_PREFIX "externals"
441 
442 /** Merge info property used to record a resource's merge history.
443  *
444  * The format is a series of lines containing merge paths and revision
445  * ranges, such as:
446  *
447  * @verbatim
448  /trunk: 1-6,9,37-38
449  /trunk/foo: 10 @endverbatim
450  * @since New in 1.5.
451  */
452 #define SVN_PROP_MERGEINFO SVN_PROP_PREFIX "mergeinfo"
453 
454 /** Property used to record inheritable configuration auto-props.
455  *
456  * @since New in 1.8.
457  */
458 #define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_PREFIX "auto-props"
459 
460 /** Property used to record inheritable configuration ignores.
461  *
462  * @since New in 1.8.
463  */
464 #define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_PREFIX "global-ignores"
465 
466 /** Meta-data properties.
467  *
468  * The following properties are used for storing meta-data about
469  * individual entries in the meta-data branches of subversion,
470  * see issue #1256 or browseable at
471  * http://svn.apache.org/viewvc/subversion/branches/meta-data-versioning/ .
472  * Furthermore @c svntar (http://svn.borg.ch/svntar/) and @c FSVS
473  * (http://fsvs.tigris.org/) use these, too.
474  *
475  * Please note that these formats are very UNIX-centric currently;
476  * a bit of discussion about Windows can be read at
477  * http://article.gmane.org/gmane.comp.version-control.subversion.devel/103991
478  *
479  * @defgroup svn_prop_meta_data Meta-data properties
480  * @{ */
481 
482 /** The files' last modification time.
483  * This is stored as string in the form @c "2008-08-07T07:38:51.008782Z", to
484  * be converted by the functions @c svn_time_to_cstring() and
485  * @c svn_time_from_cstring().
486  *
487  * @note This property name is reserved for future usage, but currently unused.
488  *
489  * @since New in 1.6.
490  */
491 #define SVN_PROP_TEXT_TIME SVN_PROP_PREFIX "text-time"
492 
493 /** The files' owner.
494  * Stored as numeric ID, optionally followed by whitespace and the string:
495  * @c "1000 pmarek". Parsers @b should accept any number of whitespace,
496  * and writers @b should put exactly a single space.
497  *
498  * @note This property name is reserved for future usage, but currently unused.
499  *
500  * @since New in 1.6.
501  */
502 #define SVN_PROP_OWNER SVN_PROP_PREFIX "owner"
503 
504 /** The files' group.
505  * The same format as for @c SVN_PROP_OWNER, the owner-property.
506  *
507  * @note This property name is reserved for future usage, but currently unused.
508  *
509  * @since New in 1.6.
510  */
511 #define SVN_PROP_GROUP SVN_PROP_PREFIX "group"
512 
513 /** The files' unix-mode.
514  * Stored in octal, with a leading @c 0; may have 5 digits if any of @c setuid,
515  * @c setgid or @c sticky are set; an example is @c "0644".
516  *
517  * @note This property name is reserved for future usage, but currently unused.
518  *
519  * @since New in 1.6.
520  */
521 #define SVN_PROP_UNIX_MODE SVN_PROP_PREFIX "unix-mode"
522 
523 /** @} */ /* Meta-data properties */
524 
525 /**
526  * This is a list of all user-visible and -settable versioned node
527  * properties.
528  *
529  * @since New in 1.8.
530  */
531 #define SVN_PROP_NODE_ALL_PROPS SVN_PROP_MIME_TYPE, \
532  SVN_PROP_IGNORE, \
533  SVN_PROP_EOL_STYLE, \
534  SVN_PROP_KEYWORDS, \
535  SVN_PROP_EXECUTABLE, \
536  SVN_PROP_NEEDS_LOCK, \
537  SVN_PROP_SPECIAL, \
538  SVN_PROP_EXTERNALS, \
539  SVN_PROP_MERGEINFO, \
540  SVN_PROP_INHERITABLE_AUTO_PROPS, \
541  SVN_PROP_INHERITABLE_IGNORES, \
542  \
543  SVN_PROP_TEXT_TIME, \
544  SVN_PROP_OWNER, \
545  SVN_PROP_GROUP, \
546  SVN_PROP_UNIX_MODE,
547 
548 /** @} */
549 
550 /** WC props are props that are invisible to users: they're generated
551  * by an RA layer, and stored in secret parts of .svn/.
552  *
553  * @defgroup svn_prop_invisible_props Invisible properties
554  * @{
555  */
556 
557 /** The property name *prefix* that makes a property a "WC property".
558  *
559  * For example, WebDAV RA implementations might store a versioned-resource
560  * url as a WC prop like this:
561  *
562  * <pre reason="Should use 'verbatim' instead, but Doxygen v1.6.1 & v1.7.1
563  * then doesn't recognize the #define; presumably a bug.">
564  name = svn:wc:dav_url
565  val = http://www.example.com/repos/452348/e.289 </pre>
566  *
567  * The client will try to protect WC props by warning users against
568  * changing them. The client will also send them back to the RA layer
569  * when committing.
570  */
571 #define SVN_PROP_WC_PREFIX SVN_PROP_PREFIX "wc:"
572 
573 /** Another type of non-user-visible property. "Entry properties" are
574  * stored as fields with the administrative 'entries' file.
575  */
576 #define SVN_PROP_ENTRY_PREFIX SVN_PROP_PREFIX "entry:"
577 
578 /** The revision this entry was last committed to on. */
579 #define SVN_PROP_ENTRY_COMMITTED_REV SVN_PROP_ENTRY_PREFIX "committed-rev"
580 
581 /** The date this entry was last committed to on. */
582 #define SVN_PROP_ENTRY_COMMITTED_DATE SVN_PROP_ENTRY_PREFIX "committed-date"
583 
584 /** The author who last committed to this entry. */
585 #define SVN_PROP_ENTRY_LAST_AUTHOR SVN_PROP_ENTRY_PREFIX "last-author"
586 
587 /** The UUID of this entry's repository. */
588 #define SVN_PROP_ENTRY_UUID SVN_PROP_ENTRY_PREFIX "uuid"
589 
590 /** The lock token for this entry.
591  * @since New in 1.2. */
592 #define SVN_PROP_ENTRY_LOCK_TOKEN SVN_PROP_ENTRY_PREFIX "lock-token"
593 
594 /** When custom, user-defined properties are passed over the wire, they will
595  * have this prefix added to their name.
596  */
597 #define SVN_PROP_CUSTOM_PREFIX SVN_PROP_PREFIX "custom:"
598 
599 /** @} */
600 
601 /**
602  * These are reserved properties attached to a "revision" object in
603  * the repository filesystem. They can be queried by using
604  * svn_fs_revision_prop().
605  *
606  * @defgroup svn_props_revision_props Revision properties
607  * @{
608  */
609 
610 /** The fs revision property that stores a commit's author. */
611 #define SVN_PROP_REVISION_AUTHOR SVN_PROP_PREFIX "author"
612 
613 /** The fs revision property that stores a commit's log message. */
614 #define SVN_PROP_REVISION_LOG SVN_PROP_PREFIX "log"
615 
616 /** The fs revision property that stores a commit's date. */
617 #define SVN_PROP_REVISION_DATE SVN_PROP_PREFIX "date"
618 
619 /** The fs revision property that stores a commit's "original" date.
620  *
621  * The svn:date property must be monotonically increasing, along with
622  * the revision number. In certain scenarios, this may pose a problem
623  * when the revision represents a commit that occurred at a time which
624  * does not fit within the sequencing required for svn:date. This can
625  * happen, for instance, when the revision represents a commit to a
626  * foreign version control system, or possibly when two Subversion
627  * repositories are combined. This property can be used to record the
628  * TRUE, original date of the commit.
629  */
630 #define SVN_PROP_REVISION_ORIG_DATE SVN_PROP_PREFIX "original-date"
631 
632 /** The presence of this fs revision property indicates that the
633  * revision was automatically generated by the mod_dav_svn
634  * autoversioning feature. The value is irrelevant.
635  */
636 #define SVN_PROP_REVISION_AUTOVERSIONED SVN_PROP_PREFIX "autoversioned"
637 
638 
639 /* More reserved revision props in the 'svn:' namespace, used by the
640  svnsync tool: */
641 
642 /** Prefix for all svnsync custom properties.
643  * @since New in 1.4.
644  */
645 #define SVNSYNC_PROP_PREFIX SVN_PROP_PREFIX "sync-"
646 
647 /* The following revision properties are set on revision 0 of
648  * destination repositories by svnsync:
649  */
650 
651 /** Used to enforce mutually exclusive destination repository access.
652  * @since New in 1.4.
653  */
654 #define SVNSYNC_PROP_LOCK SVNSYNC_PROP_PREFIX "lock"
655 
656 /** Identifies the repository's source URL.
657  * @since New in 1.4.
658  */
659 #define SVNSYNC_PROP_FROM_URL SVNSYNC_PROP_PREFIX "from-url"
660 /** Identifies the repository's source UUID.
661  * @since New in 1.4.
662  */
663 #define SVNSYNC_PROP_FROM_UUID SVNSYNC_PROP_PREFIX "from-uuid"
664 
665 /** Identifies the last completely mirrored revision.
666  * @since New in 1.4.
667  */
668 #define SVNSYNC_PROP_LAST_MERGED_REV SVNSYNC_PROP_PREFIX "last-merged-rev"
669 
670 /** Identifies the revision currently being copied.
671  * @since New in 1.4.
672  */
673 #define SVNSYNC_PROP_CURRENTLY_COPYING SVNSYNC_PROP_PREFIX "currently-copying"
674 
675 
676 /**
677  * This is a list of all revision properties.
678  */
679 #define SVN_PROP_REVISION_ALL_PROPS SVN_PROP_REVISION_AUTHOR, \
680  SVN_PROP_REVISION_LOG, \
681  SVN_PROP_REVISION_DATE, \
682  SVN_PROP_REVISION_AUTOVERSIONED, \
683  SVN_PROP_REVISION_ORIG_DATE, \
684  SVNSYNC_PROP_LOCK, \
685  SVNSYNC_PROP_FROM_URL, \
686  SVNSYNC_PROP_FROM_UUID, \
687  SVNSYNC_PROP_LAST_MERGED_REV, \
688  SVNSYNC_PROP_CURRENTLY_COPYING,
689 
690 /** @} */
691 
692 /**
693  * These are reserved properties attached to a "transaction" object in
694  * the repository filesystem in advance of the pre-commit hook script
695  * running on the server, but then automatically removed from the
696  * transaction before its promotion to a new revision.
697  *
698  * @defgroup svn_props_ephemeral_txnprops Ephemeral transaction properties
699  * @{
700  */
701 
702 /** The prefix used for all (ephemeral) transaction properties.
703  *
704  * @since New in 1.8.
705  */
706 #define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn-"
707 
708 /** Identifies the client version compatibility level. For clients
709  * compiled against Subversion libraries, this is @c SVN_VER_NUMBER.
710  * Third-party implementations are advised to use similar formatting
711  * for values of this property.
712  *
713  * @since New in 1.8.
714  */
715 #define SVN_PROP_TXN_CLIENT_COMPAT_VERSION \
716  SVN_PROP_TXN_PREFIX "client-compat-version"
717 
718 /** Identifies the client's user agent string, if any.
719  *
720  * @since New in 1.8.
721  */
722 #define SVN_PROP_TXN_USER_AGENT \
723  SVN_PROP_TXN_PREFIX "user-agent"
724 
725 /** The prefix reserved for copies of (ephemeral) transaction
726  * properties designed to outlive the transaction. Administrators may
727  * choose to, in their pre-commit hook scripts, copy the values of one
728  * or more properties named @c SVN_PROP_TXN_PREFIX + "something"
729  * to new properties named @c SVN_PROP_REVISION_PREFIX + "something",
730  * allowing that information to survive the commit-time removal of
731  * ephemeral transaction properties.
732  *
733  * @since New in 1.8.
734  */
735 #define SVN_PROP_REVISION_PREFIX SVN_PROP_PREFIX "revision-"
736 
737 
738 /** @} */
739 
740 /** @} */
741 
742 
743 
744 #ifdef __cplusplus
745 }
746 #endif /* __cplusplus */
747 
748 #endif /* SVN_PROPS_H */
svn_error_t
Subversion error object.
Definition: svn_types.h:180
svn_prop_diffs
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 bet...
svn_prop_is_known_svn_file_prop
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 allow...
svn_prop_inherited_item_t::prop_hash
apr_hash_t * prop_hash
A hash of (const char *) inherited property names, and (svn_string_t *) property values.
Definition: svn_props.h:103
svn_prop_get_value
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.
svn_prop_array_dup
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_is_known_svn_node_prop
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 allow...
svn_string.h
Counted-length strings for Subversion, plus some C string goodies.
svn_property_kind2
svn_prop_kind_t svn_property_kind2(const char *prop_name)
Return the property kind of a property named prop_name.
svn_prop_has_svn_prop
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 proper...
svn_categorize_props
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.
svn_prop_regular_kind
@ svn_prop_regular_kind
Seen if user does "svn proplist"; note that this includes some "svn:" props and all user props,...
Definition: svn_props.h:170
svn_prop_is_known_svn_dir_prop
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 allow...
svn_prop_is_svn_prop
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_string_t
A simple counted string.
Definition: svn_string.h:96
svn_prop_is_known_svn_rev_prop
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_types.h
Subversion's data types.
svn_prop_name_is_valid
svn_boolean_t svn_prop_name_is_valid(const char *prop_name)
Return TRUE iff prop_name is a valid property name.
svn_prop_inherited_item_t
A structure to represent inherited properties.
Definition: svn_props.h:92
svn_prop_entry_kind
@ svn_prop_entry_kind
In .svn/entries, i.e., author, date, etc.
Definition: svn_props.h:162
svn_prop_kind_t
enum svn_prop_kind svn_prop_kind_t
Subversion distinguishes among several kinds of properties, particularly on the client-side.
svn_property_kind
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 t...
svn_prop_needs_translation
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.
svn_prop_inherited_item_t
struct svn_prop_inherited_item_t svn_prop_inherited_item_t
A structure to represent inherited properties.
svn_prop_dup
svn_prop_t * svn_prop_dup(const svn_prop_t *prop, apr_pool_t *pool)
Return a duplicate of prop, allocated in pool.
svn_prop_kind
svn_prop_kind
Subversion distinguishes among several kinds of properties, particularly on the client-side.
Definition: svn_props.h:159
svn_prop_t
A general in-memory representation of a single property.
Definition: svn_props.h:60
svn_prop_hash_dup
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.
svn_prop_hash_to_array
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...
svn_prop_t::value
const svn_string_t * value
Property value.
Definition: svn_props.h:63
svn_prop_t
struct svn_prop_t svn_prop_t
A general in-memory representation of a single property.
svn_boolean_t
int svn_boolean_t
YABT: Yet Another Boolean Type.
Definition: svn_types.h:141
SVN_DEPRECATED
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
Definition: svn_types.h:62
svn_prop_inherited_item_t::path_or_url
const char * path_or_url
The absolute working copy path, relative filesystem path, or URL from which the properties in prop_ha...
Definition: svn_props.h:99
svn_prop_is_boolean
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_prop_array_to_hash
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_st...
svn_prop_wc_kind
@ svn_prop_wc_kind
Client-side only, stored by specific RA layer.
Definition: svn_props.h:165
svn_prop_t::name
const char * name
Property name.
Definition: svn_props.h:62