- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# svn_mergeinfo.h

Go to the documentation of this file.

    00001 /**
    00002  * @copyright
    00003  * ====================================================================
    00004  *    Licensed to the Apache Software Foundation (ASF) under one
    00005  *    or more contributor license agreements.  See the NOTICE file
    00006  *    distributed with this work for additional information
    00007  *    regarding copyright ownership.  The ASF licenses this file
    00008  *    to you under the Apache License, Version 2.0 (the
    00009  *    "License"); you may not use this file except in compliance
    00010  *    with the License.  You may obtain a copy of the License at
    00011  *
    00012  *      http://www.apache.org/licenses/LICENSE-2.0
    00013  *
    00014  *    Unless required by applicable law or agreed to in writing,
    00015  *    software distributed under the License is distributed on an
    00016  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    00017  *    KIND, either express or implied.  See the License for the
    00018  *    specific language governing permissions and limitations
    00019  *    under the License.
    00020  * ====================================================================
    00021  * @endcopyright
    00022  *
    00023  * @file svn_mergeinfo.h
    00024  * @brief mergeinfo handling and processing
    00025  */
    00026
    00027
    00028 #ifndef SVN_MERGEINFO_H
    00029 #define SVN_MERGEINFO_H
    00030
    00031 #include <apr_pools.h>
    00032 #include <apr_tables.h>  /* for apr_array_header_t */
    00033 #include <apr_hash.h>
    00034
    00035 #include "svn_types.h"
    00036 #include "svn_string.h"  /* for svn_string_t */
    00037
    00038
    00039 #ifdef __cplusplus
    00040 extern "C" {
    00041 #endif /* __cplusplus */
    00042
    00043 /** Overview of the @c SVN_PROP_MERGEINFO property.
    00044  *
    00045  * Merge history is stored in the @c SVN_PROP_MERGEINFO property of files
    00046  * and directories.  The @c SVN_PROP_MERGEINFO property on a path stores the
    00047  * complete list of changes merged to that path, either directly or via the
    00048  * path's parent, grand-parent, etc..  A path may have empty mergeinfo which
    00049  * means that nothing has been merged to that path or all previous merges
    00050  * to the path were reversed.  Note that a path may have no mergeinfo, this
    00051  * is not the same as empty mergeinfo.
    00052  *
    00053  * Every path in a tree may have @c SVN_PROP_MERGEINFO set, but if the
    00054  * @c SVN_PROP_MERGEINFO for a path is equivalent to the
    00055  * @c SVN_PROP_MERGEINFO for its parent, then the @c SVN_PROP_MERGEINFO on
    00056  * the path will 'elide' (be removed) from the path as a post step to any
    00057  * merge.  If a path's parent does not have any @c SVN_PROP_MERGEINFO set,
    00058  * the path's mergeinfo can elide to its nearest grand-parent,
    00059  * great-grand-parent, etc. that has equivalent @c SVN_PROP_MERGEINFO set
    00060  * on it.
    00061  *
    00062  * If a path has no @c SVN_PROP_MERGEINFO of its own, it inherits mergeinfo
    00063  * from its nearest parent that has @c SVN_PROP_MERGEINFO set.  The
    00064  * exception to this is @c SVN_PROP_MERGEINFO with non-inheritable revision
    00065  * ranges.  These non-inheritable ranges apply only to the path which they
    00066  * are set on.
    00067  *
    00068  * Due to Subversion's allowance for mixed revision working copies, both
    00069  * elision and inheritance within the working copy presume the path
    00070  * between a path and its nearest parent with mergeinfo is at the same
    00071  * working revision.  If this is not the case then neither inheritance nor
    00072  * elision can occur.
    00073  *
    00074  * The value of the @c SVN_PROP_MERGEINFO property is either an empty string
    00075  * (representing empty mergeinfo) or a non-empty string consisting of
    00076  * a path, a colon, and comma separated revision list, containing one or more
    00077  * revision or revision ranges. Revision range start and end points are
    00078  * separated by "-".  Revisions and revision ranges may have the optional
    00079  * @c SVN_MERGEINFO_NONINHERITABLE_STR suffix to signify a non-inheritable
    00080  * revision/revision range.
    00081  *
    00082  * @c SVN_PROP_MERGEINFO Value Grammar:
    00083  *
    00084  *   Token             Definition
    00085  *   -----             ----------
    00086  *   revisionrange     REVISION1 "-" REVISION2
    00087  *   revisioneelement  (revisionrange | REVISION)"*"?
    00088  *   rangelist         revisioneelement (COMMA revisioneelement)*
    00089  *   revisionline      PATHNAME COLON rangelist
    00090  *   top               "" | (revisionline (NEWLINE revisionline))*
    00091  *
    00092  * The PATHNAME is the source of a merge and the rangelist the revision(s)
    00093  * merged to the path @c SVN_PROP_MERGEINFO is set on directly or indirectly
    00094  * via inheritance.  PATHNAME must always exist at the specified rangelist
    00095  * and thus a single merge may result in multiple revisionlines if the source
    00096  * was renamed.
    00097  *
    00098  * Rangelists must be sorted from lowest to highest revision and cannot
    00099  * contain overlapping revisionlistelements.  REVISION1 must be less than
    00100  * REVISION2.  Consecutive single revisions that can be represented by a
    00101  * revisionrange are allowed however (e.g. '5,6,7,8,9-12' or '5-12' are
    00102  * both acceptable).
    00103  */
    00104
    00105 /* Suffix for SVN_PROP_MERGEINFO revision ranges indicating a given
    00106    range is non-inheritable. */
    00107 #define SVN_MERGEINFO_NONINHERITABLE_STR "*"
    00108
    00109 /** Terminology for data structures that contain mergeinfo.
    00110  *
    00111  * Subversion commonly uses several data structures to represent
    00112  * mergeinfo in RAM:
    00113  *
    00114  * (a) Strings (@c svn_string_t *) containing "unparsed mergeinfo".
    00115  *
    00116  * (b) A "rangelist".  An array (@c apr_array_header_t *) of non-overlapping
    00117  *     merge ranges (@c svn_merge_range_t *), sorted as said by
    00118  *     @c svn_sort_compare_ranges().  An empty range list is represented by
    00119  *     an empty array.  Unless specifically noted otherwise, all APIs require
    00120  *     rangelists that describe only forward ranges, i.e. the range's start
    00121  *     revision is less than its end revision.
    00122  *
    00123  * (c) @c svn_mergeinfo_t, called "mergeinfo".  A hash mapping merge
    00124  *     source paths (@c const char *, starting with slashes) to
    00125  *     non-empty rangelist arrays.  A @c NULL hash is used to represent
    00126  *     no mergeinfo and an empty hash is used to represent empty
    00127  *     mergeinfo.
    00128  *
    00129  * (d) @c svn_mergeinfo_catalog_t, called a "mergeinfo catalog".  A hash
    00130  *     mapping paths (@c const char *) to @c svn_mergeinfo_t.
    00131  *
    00132  * Both @c svn_mergeinfo_t and @c svn_mergeinfo_catalog_t are just
    00133  * typedefs for @c apr_hash_t *; there is no static type-checking, and
    00134  * you still use standard @c apr_hash_t functions to interact with
    00135  * them.
    00136  *
    00137  * Note that while the keys of mergeinfos are always absolute from the
    00138  * repository root, the keys of a catalog may be relative to something
    00139  * else, such as an RA session root.
    00140  */
    00141
    00142 typedef apr_hash_t *svn_mergeinfo_t;
    00143 typedef apr_hash_t *svn_mergeinfo_catalog_t;
    00144
    00145 /** Parse the mergeinfo from @a input into @a *mergeinfo.  If no
    00146  * mergeinfo is available, return an empty mergeinfo (never @c NULL).
    00147  * Perform temporary allocations in @a pool.
    00148  *
    00149  * If @a input is not a grammatically correct @c SVN_PROP_MERGEINFO
    00150  * property, contains overlapping revision ranges of differing
    00151  * inheritability, or revision ranges with a start revision greater
    00152  * than or equal to its end revision, or contains paths mapped to empty
    00153  * revision ranges, then return  @c SVN_ERR_MERGEINFO_PARSE_ERROR.
    00154  * Unordered revision ranges are  allowed, but will be sorted when
    00155  * placed into @a *mergeinfo.  Overlapping revision ranges of the same
    00156  * inheritability are also allowed, but will be combined into a single
    00157  * range when placed into @a *mergeinfo.
    00158  *
    00159  * @a input may contain relative merge source paths, but these are
    00160  * converted to absolute paths in @a *mergeinfo.
    00161  *
    00162  * @since New in 1.5.
    00163  */
    00164 svn_error_t *
    00165 svn_mergeinfo_parse(svn_mergeinfo_t *mergeinfo, const char *input,
    00166                     apr_pool_t *pool);
    00167
    00168 /** Calculate the delta between two mergeinfos, @a mergefrom and @a mergeto
    00169  * (which may be @c NULL), and place the result in @a *deleted and @a
    00170  * *added (neither output argument may be @c NULL).
    00171  *
    00172  * @a consider_inheritance determines how the rangelists in the two
    00173  * hashes are compared for equality.  If @a consider_inheritance is FALSE,
    00174  * then the start and end revisions of the @c svn_merge_range_t's being
    00175  * compared are the only factors considered when determining equality.
    00176  *
    00177  *  e.g. '/trunk: 1,3-4*,5' == '/trunk: 1,3-5'
    00178  *
    00179  * If @a consider_inheritance is TRUE, then the inheritability of the
    00180  * @c svn_merge_range_t's is also considered and must be the same for two
    00181  * otherwise identical ranges to be judged equal.
    00182  *
    00183  *  e.g. '/trunk: 1,3-4*,5' != '/trunk: 1,3-5'
    00184  *       '/trunk: 1,3-4*,5' == '/trunk: 1,3-4*,5'
    00185  *       '/trunk: 1,3-4,5'  == '/trunk: 1,3-4,5'
    00186  *
    00187  * @since New in 1.5.
    00188  */
    00189 svn_error_t *
    00190 svn_mergeinfo_diff(svn_mergeinfo_t *deleted, svn_mergeinfo_t *added,
    00191                    svn_mergeinfo_t mergefrom, svn_mergeinfo_t mergeto,
    00192                    svn_boolean_t consider_inheritance,
    00193                    apr_pool_t *pool);
    00194
    00195 /** Merge a shallow copy of one mergeinfo, @a changes, into another mergeinfo
    00196  * @a mergeinfo.
    00197  *
    00198  * When intersecting rangelists for a path are merged, the inheritability of
    00199  * the resulting svn_merge_range_t depends on the inheritability of the
    00200  * operands.  If two non-inheritable ranges are merged the result is always
    00201  * non-inheritable, in all other cases the resulting range is inheritable.
    00202  *
    00203  *  e.g. '/A: 1,3-4'  merged with '/A: 1,3,4*,5' --> '/A: 1,3-5'
    00204  *       '/A: 1,3-4*' merged with '/A: 1,3,4*,5' --> '/A: 1,3,4*,5'
    00205  *
    00206  * @since New in 1.5.
    00207  */
    00208 svn_error_t *
    00209 svn_mergeinfo_merge(svn_mergeinfo_t mergeinfo, svn_mergeinfo_t changes,
    00210                     apr_pool_t *pool);
    00211
    00212 /** Combine one mergeinfo catalog, @a changes_catalog, into another mergeinfo
    00213  * catalog @a mergeinfo_catalog.  If both catalogs have mergeinfo for the same
    00214  * key, use svn_mergeinfo_merge() to combine the mergeinfos.
    00215  *
    00216  * Additions to @a mergeinfo_catalog are deep copies allocated in
    00217  * @a result_pool.  Temporary allocations are made in @a scratch_pool.
    00218  *
    00219  * @since New in 1.7.
    00220  */
    00221 svn_error_t *
    00222 svn_mergeinfo_catalog_merge(svn_mergeinfo_catalog_t mergeinfo_catalog,
    00223                             svn_mergeinfo_catalog_t changes_catalog,
    00224                             apr_pool_t *result_pool,
    00225                             apr_pool_t *scratch_pool);
    00226
    00227 /** Like svn_mergeinfo_remove2, but always considers inheritance.
    00228  *
    00229  * @deprecated Provided for backward compatibility with the 1.6 API.
    00230  */
    00231 SVN_DEPRECATED
    00232 svn_error_t *
    00233 svn_mergeinfo_remove(svn_mergeinfo_t *mergeinfo, svn_mergeinfo_t eraser,
    00234                      svn_mergeinfo_t whiteboard, apr_pool_t *pool);
    00235
    00236 /** Removes @a eraser (the subtrahend) from @a whiteboard (the
    00237  * minuend), and places the resulting difference in @a *mergeinfo.
    00238  * Allocates @a *mergeinfo in @a result_pool.  Temporary allocations
    00239  * will be performed in @a scratch_pool.
    00240  *
    00241  * @a consider_inheritance determines how to account for the inheritability
    00242  * of the two mergeinfo's ranges when calculating the range equivalence,
    00243  * as described for svn_mergeinfo_diff().
    00244  *
    00245  * @since New in 1.7.
    00246  */
    00247 svn_error_t *
    00248 svn_mergeinfo_remove2(svn_mergeinfo_t *mergeinfo,
    00249                       svn_mergeinfo_t eraser,
    00250                       svn_mergeinfo_t whiteboard,
    00251                       svn_boolean_t consider_inheritance,
    00252                       apr_pool_t *result_pool,
    00253                       apr_pool_t *scratch_pool);
    00254
    00255 /** Calculate the delta between two rangelists consisting of @c
    00256  * svn_merge_range_t * elements (sorted in ascending order), @a from
    00257  * and @a to, and place the result in @a *deleted and @a *added
    00258  * (neither output argument will ever be @c NULL).
    00259  *
    00260  * @a consider_inheritance determines how to account for the inheritability
    00261  * of the two rangelist's ranges when calculating the diff,
    00262  * as described for svn_mergeinfo_diff().
    00263  *
    00264  * @since New in 1.5.
    00265  */
    00266 svn_error_t *
    00267 svn_rangelist_diff(apr_array_header_t **deleted, apr_array_header_t **added,
    00268                    const apr_array_header_t *from, const apr_array_header_t *to,
    00269                    svn_boolean_t consider_inheritance,
    00270                    apr_pool_t *pool);
    00271
    00272 /** Merge two rangelists consisting of @c svn_merge_range_t *
    00273  * elements, @a *rangelist and @a changes, placing the results in
    00274  * @a *rangelist.  Either rangelist may be empty.
    00275  *
    00276  * When intersecting rangelists are merged, the inheritability of
    00277  * the resulting svn_merge_range_t depends on the inheritability of the
    00278  * operands: see svn_mergeinfo_merge().
    00279  *
    00280  * Note: @a *rangelist and @a changes must be sorted as said by @c
    00281  * svn_sort_compare_ranges().  @a *rangelist is guaranteed to remain
    00282  * in sorted order and be compacted to the minimal number of ranges
    00283  * needed to represent the merged result.
    00284  *
    00285  * @since New in 1.5.
    00286  */
    00287 svn_error_t *
    00288 svn_rangelist_merge(apr_array_header_t **rangelist,
    00289                     const apr_array_header_t *changes,
    00290                     apr_pool_t *pool);
    00291
    00292 /** Removes @a eraser (the subtrahend) from @a whiteboard (the
    00293  * minuend), and places the resulting difference in @a output.
    00294  *
    00295  * Note: @a eraser and @a whiteboard must be sorted as said by @c
    00296  * svn_sort_compare_ranges().  @a output is guaranteed to be in sorted
    00297  * order.
    00298  *
    00299  * @a consider_inheritance determines how to account for the
    00300  * @c svn_merge_range_t inheritable field when comparing @a whiteboard's
    00301  * and @a *eraser's rangelists for equality.  @see svn_mergeinfo_diff().
    00302  *
    00303  * @since New in 1.5.
    00304  */
    00305 svn_error_t *
    00306 svn_rangelist_remove(apr_array_header_t **output, const apr_array_header_t *eraser,
    00307                      const apr_array_header_t *whiteboard,
    00308                      svn_boolean_t consider_inheritance,
    00309                      apr_pool_t *pool);
    00310
    00311 /** Find the intersection of two mergeinfos, @a mergeinfo1 and @a
    00312  * mergeinfo2, and place the result in @a *mergeinfo, which is (deeply)
    00313  * allocated in @a result_pool.  Temporary allocations will be performed
    00314  * in @a scratch_pool.
    00315  *
    00316  * @a consider_inheritance determines how to account for the inheritability
    00317  * of the two mergeinfo's ranges when calculating the range equivalence,
    00318  * @see svn_rangelist_intersect().
    00319  *
    00320  * @since New in 1.7.
    00321  */
    00322 svn_error_t *
    00323 svn_mergeinfo_intersect2(svn_mergeinfo_t *mergeinfo,
    00324                          svn_mergeinfo_t mergeinfo1,
    00325                          svn_mergeinfo_t mergeinfo2,
    00326                          svn_boolean_t consider_inheritance,
    00327                          apr_pool_t *result_pool,
    00328                          apr_pool_t *scratch_pool);
    00329
    00330 /** Like svn_mergeinfo_intersect2, but always considers inheritance.
    00331  *
    00332  * @deprecated Provided for backward compatibility with the 1.6 API.
    00333  */
    00334 SVN_DEPRECATED
    00335 svn_error_t *
    00336 svn_mergeinfo_intersect(svn_mergeinfo_t *mergeinfo,
    00337                         svn_mergeinfo_t mergeinfo1,
    00338                         svn_mergeinfo_t mergeinfo2,
    00339                         apr_pool_t *pool);
    00340
    00341 /** Find the intersection of two rangelists consisting of @c
    00342  * svn_merge_range_t * elements, @a rangelist1 and @a rangelist2, and
    00343  * place the result in @a *rangelist (which is never @c NULL).
    00344  *
    00345  * @a consider_inheritance determines how to account for the inheritability
    00346  * of the two rangelist's ranges when calculating the intersection,
    00347  * @see svn_mergeinfo_diff().  If @a consider_inheritance is FALSE then
    00348  * ranges with different inheritance can intersect, but the the resulting
    00349  * @a *rangelist is non-inheritable only if the corresponding ranges from
    00350  * both @a rangelist1 and @a rangelist2 are non-inheritable.
    00351  * If @a consider_inheritance is TRUE, then ranges with different
    00352  * inheritance can never intersect.
    00353  *
    00354  * Note: @a rangelist1 and @a rangelist2 must be sorted as said by @c
    00355  * svn_sort_compare_ranges(). @a *rangelist is guaranteed to be in sorted
    00356  * order.
    00357  * @since New in 1.5.
    00358  */
    00359 svn_error_t *
    00360 svn_rangelist_intersect(apr_array_header_t **rangelist,
    00361                         const apr_array_header_t *rangelist1,
    00362                         const apr_array_header_t *rangelist2,
    00363                         svn_boolean_t consider_inheritance,
    00364                         apr_pool_t *pool);
    00365
    00366 /** Reverse @a rangelist, and the @c start and @c end fields of each
    00367  * range in @a rangelist, in place.
    00368  *
    00369  * TODO(miapi): Is this really a valid function?  Rangelists that
    00370  * aren't sorted, or rangelists containing reverse ranges, are
    00371  * generally not valid in mergeinfo code.  Can we rewrite the two
    00372  * places where this is used?
    00373  *
    00374  * @since New in 1.5.
    00375  */
    00376 svn_error_t *
    00377 svn_rangelist_reverse(apr_array_header_t *rangelist, apr_pool_t *pool);
    00378
    00379 /** Take an array of svn_merge_range_t *'s in @a rangelist, and convert it
    00380  * back to a text format rangelist in @a output.  If @a rangelist contains
    00381  * no elements, sets @a output to the empty string.
    00382  *
    00383  * @since New in 1.5.
    00384  */
    00385 svn_error_t *
    00386 svn_rangelist_to_string(svn_string_t **output,
    00387                         const apr_array_header_t *rangelist,
    00388                         apr_pool_t *pool);
    00389
    00390 /** Return a deep copy of @c svn_merge_range_t *'s in @a rangelist excluding
    00391  * all non-inheritable @c svn_merge_range_t if @a inheritable is TRUE or
    00392  * excluding all inheritable @c svn_merge_range_t otherwise.  If @a start and
    00393  * @a end are valid revisions and @a start is less than or equal to @a end,
    00394  * then exclude only the non-inheritable revision ranges that intersect
    00395  * inclusively with the range defined by @a start and @a end.  If
    00396  * @a rangelist contains no elements, return an empty array.  Allocate the
    00397  * copy in @a result_pool, use @a scratch_pool for temporary allocations.
    00398  *
    00399  * @since New in 1.7.
    00400  */
    00401 svn_error_t *
    00402 svn_rangelist_inheritable2(apr_array_header_t **inheritable_rangelist,
    00403                            const apr_array_header_t *rangelist,
    00404                            svn_revnum_t start,
    00405                            svn_revnum_t end,
    00406                            svn_boolean_t inheritable,
    00407                            apr_pool_t *result_pool,
    00408                            apr_pool_t *scratch_pool);
    00409
    00410 /** Like svn_rangelist_inheritable2, but always finds inheritable ranges.
    00411  *
    00412  * @since New in 1.5.
    00413  * @deprecated Provided for backward compatibility with the 1.6 API.
    00414  */
    00415 SVN_DEPRECATED
    00416 svn_error_t *
    00417 svn_rangelist_inheritable(apr_array_header_t **inheritable_rangelist,
    00418                           const apr_array_header_t *rangelist,
    00419                           svn_revnum_t start,
    00420                           svn_revnum_t end,
    00421                           apr_pool_t *pool);
    00422
    00423 /** Return a deep copy of @a mergeinfo, excluding all non-inheritable
    00424  * @c svn_merge_range_t if @a inheritable is TRUE or excluding all
    00425  * inheritable @c svn_merge_range_t otherwise.  If @a start and @a end
    00426  * are valid revisions and @a start is less than or equal to @a end,
    00427  * then exclude only the non-inheritable revisions that intersect
    00428  * inclusively with the range defined by @a start and @a end.  If @a path
    00429  * is not NULL remove non-inheritable ranges only for @a path.  If all
    00430  * ranges are removed for a given path then remove that path as well.
    00431  * If all paths are removed or @a rangelist is empty then set
    00432  * @a *inheritable_rangelist to an empty array.  Allocate the copy in
    00433  * @a result_pool, use @a scratch_pool for temporary allocations.
    00434  *
    00435  * @since New in 1.7.
    00436  */
    00437 svn_error_t *
    00438 svn_mergeinfo_inheritable2(svn_mergeinfo_t *inheritable_mergeinfo,
    00439                            svn_mergeinfo_t mergeinfo,
    00440                            const char *path,
    00441                            svn_revnum_t start,
    00442                            svn_revnum_t end,
    00443                            svn_boolean_t inheritable,
    00444                            apr_pool_t *result_pool,
    00445                            apr_pool_t *scratch_pool);
    00446
    00447 /** Like svn_mergeinfo_inheritable2, but always finds inheritable mergeinfo.
    00448  *
    00449  * @since New in 1.5.
    00450  * @deprecated Provided for backward compatibility with the 1.6 API.
    00451  */
    00452 SVN_DEPRECATED
    00453 svn_error_t *
    00454 svn_mergeinfo_inheritable(svn_mergeinfo_t *inheritable_mergeinfo,
    00455                           svn_mergeinfo_t mergeinfo,
    00456                           const char *path,
    00457                           svn_revnum_t start,
    00458                           svn_revnum_t end,
    00459                           apr_pool_t *pool);
    00460
    00461 /** Take a mergeinfo in @a mergeinput, and convert it to unparsed
    00462  *  mergeinfo. Set @a *output to the result, allocated in @a pool.
    00463  *  If @a input contains no elements, set @a *output to the empty string.
    00464  *
    00465  * @a mergeinput may contain relative merge source paths, but these are
    00466  * converted to absolute paths in @a *output.
    00467  *
    00468  * @since New in 1.5.
    00469 */
    00470 svn_error_t *
    00471 svn_mergeinfo_to_string(svn_string_t **output,
    00472                         svn_mergeinfo_t mergeinput,
    00473                         apr_pool_t *pool);
    00474
    00475 /** Take a hash of mergeinfo in @a mergeinfo, and sort the rangelists
    00476  * associated with each key (in place).
    00477  *
    00478  * TODO(miapi): mergeinfos should *always* be sorted.  This should be
    00479  * a private function.
    00480  *
    00481  * @since New in 1.5
    00482  */
    00483 svn_error_t *
    00484 svn_mergeinfo_sort(svn_mergeinfo_t mergeinfo, apr_pool_t *pool);
    00485
    00486 /** Return a deep copy of @a mergeinfo_catalog, allocated in @a pool.
    00487  *
    00488  * @since New in 1.6.
    00489  */
    00490 svn_mergeinfo_catalog_t
    00491 svn_mergeinfo_catalog_dup(svn_mergeinfo_catalog_t mergeinfo_catalog,
    00492                           apr_pool_t *pool);
    00493
    00494 /** Return a deep copy of @a mergeinfo, allocated in @a pool.
    00495  *
    00496  * @since New in 1.5.
    00497  */
    00498 svn_mergeinfo_t
    00499 svn_mergeinfo_dup(svn_mergeinfo_t mergeinfo, apr_pool_t *pool);
    00500
    00501 /** Return a deep copy of @a rangelist, allocated in @a pool.
    00502  *
    00503  * @since New in 1.5.
    00504  */
    00505 apr_array_header_t *
    00506 svn_rangelist_dup(const apr_array_header_t *rangelist, apr_pool_t *pool);
    00507
    00508
    00509 /**
    00510  * The three ways to request mergeinfo affecting a given path.
    00511  *
    00512  * @since New in 1.5.
    00513  */
    00514 typedef enum svn_mergeinfo_inheritance_t
    00515 {
    00516   /** Explicit mergeinfo only. */
    00517   svn_mergeinfo_explicit,
    00518
    00519   /** Explicit mergeinfo, or if that doesn't exist, the inherited
    00520       mergeinfo from a target's nearest (path-wise, not history-wise)
    00521       ancestor. */
    00522   svn_mergeinfo_inherited,
    00523
    00524   /** Mergeinfo on target's nearest (path-wise, not history-wise)
    00525       ancestor, regardless of whether target has explicit mergeinfo. */
    00526   svn_mergeinfo_nearest_ancestor
    00527 } svn_mergeinfo_inheritance_t;
    00528
    00529 /** Return a constant string expressing @a inherit as an English word,
    00530  * i.e., "explicit" (default), "inherited", or "nearest_ancestor".
    00531  * The string is not localized, as it may be used for client<->server
    00532  * communications.
    00533  *
    00534  * @since New in 1.5.
    00535  */
    00536 const char *
    00537 svn_inheritance_to_word(svn_mergeinfo_inheritance_t inherit);
    00538
    00539
    00540 /** Return the appropriate @c svn_mergeinfo_inheritance_t for @a word.
    00541  * @a word is as returned from svn_inheritance_to_word().  Defaults to
    00542  * @c svn_mergeinfo_explicit.
    00543  *
    00544  * @since New in 1.5.
    00545  */
    00546 svn_mergeinfo_inheritance_t
    00547 svn_inheritance_from_word(const char *word);
    00548
    00549
    00550 #ifdef __cplusplus
    00551 }
    00552 #endif /* __cplusplus */
    00553
    00554 #endif /* SVN_MERGEINFO_H */

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines