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

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

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-07-09 19:52:15 CEST

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.

]]]

Index: subversion/libsvn_subr/mergeinfo.c
===================================================================
--- subversion/libsvn_subr/mergeinfo.c (revision 20485)
+++ subversion/libsvn_subr/mergeinfo.c (working copy)
@@ -479,11 +479,9 @@
                   lastrange = svn_range_dup(&tmp_range, pool);
                   APR_ARRAY_PUSH(*output, svn_merge_range_t *) = lastrange;
                 }
+ i++;
             }
-
- /* Set up the rest of the whiteboard range for further
- processing. */
- if (elt1->end > elt2->end)
+ else
             {
               /* The whiteboard range ends after the eraser range. */
               if (!do_remove)
@@ -504,8 +502,6 @@
               wboardelt.start = elt2->end + 1;
               wboardelt.end = elt1->end;
             }
- else
- i++;
         }
       else /* ranges don't intersect */
         {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jul 9 19:51:31 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.