3 * ====================================================================
4 * Copyright (c) 2007 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
18 * @file svn_mergeinfo_private.h
19 * @brief Subversion-internal mergeinfo APIs.
22 #ifndef SVN_MERGEINFO_PRIVATE_H
23 #define SVN_MERGEINFO_PRIVATE_H
27 #endif /* __cplusplus */
30 /* Return whether INFO1 and INFO2 are equal in *IS_EQUAL.
32 CONSIDER_INERITANCE determines how the rangelists in the two
33 hashes are compared for equality. If CONSIDER_INERITANCE is FALSE,
34 then the start and end revisions of the svn_merge_range_t's being
35 compared are the only factors considered when determining equality.
37 e.g. '/trunk: 1,3-4*,5' == '/trunk: 1,3-5'
39 If CONSIDER_INERITANCE is TRUE, then the inheritability of the
40 svn_merge_range_t's is also considered and must be the same for two
41 otherwise identical ranges to be judged equal.
43 e.g. '/trunk: 1,3-4*,5' != '/trunk: 1,3-5'
44 '/trunk: 1,3-4*,5' == '/trunk: 1,3-4*,5'
45 '/trunk: 1,3-4,5' == '/trunk: 1,3-4,5'
47 Use POOL for temporary allocations. */
49 svn_mergeinfo__equals(svn_boolean_t
*is_equal
,
50 svn_mergeinfo_t info1
,
51 svn_mergeinfo_t info2
,
52 svn_boolean_t consider_inheritance
,
55 /* Examine MERGEINFO, removing all paths from the hash which map to
56 empty rangelists. POOL is used only to allocate the apr_hash_index_t
57 iterator. Returns TRUE if any paths were removed and FALSE if none were
58 removed or MERGEINFO is NULL. */
60 svn_mergeinfo__remove_empty_rangelists(svn_mergeinfo_t mergeinfo
,
63 /* Makes a shallow (ie, mergeinfos are not duped, or altered at all;
64 keys share storage) copy of IN_CATALOG in *OUT_CATALOG. PREFIX is
65 removed from the beginning of each key in the catalog; it is
66 illegal for any key to not start with PREFIX. The new hash and
67 temporary values are allocated in POOL. (This is useful for making
68 the return value from svn_ra_get_mergeinfo relative to the session
71 svn_mergeinfo__remove_prefix_from_catalog(svn_mergeinfo_catalog_t
*out_catalog
,
72 svn_mergeinfo_catalog_t in_catalog
,
79 #endif /* __cplusplus */
81 #endif /* SVN_MERGEINFO_PRIVATE_H */