Checkout
rhuijben
committed
on 12 Jul 17
Expose the mergerange canonical form helper functions in the private api
to allow hiding some implementation details. Improve the canonical … Show more
Expose the mergerange canonical form helper functions in the private api

to allow hiding some implementation details. Improve the canonical form

api to verify assumptions related to inheritability.

This is initial plumbing for fixing issue #4686.

* subversion/include/private/svn_mergeinfo_private.h

 (svn_rangelist__parse): Update comment.

 (svn_rangelist__is_canonical): New function.

 (svn_rangelist__combine_adjacent_ranges): Remove function, as users

   should really call the canonicalize function.

* subversion/libsvn_subr/deprecated.c

 (svn_rangelist_merge): Canonicalize the result, instead of just merging

   ranges.

* subversion/libsvn_subr/mergeinfo.c

 (is_rangelist_normalized): Rename to...

 (svn_rangelist__is_canonical): ... this and remove the existing

    limitations.

 (svn_rangelist__canonicalize): Update caller and fold in the actual

    canonicalization that used to be in...

 (svn_rangelist__combine_adjacent_ranges): ... this function.

 (svn_rangelist_merge2): In SVN_DEBUG mode verify that the result is

    canonical when the input arguments are. Currently this assertion

    fails for issue #4686.

* subversion/tests/libsvn_subr/mergeinfo-test.c

 (test_rangelist_merge_overlap): Add some test assertions using the new

    helper function.

Show less