You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/04/25 20:52:03 UTC
svn commit: r1096561 - in /subversion/trunk/subversion:
include/private/svn_mergeinfo_private.h libsvn_subr/mergeinfo.c
Author: pburba
Date: Mon Apr 25 18:52:02 2011
New Revision: 1096561
URL: http://svn.apache.org/viewvc?rev=1096561&view=rev
Log:
Don't convert a valid svn_location_segment_t describing only revision 0 into
invalid mergeinfo.
* subversion/libsvn_subr/mergeinfo.c
(svn_mergeinfo__mergeinfo_from_segments): A svn_location_segment_t with a
starting and ending revision of 0 is legitimate, but mergeinfo with a
svn_merge_range_t with the same is invalid.
* subversion/include/private/svn_mergeinfo_private.h
(svn_mergeinfo__mergeinfo_from_segments): Note limitation in doc string.
Modified:
subversion/trunk/subversion/include/private/svn_mergeinfo_private.h
subversion/trunk/subversion/libsvn_subr/mergeinfo.c
Modified: subversion/trunk/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_mergeinfo_private.h?rev=1096561&r1=1096560&r2=1096561&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_mergeinfo_private.h Mon Apr 25 18:52:02 2011
@@ -242,7 +242,11 @@ svn_mergeinfo__adjust_mergeinfo_rangelis
/* Translates an array SEGMENTS (of svn_location_t *), like the one
returned from svn_client__repos_location_segments, into a mergeinfo
- *MERGEINFO_P, allocated in POOL. */
+ *MERGEINFO_P, allocated in POOL.
+
+ Note: A svn_location_t segment may legitimately describe only revision 0,
+ but there is no way to describe that using svn_mergeinfo_t. Any such
+ segment in SEGMENTS are ignored. */
svn_error_t *
svn_mergeinfo__mergeinfo_from_segments(svn_mergeinfo_t *mergeinfo_p,
const apr_array_header_t *segments,
Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1096561&r1=1096560&r2=1096561&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Mon Apr 25 18:52:02 2011
@@ -2234,6 +2234,12 @@ svn_mergeinfo__mergeinfo_from_segments(s
if (! path_ranges)
path_ranges = apr_array_make(pool, 1, sizeof(range));
+ /* A svn_location_segment_t may have legitimately describe only
+ revision 0, but there is no corresponding representation for
+ this in a svn_merge_range_t. */
+ if (segment->range_start == 0 && segment->range_end == 0)
+ continue;
+
/* Build a merge range, push it onto the list of ranges, and for
good measure, (re)store it in the hash. */
range = apr_pcalloc(pool, sizeof(*range));