subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1813012 - /subversion/trunk/subversion/libsvn_subr/mergeinfo.c
Date Mon, 23 Oct 2017 12:21:22 GMT
Author: rhuijben
Date: Mon Oct 23 12:21:22 2017
New Revision: 1813012

URL: http://svn.apache.org/viewvc?rev=1813012&view=rev
Log:
* subversion/libsvn_subr/mergeinfo.c
  (combine_with_lastrange): Combine two cases with the same behavior.

Modified:
    subversion/trunk/subversion/libsvn_subr/mergeinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1813012&r1=1813011&r2=1813012&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Mon Oct 23 12:21:22 2017
@@ -271,31 +271,21 @@ combine_with_lastrange(const svn_merge_r
       APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
         svn_merge_range_dup(new_range, result_pool);
     }
+  else if (combine_ranges(&combined_range, lastrange, new_range,
+                     consider_inheritance))
+    {
+      *lastrange = combined_range;
+    }
   else if (!consider_inheritance)
     {
       /* We are not considering inheritance so we can merge intersecting
          ranges of different inheritability.  Of course if the ranges
          don't intersect at all we simply push NEW_RANGE onto RANGELIST. */
-      if (combine_ranges(&combined_range, lastrange, new_range, FALSE))
-        {
-          *lastrange = combined_range;
-        }
-      else
-        {
-          APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
+      APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
             svn_merge_range_dup(new_range, result_pool);
-        }
     }
   else /* Considering inheritance */
     {
-      if (combine_ranges(&combined_range, lastrange, new_range, TRUE))
-        {
-          /* Even when considering inheritance two intersection ranges
-             of the same inheritability can simply be combined. */
-          *lastrange = combined_range;
-        }
-      else
-        {
           /* If we are here then the ranges either don't intersect or do
              intersect but have differing inheritability.  Check for the
              first case as that is easy to handle. */
@@ -461,7 +451,6 @@ combine_with_lastrange(const svn_merge_r
              order, so re-sort.*/
           if (!sorted)
             svn_sort__array(rangelist, svn_sort_compare_ranges);
-        }
     }
 
   return SVN_NO_ERROR;



Mime
View raw message