subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1639414 - in /subversion/trunk/subversion/libsvn_fs_fs: index.c pack.c
Date Thu, 13 Nov 2014 17:39:13 GMT
Author: ivan
Date: Thu Nov 13 17:39:13 2014
New Revision: 1639414

URL: http://svn.apache.org/r1639414
Log:
* subversion/libsvn_fs_fs/index.c
* subversion/libsvn_fs_fs/pack.c
  (stream_error_create, copy_item_to_temp, copy_rep_to_temp, 
   copy_node_to_temp): Use svn_fs_fs__get_file_offset() utility function
   to get current file offset.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/index.c
    subversion/trunk/subversion/libsvn_fs_fs/pack.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/index.c?rev=1639414&r1=1639413&r2=1639414&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/index.c Thu Nov 13 17:39:13 2014
@@ -228,10 +228,10 @@ stream_error_create(svn_fs_fs__packed_nu
                     const char *message)
 {
   const char *file_name;
-  apr_off_t offset = 0;
+  apr_off_t offset;
   SVN_ERR(svn_io_file_name_get(&file_name, stream->file,
                                stream->pool));
-  SVN_ERR(svn_io_file_seek(stream->file, APR_CUR, &offset, stream->pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&offset, stream->file, stream->pool));
 
   return svn_error_createf(err, NULL, message, file_name,
                            apr_psprintf(stream->pool,

Modified: subversion/trunk/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/pack.c?rev=1639414&r1=1639413&r2=1639414&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/pack.c Thu Nov 13 17:39:13 2014
@@ -478,8 +478,8 @@ copy_item_to_temp(pack_context_t *contex
 {
   svn_fs_fs__p2l_entry_t *new_entry
     = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  new_entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(temp_file, APR_CUR, &new_entry->offset, pool));
+
+  SVN_ERR(svn_fs_fs__get_file_offset(&new_entry->offset, temp_file, pool));
   APR_ARRAY_PUSH(entries, svn_fs_fs__p2l_entry_t *) = new_entry;
   
   SVN_ERR(copy_file_data(context, temp_file, rev_file, entry->size, pool));
@@ -566,9 +566,7 @@ copy_rep_to_temp(pack_context_t *context
   /* create a copy of ENTRY, make it point to the copy destination and
    * store it in CONTEXT */
   entry = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR, &entry->offset,
-                           pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&entry->offset, context->reps_file, pool));
   add_item_rep_mapping(context, entry);
 
   /* read & parse the representation header */
@@ -722,9 +720,8 @@ copy_node_to_temp(pack_context_t *contex
   /* create a copy of ENTRY, make it point to the copy destination and
    * store it in CONTEXT */
   entry = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR,
-                           &entry->offset, pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&entry->offset, context->reps_file,
+                                     pool));
   add_item_rep_mapping(context, entry);
 
   /* copy the noderev to our temp file */



Mime
View raw message