[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] [merge-tracking]clarity fix for subversion/libsvn_subr/mergeinfo.c

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2006-07-12 09:37:59 CEST

Kamesh Jayachandran wrote:
> Hi All,
> Find the attached patch.
>
> With regards
> Kamesh Jayachandran
>
> [[[
> Patch by: Kamesh Jayachandran <kamesh@collab.net>
>
> Code clarity fix.
>
> * subversion/libsvn_subr/mergeinfo.c
> (rangelist_intersect_or_remove):
> If elt2 and elt1 intersect(Not 'contains'(As 'contains' is a special case
> of 'intersect')), 'elt1->start < elt2->start' and '(elt1->end >
> elt2->end)'
> are mutually exclusive conditions which can be represented as 'if...else'
> block rather than subsequent 'if...if' block.

So, for the code that's there, this is wrong.

Given:

elt1 == 5, 9
elt2 == 6, 8

These intersect, and we have elt1->start < elt2->start && elt1->end >
elt2->end.
So they aren't mutually exclusive conditions.

However, we only check whether elt2 contains elt1 (search for
range_contains), not the other way around, so this patch would change
the semantics in the case that range_contains (elt1, elt2), like above.

--Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 12 09:39:09 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.