subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1166116 - /subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c
Date Wed, 07 Sep 2011 11:18:08 GMT
Author: stsp
Date: Wed Sep  7 11:18:07 2011
New Revision: 1166116

URL: http://svn.apache.org/viewvc?rev=1166116&view=rev
Log:
On the fs-successor-ids branch:

* subversion/libsvn_fs_fs/fs_fs.c
  (read_successor_revisions_file_entry): Use the provided REVISION parameter
   as-is to satisfy the documented behaviour of this function.
   This function used to subtract 1 from the REVISION argument before using
   it, which is wrong. The caller should decide about that.
  (update_successor_ids_file): Ask the read_successor_revisions_file_entry()
   helper function for the offset of the previous revision, not the current
   revision. This was the only caller so far.

Modified:
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c?rev=1166116&r1=1166115&r2=1166116&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c Wed Sep  7 11:18:07
2011
@@ -5869,7 +5869,7 @@ read_successor_revisions_file_entry(apr_
   /* ### TODO(sid): don't constantly re-open the file */
   SVN_ERR(svn_io_file_open(&revs_file, revs_abspath, APR_READ,
                            APR_OS_DEFAULT, pool));
-  offset_offset = FSFS_SUCCESSORS_REV_OFFSET(revision - 1);
+  offset_offset = FSFS_SUCCESSORS_REV_OFFSET(revision);
   SVN_ERR(svn_io_file_seek(revs_file, APR_SET, &offset_offset, pool));
   
   /* Read a 64 bit big endian integer in two passes.
@@ -5913,7 +5913,7 @@ update_successor_ids_file(const char **s
 
       /* Figure out the offset of successor data for the previous revision. */
       SVN_ERR(read_successor_revisions_file_entry(&prev_successor_ids_offset,
-                                                  fs, new_rev, pool));
+                                                  fs, new_rev - 1, pool));
 
       /* Check for offset overflow.
        * This gives a "will never be executed" warning on some platforms. */



Mime
View raw message