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 "*"
202 svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
204 apr_pool_t *result_pool,
205 apr_pool_t *scratch_pool);
215 svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
238 svn_mergeinfo_t changes,
239 apr_pool_t *result_pool,
240 apr_pool_t *scratch_pool);
249 svn_mergeinfo_t changes,
263 svn_mergeinfo_catalog_t changes_catalog,
264 apr_pool_t *result_pool,
265 apr_pool_t *scratch_pool);
274 svn_mergeinfo_t whiteboard, apr_pool_t *pool);
289 svn_mergeinfo_t eraser,
290 svn_mergeinfo_t whiteboard,
292 apr_pool_t *result_pool,
293 apr_pool_t *scratch_pool);
308 const svn_rangelist_t *from,
const svn_rangelist_t *to,
335 const svn_rangelist_t *changes,
336 apr_pool_t *result_pool,
337 apr_pool_t *scratch_pool);
354 const svn_rangelist_t *changes,
374 const svn_rangelist_t *whiteboard,
391 svn_mergeinfo_t mergeinfo1,
392 svn_mergeinfo_t mergeinfo2,
394 apr_pool_t *result_pool,
395 apr_pool_t *scratch_pool);
404 svn_mergeinfo_t mergeinfo1,
405 svn_mergeinfo_t mergeinfo2,
431 const svn_rangelist_t *rangelist1,
432 const svn_rangelist_t *rangelist2,
457 const svn_rangelist_t *rangelist,
480 const svn_rangelist_t *rangelist,
484 apr_pool_t *result_pool,
485 apr_pool_t *scratch_pool);
495 const svn_rangelist_t *rangelist,
525 svn_mergeinfo_t mergeinfo,
530 apr_pool_t *result_pool,
531 apr_pool_t *scratch_pool);
541 svn_mergeinfo_t mergeinfo,
558 svn_mergeinfo_t mergeinput,
576 svn_mergeinfo_catalog_t
Counted-length strings for Subversion, plus some C string goodies.
apr_hash_t * svn_mergeinfo_t
A hash mapping merge source paths to non-empty rangelist arrays.
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)
Remove non-inheritable or inheritable revision ranges from a rangelist.
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)
Remove non-inheritable or inheritable revision ranges from mergeinfo.
long int svn_revnum_t
About Special Files in Subversion.
apr_hash_t * svn_mergeinfo_catalog_t
A hash mapping paths (const char *) to svn_mergeinfo_t.
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.