Since this is up for a backport, I'm taking a closer look...
On Sat, Jan 17, 2009 at 02:53, Paul T. Burba <pburba_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_subr/mergeinfo.c Fri Jan 16 17:53:26 2009 (r35297)
>...
> -static svn_error_t *
> -combine_with_adjacent_lastrange(svn_merge_range_t **lastrange,
> - svn_merge_range_t *mrange,
> - svn_boolean_t dup_mrange,
> - apr_array_header_t *revlist,
> - apr_pool_t *pool)
> -{
> - svn_merge_range_t *pushed_mrange = mrange;
> -
> - if (*lastrange)
> - {
> - svn_string_t *r1, *r2;
> -
> - if ((*lastrange)->start <= mrange->end
> - && mrange->start <= (*lastrange)->end)
> - {
> - /* The ranges intersect. */
> - SVN_ERR(range_to_string(&r1, *lastrange, pool));
> - SVN_ERR(range_to_string(&r2, mrange, pool));
> -
> - /* svn_mergeinfo_parse promises to combine adjacent
> - ranges, but not overlapping ranges. */
> - if (mrange->start < (*lastrange)->end)
> - {
> - return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
> - _("Parsing of overlapping revision "
> - "ranges '%s' and '%s' is not "
> - "supported"), r1->data, r2->data);
> - }
> - else if ((*lastrange)->inheritable == mrange->inheritable)
> - {
> - /* Combine adjacent ranges with the same inheritability. */
> - (*lastrange)->end = mrange->end;
> - return SVN_NO_ERROR;
> - }
> - }
> - else if ((*lastrange)->start > mrange->start)
> - {
> - SVN_ERR(range_to_string(&r1, *lastrange, pool));
> - SVN_ERR(range_to_string(&r2, mrange, pool));
> - return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
> - _("Unable to parse unordered revision "
> - "ranges '%s' and '%s'"),
> - r1->data, r2->data);
Where did this check go? It looks like checks for unordered ranges
have been dropped, with no compensation elsewhere for detecting or
correcting unordered ranges.
Or... is this because the check in parse_revlist() is sufficient, so
that check is redundant?
>...
> +++ trunk/subversion/tests/libsvn_subr/mergeinfo-test.c Fri Jan 16 17:53:26 2009 (r35297)
> @@ -41,7 +41,7 @@ fail(apr_pool_t *pool, const char *fmt,
> return svn_error_create(SVN_ERR_TEST_FAILED, 0, msg);
> }
>
> -#define MAX_NBR_RANGES 3
> +#define MAX_NBR_RANGES 5
>
> /* Verify that INPUT is parsed properly, and returns an error if
> parsing fails, or incorret parsing is detected. Assumes that INPUT
> @@ -110,7 +110,7 @@ verify_mergeinfo_parse(const char *input
> -> merge ranges. */
> static apr_hash_t *info1, *info2;
>
> -#define NBR_MERGEINFO_VALS 8
> +#define NBR_MERGEINFO_VALS 13
These kinds of constructs are just silly. Use:
#define NBR_MERGEINFO_VALS (sizeof(mergeinfo_vals) / sizeof(mergeinfo_vals[0]))
There are lots in that test file :-(
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1225652
Received on 2009-02-25 10:07:32 CET