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 2010/04/29 18:18:51 UTC
svn commit: r939361 - /subversion/trunk/subversion/libsvn_repos/load.c
Author: pburba
Date: Thu Apr 29 16:18:51 2010
New Revision: 939361
URL: http://svn.apache.org/viewvc?rev=939361&view=rev
Log:
Prevent svnadmin loads of partial dumps from possibly creating invalid
mergeinfo where the start range > end range.
* subversion/libsvn_repos/load.c
(renumber_mergeinfo_revs): Yet another fix for issue #3020; if we can't
remap a mergeinfos start rev, then don't attempt to remap the end
range. We might succeed and load invalid mergeinfo.
Modified:
subversion/trunk/subversion/libsvn_repos/load.c
Modified: subversion/trunk/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load.c?rev=939361&r1=939360&r2=939361&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/load.c (original)
+++ subversion/trunk/subversion/libsvn_repos/load.c Thu Apr 29 16:18:51 2010
@@ -295,8 +295,18 @@ renumber_mergeinfo_revs(svn_string_t **f
svn_merge_range_t *);
rev_from_map = apr_hash_get(pb->rev_map, &range->start,
sizeof(svn_revnum_t));
+ /* If we can't remap the start revision then don't even bother
+ trying to remap the end revision. It's possible we might
+ actually succeed at the latter, which can result in invalid
+ mergeinfo with a start rev > end red. If that gets into the
+ repository then a world of bustage breaks loose anytime that
+ bogus mergeinfo is parsed. See
+ http://subversion.tigris.org/issues/show_bug.cgi?id=3020#desc16.
+ */
if (rev_from_map && SVN_IS_VALID_REVNUM(*rev_from_map))
- range->start = *rev_from_map;
+ range->start = *rev_from_map;
+ else
+ continue;
rev_from_map = apr_hash_get(pb->rev_map, &range->end,
sizeof(svn_revnum_t));