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 2013/07/23 14:27:41 UTC

svn commit: r1506011 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c

Author: stefan2
Date: Tue Jul 23 12:27:41 2013
New Revision: 1506011

URL: http://svn.apache.org/r1506011
Log:
On the fsfs-improvement branch: make rev / pack file open code less
dependent on the FSFS ID API.

* subversion/libsvn_fs_fs/cached_data.c
  (open_and_seek_transaction): Remove the redudant txn_id parameter
  (open_and_seek_representation): update caller

Modified:
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c

Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c?rev=1506011&r1=1506010&r2=1506011&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/cached_data.c Tue Jul 23 12:27:41 2013
@@ -190,22 +190,20 @@ open_and_seek_revision(apr_file_t **file
   return SVN_NO_ERROR;
 }
 
-/* Open the representation for a node-revision in transaction TXN_ID
-   in filesystem FS and store the newly opened file in FILE.  Seek to
-   location OFFSET before returning.  Perform temporary allocations in
-   POOL.  Only appropriate for file contents, nor props or directory
-   contents. */
+/* Open the representation REP for a node-revision in filesystem FS, seek
+   to its position and store the newly opened file in FILE.  Perform
+   temporary allocations in POOL. */
 static svn_error_t *
 open_and_seek_transaction(apr_file_t **file,
                           svn_fs_t *fs,
-                          const char *txn_id,
                           representation_t *rep,
                           apr_pool_t *pool)
 {
   apr_file_t *rev_file;
 
   SVN_ERR(svn_io_file_open(&rev_file,
-                           svn_fs_fs__path_txn_proto_rev(fs, txn_id, pool),
+                           svn_fs_fs__path_txn_proto_rev(fs, rep->txn_id,
+                                                         pool),
                            APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
 
   SVN_ERR(aligned_seek(rev_file, rep->offset, pool));
@@ -228,7 +226,7 @@ open_and_seek_representation(apr_file_t 
     return open_and_seek_revision(file_p, fs, rep->revision, rep->offset,
                                   pool);
   else
-    return open_and_seek_transaction(file_p, fs, rep->txn_id, rep, pool);
+    return open_and_seek_transaction(file_p, fs, rep, pool);
 }