You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/08/24 15:07:07 UTC

svn commit: r1697381 - /subversion/trunk/subversion/libsvn_fs_fs/load-index.c

Author: stefan2
Date: Mon Aug 24 13:07:07 2015
New Revision: 1697381

URL: http://svn.apache.org/r1697381
Log:
Fix a bug in FSFS format7's index rewriting code, used by svnfsfs only.

The bug will lead to invalid index data for packed revisions if the first
entry in the index data passed in from svnfsfs is not part of the revision
in that pack file.  A workaround is possible by adding a simple dummy
entry for an empty item of size 0 with the correct revision number in front
of the actual index data.

* subversion/libsvn_fs_fs/load-index.c
  (svn_fs_fs__load_index): Pass the first revision in the pack down the
                           call stack instead of a random revision within
                           the same pack.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/load-index.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/load-index.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/load-index.c?rev=1697381&r1=1697380&r2=1697381&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/load-index.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/load-index.c Mon Aug 24 13:07:07 2015
@@ -66,7 +66,8 @@ svn_fs_fs__load_index(svn_fs_t *fs,
 
       /* Combine rev data with new index data. */
       SVN_ERR(svn_fs_fs__add_index_data(fs, rev_file->file, l2p_proto_index,
-                                        p2l_proto_index, revision, iterpool));
+                                        p2l_proto_index,
+                                        rev_file->start_revision, iterpool));
     }
 
   svn_pool_destroy(iterpool);