28 #ifndef SVN_MERGEINFO_H
29 #define SVN_MERGEINFO_H
31 #include <apr_pools.h>
32 #include <apr_tables.h>
107 #define SVN_MERGEINFO_NONINHERITABLE_STR "*"
143 typedef apr_hash_t *svn_mergeinfo_t;
144 typedef apr_hash_t *svn_mergeinfo_catalog_t;
194 svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
196 apr_pool_t *result_pool,
197 apr_pool_t *scratch_pool);
207 svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
230 svn_mergeinfo_t changes,
231 apr_pool_t *result_pool,
232 apr_pool_t *scratch_pool);
241 svn_mergeinfo_t changes,
255 svn_mergeinfo_catalog_t changes_catalog,
256 apr_pool_t *result_pool,
257 apr_pool_t *scratch_pool);
266 svn_mergeinfo_t whiteboard, apr_pool_t *pool);
281 svn_mergeinfo_t eraser,
282 svn_mergeinfo_t whiteboard,
284 apr_pool_t *result_pool,
285 apr_pool_t *scratch_pool);
300 const svn_rangelist_t *from,
const svn_rangelist_t *to,
327 const svn_rangelist_t *changes,
328 apr_pool_t *result_pool,
329 apr_pool_t *scratch_pool);
346 const svn_rangelist_t *changes,
364 const svn_rangelist_t *whiteboard,
381 svn_mergeinfo_t mergeinfo1,
382 svn_mergeinfo_t mergeinfo2,
384 apr_pool_t *result_pool,
385 apr_pool_t *scratch_pool);
394 svn_mergeinfo_t mergeinfo1,
395 svn_mergeinfo_t mergeinfo2,
418 const svn_rangelist_t *rangelist1,
419 const svn_rangelist_t *rangelist2,
444 const svn_rangelist_t *rangelist,
460 const svn_rangelist_t *rangelist,
464 apr_pool_t *result_pool,
465 apr_pool_t *scratch_pool);
475 const svn_rangelist_t *rangelist,
496 svn_mergeinfo_t mergeinfo,
501 apr_pool_t *result_pool,
502 apr_pool_t *scratch_pool);
512 svn_mergeinfo_t mergeinfo,
529 svn_mergeinfo_t mergeinput,
547 svn_mergeinfo_catalog_t
Counted-length strings for Subversion, plus some C string goodies.
apr_array_header_t svn_rangelist_t
Terminology for data structures that contain mergeinfo.
svn_error_t * svn_mergeinfo_merge2(svn_mergeinfo_t mergeinfo, svn_mergeinfo_t changes, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Merge a shallow copy of one mergeinfo, changes, into another mergeinfo mergeinfo. ...
svn_error_t * svn_mergeinfo_catalog_merge(svn_mergeinfo_catalog_t mergeinfo_catalog, svn_mergeinfo_catalog_t changes_catalog, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Combine one mergeinfo catalog, changes_catalog, into another mergeinfo catalog mergeinfo_catalog.
svn_error_t * svn_rangelist_diff(svn_rangelist_t **deleted, svn_rangelist_t **added, const svn_rangelist_t *from, const svn_rangelist_t *to, svn_boolean_t consider_inheritance, apr_pool_t *pool)
Calculate the delta between two rangelists consisting of svn_merge_range_t * elements (sorted in asce...
svn_error_t * svn_rangelist_merge(svn_rangelist_t **rangelist, const svn_rangelist_t *changes, apr_pool_t *pool)
Like svn_rangelist_merge2(), but with rangelist as an input/output argument.
svn_mergeinfo_inheritance_t
The three ways to request mergeinfo affecting a given path.
Mergeinfo inherited from a target's nearest (path-wise, not history-wise) ancestor, regardless of whether target has explicit mergeinfo.
svn_error_t * svn_mergeinfo_intersect(svn_mergeinfo_t *mergeinfo, svn_mergeinfo_t mergeinfo1, svn_mergeinfo_t mergeinfo2, apr_pool_t *pool)
Like svn_mergeinfo_intersect2, but always considers inheritance.
svn_error_t * svn_rangelist_inheritable2(svn_rangelist_t **inheritable_rangelist, const svn_rangelist_t *rangelist, svn_revnum_t start, svn_revnum_t end, svn_boolean_t inheritable, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Return a deep copy of svn_merge_range_t *'s in rangelist excluding all non-inheritable svn_merge_rang...
svn_error_t * svn_mergeinfo_diff(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added, svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto, svn_boolean_t consider_inheritance, apr_pool_t *pool)
Similar to svn_mergeinfo_diff2(), but users only one pool.
svn_error_t * svn_rangelist_reverse(svn_rangelist_t *rangelist, apr_pool_t *pool)
Reverse rangelist, and the start and end fields of each range in rangelist, in place.
const char * svn_inheritance_to_word(svn_mergeinfo_inheritance_t inherit)
Return a constant string expressing inherit as an English word, i.e., "explicit" (default), "inherited", or "nearest_ancestor".
svn_error_t * svn_mergeinfo_parse(svn_mergeinfo_t *mergeinfo, const char *input, apr_pool_t *pool)
Parse the mergeinfo from input into *mergeinfo.
Explicit mergeinfo, or if that doesn't exist, the inherited mergeinfo from a target's nearest (path-w...
svn_error_t * svn_mergeinfo_merge(svn_mergeinfo_t mergeinfo, svn_mergeinfo_t changes, apr_pool_t *pool)
Like svn_mergeinfo_merge2, but uses only one pool.
svn_error_t * svn_mergeinfo_inheritable(svn_mergeinfo_t *inheritable_mergeinfo, svn_mergeinfo_t mergeinfo, const char *path, svn_revnum_t start, svn_revnum_t end, apr_pool_t *pool)
Like svn_mergeinfo_inheritable2, but always finds inheritable mergeinfo.
svn_mergeinfo_catalog_t svn_mergeinfo_catalog_dup(svn_mergeinfo_catalog_t mergeinfo_catalog, apr_pool_t *pool)
Return a deep copy of mergeinfo_catalog, allocated in pool.
svn_error_t * svn_rangelist_intersect(svn_rangelist_t **rangelist, const svn_rangelist_t *rangelist1, const svn_rangelist_t *rangelist2, svn_boolean_t consider_inheritance, apr_pool_t *pool)
Find the intersection of two rangelists consisting of svn_merge_range_t * elements, rangelist1 and rangelist2, and place the result in *rangelist (which is never NULL).
Subversion's data types.
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
svn_error_t * svn_mergeinfo_to_string(svn_string_t **output, svn_mergeinfo_t mergeinput, apr_pool_t *pool)
Take a mergeinfo in mergeinput, and convert it to unparsed mergeinfo.
svn_error_t * svn_mergeinfo_inheritable2(svn_mergeinfo_t *inheritable_mergeinfo, svn_mergeinfo_t mergeinfo, const char *path, svn_revnum_t start, svn_revnum_t end, svn_boolean_t inheritable, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Return a deep copy of mergeinfo, excluding all non-inheritable svn_merge_range_t if inheritable is TR...
long int svn_revnum_t
About Special Files in Subversion.
svn_error_t * svn_rangelist_merge2(svn_rangelist_t *rangelist, const svn_rangelist_t *changes, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Merge two rangelists consisting of svn_merge_range_t * elements, rangelist and changes, placing the results in rangelist.
svn_error_t * svn_mergeinfo_remove2(svn_mergeinfo_t *mergeinfo, svn_mergeinfo_t eraser, svn_mergeinfo_t whiteboard, svn_boolean_t consider_inheritance, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Removes eraser (the subtrahend) from whiteboard (the minuend), and places the resulting difference in...
svn_mergeinfo_t svn_mergeinfo_dup(svn_mergeinfo_t mergeinfo, apr_pool_t *pool)
Return a deep copy of mergeinfo, allocated in pool.
svn_mergeinfo_inheritance_t svn_inheritance_from_word(const char *word)
Return the appropriate svn_mergeinfo_inheritance_t for word.
svn_error_t * svn_mergeinfo_diff2(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added, svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto, svn_boolean_t consider_inheritance, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Calculate the delta between two mergeinfos, mergefrom and mergeto (either or both of which may be NUL...
svn_error_t * svn_mergeinfo_sort(svn_mergeinfo_t mergeinfo, apr_pool_t *pool)
Take a hash of mergeinfo in mergeinfo, and sort the rangelists associated with each key (in place)...
int svn_boolean_t
YABT: Yet Another Boolean Type.
svn_error_t * svn_rangelist_inheritable(svn_rangelist_t **inheritable_rangelist, const svn_rangelist_t *rangelist, svn_revnum_t start, svn_revnum_t end, apr_pool_t *pool)
Like svn_rangelist_inheritable2, but always finds inheritable ranges.
svn_error_t * svn_rangelist_remove(svn_rangelist_t **output, const svn_rangelist_t *eraser, const svn_rangelist_t *whiteboard, svn_boolean_t consider_inheritance, apr_pool_t *pool)
Removes eraser (the subtrahend) from whiteboard (the minuend), and places the resulting difference in...
svn_error_t * svn_mergeinfo_remove(svn_mergeinfo_t *mergeinfo, svn_mergeinfo_t eraser, svn_mergeinfo_t whiteboard, apr_pool_t *pool)
Like svn_mergeinfo_remove2, but always considers inheritance.
svn_error_t * svn_mergeinfo_intersect2(svn_mergeinfo_t *mergeinfo, svn_mergeinfo_t mergeinfo1, svn_mergeinfo_t mergeinfo2, svn_boolean_t consider_inheritance, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
Find the intersection of two mergeinfos, mergeinfo1 and mergeinfo2, and place the result in *mergeinf...
svn_error_t * svn_rangelist_to_string(svn_string_t **output, const svn_rangelist_t *rangelist, apr_pool_t *pool)
Take an array of svn_merge_range_t *'s in rangelist, and convert it back to a text format rangelist i...
svn_rangelist_t * svn_rangelist_dup(const svn_rangelist_t *rangelist, apr_pool_t *pool)
Return a deep copy of rangelist, allocated in pool.