Introduce the svn_cstring_join2() API that allows selecting if the trailing separator is required in the joined string.
Previously, svn_cstring_join() has been always appending the trailing separator, and that required us to sometimes manually strip that final separator from the result.
* subversion/include/svn_string.h (svn_cstring_join2): New, revved from ... (svn_cstring_join): ...this function, which is now deprecated.
* subversion/libsvn_subr/string.c (svn_cstring_join2): New, supports the new 'trailing_separator' argument. (svn_cstring_join): Move ...
* subversion/libsvn_subr/deprecated.c (svn_cstring_join): ...here and call svn_cstring_join2() with the 'trailing_separator' set to true, to match the original behavior.
* subversion/tests/libsvn_subr/string-test.c (test_cstring_join): New test. (test_funcs): Add new test.
* subversion/libsvn_repos/hooks.c (svn_repos__hooks_start_commit): Use svn_cstring_join2() without the trailing separator, instead of manually stripping it from the resulting string. (svn_repos__hooks_post_lock, svn_repos__hooks_post_unlock): Switch to svn_cstring_join2(), request the trailing separator as before.
* tools/dev/svnmover/svnmover.c (execute): Switch to svn_cstring_join2(), request the trailing separator as before.
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.