Author: stefan2
Date: Sat Feb 28 14:44:00 2015
New Revision: 1662945

URL: http://svn.apache.org/r1662945
Log:
On the fsx-1.10 branch:
Unify naming or FSX revision file API functions.
Make them all start with svn_fs_x__rev_file_ .

* subversion/libsvn_fs_x/rev_file.h
  (svn_fs_x__open_pack_or_rev_file,
   svn_fs_x__open_pack_or_rev_file_writable,
   svn_fs_x__open_proto_rev_file,
   svn_fs_x__wrap_temp_rev_file): Rename to ...
  (svn_fs_x__rev_file_open,
   svn_fs_x__rev_file_open_writable,
   svn_fs_x__rev_file_open_proto_rev,
   svn_fs_x__rev_file_wrap_temp): ... these.

* subversion/libsvn_fs_x/rev_file.c
  (svn_fs_x__open_pack_or_rev_file,
   svn_fs_x__open_pack_or_rev_file_writable): Rename to ...
  (svn_fs_x__rev_file_open,
   svn_fs_x__rev_file_open_writable): ... these.
  (svn_fs_x__open_proto_rev_file): Rename to ...
  (svn_fs_x__rev_file_open_proto_rev): ... this and update function call.
  (svn_fs_x__wrap_temp_rev_file): Rename to ...
  (svn_fs_x__rev_file_wrap_temp): ... this.

* subversion/libsvn_fs_x/cached_data.c
  (open_and_seek_revision,
   open_and_seek_transaction,
   get_node_revision_body,
   svn_fs_x__get_mergeinfo_count,
   auto_open_shared_file,
   svn_fs_x__check_rep,
   svn_fs_x__get_changes): Update callers.

* subversion/libsvn_fs_x/fs_x.c
  (write_revision_zero): Same.

* subversion/libsvn_fs_x/index.c
  (svn_fs_x__l2p_get_max_ids): Same.

* subversion/libsvn_fs_x/pack.c
  (write_reps_containers,
   pack_range,
   append_revision): Same.

* subversion/libsvn_fs_x/verify.c
  (verify_index_checksums,
   compare_l2p_to_p2l_index,
   compare_p2l_to_l2p_index,
   compare_p2l_to_rev): Same.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/index.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/pack.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.h
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/verify.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/cached_data.c Sat Feb 
28 14:44:00 2015
@@ -192,8 +192,8 @@ open_and_seek_revision(svn_fs_x__revisio
 
   SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, scratch_pool));
 
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, rev, result_pool,
-                                          scratch_pool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, rev, result_pool,
+                                  scratch_pool));
   SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev_file, id,
                                 scratch_pool));
   SVN_ERR(svn_fs_x__rev_file_seek(rev_file, NULL, offset));
@@ -218,8 +218,8 @@ open_and_seek_transaction(svn_fs_x__revi
   apr_uint32_t sub_item = 0;
   apr_int64_t txn_id = svn_fs_x__get_txn_id(rep->id.change_set);
 
-  SVN_ERR(svn_fs_x__open_proto_rev_file(file, fs, txn_id, result_pool,
-                                        scratch_pool));
+  SVN_ERR(svn_fs_x__rev_file_open_proto_rev(file, fs, txn_id, result_pool,
+                                            scratch_pool));
 
   SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, *file, &rep->id,
                                 scratch_pool));
@@ -313,8 +313,8 @@ get_node_revision_body(svn_fs_x__noderev
       svn_revnum_t revision = svn_fs_x__get_revnum(id->change_set);
       svn_fs_x__pair_cache_key_t key;
 
-      SVN_ERR(svn_fs_x__open_pack_or_rev_file(&revision_file, fs, revision,
-                                              scratch_pool, scratch_pool));
+      SVN_ERR(svn_fs_x__rev_file_open(&revision_file, fs, revision,
+                                      scratch_pool, scratch_pool));
 
       /* First, try a noderevs container cache lookup. */
       if (   svn_fs_x__is_packed_rev(fs, revision)
@@ -408,8 +408,8 @@ svn_fs_x__get_mergeinfo_count(apr_int64_
       svn_revnum_t revision = svn_fs_x__get_revnum(id->change_set);
 
       svn_fs_x__revision_file_t *rev_file;
-      SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, revision,
-                                              scratch_pool, scratch_pool));
+      SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, revision,
+                                      scratch_pool, scratch_pool));
 
       if (   svn_fs_x__is_packed_rev(fs, revision)
           && ffd->noderevs_container_cache)
@@ -495,9 +495,9 @@ static svn_error_t*
 auto_open_shared_file(shared_file_t *file)
 {
   if (file->rfile == NULL)
-    SVN_ERR(svn_fs_x__open_pack_or_rev_file(&file->rfile, file->fs,
-                                            file->revision, file->pool,
-                                            file->pool));
+    SVN_ERR(svn_fs_x__rev_file_open(&file->rfile, file->fs,
+                                    file->revision, file->pool,
+                                    file->pool));
 
   return SVN_NO_ERROR;
 }
@@ -782,8 +782,8 @@ svn_fs_x__check_rep(svn_fs_x__representa
   svn_revnum_t revision = svn_fs_x__get_revnum(rep->id.change_set);
 
   svn_fs_x__revision_file_t *rev_file;
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, revision,
-                                          scratch_pool, scratch_pool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, revision,
+                                  scratch_pool, scratch_pool));
 
   /* Does REP->ID refer to an actual item? Which one is it? */
   SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev_file, &rep->id,
@@ -2797,8 +2797,8 @@ svn_fs_x__get_changes(apr_array_header_t
   /* Provide revision file. */
 
   SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, scratch_pool));
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&revision_file, fs, rev,
-                                          scratch_pool, scratch_pool));
+  SVN_ERR(svn_fs_x__rev_file_open(&revision_file, fs, rev,
+                                  scratch_pool, scratch_pool));
 
   /* try cache lookup first */
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c Sat Feb 28 
14:44:00 2015
@@ -897,8 +897,8 @@ write_revision_zero(svn_fs_t *fs,
 
   /* Now re-open r0, create proto-index files from our entries and
       rewrite the index section of r0. */
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file_writable(&rev_file, fs, 0,
-                                                   subpool, subpool));
+  SVN_ERR(svn_fs_x__rev_file_open_writable(&rev_file, fs, 0,
+                                           subpool, subpool));
   SVN_ERR(svn_fs_x__p2l_index_from_p2l_entries(&p2l_proto_index, fs,
                                                rev_file, index_entries,
                                                subpool, subpool));

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/index.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/index.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/index.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/index.c Sat Feb 28 
14:44:00 2015
@@ -1912,8 +1912,8 @@ svn_fs_x__l2p_get_max_ids(apr_array_head
   apr_pool_t *header_pool = svn_pool_create(scratch_pool);
 
   /* read index master data structure for the index covering START_REV */
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, start_rev,
-                                          header_pool, header_pool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, start_rev,
+                                  header_pool, header_pool));
   SVN_ERR(get_l2p_header(&header, rev_file, fs, start_rev, header_pool,
                          header_pool));
   SVN_ERR(svn_fs_x__close_revision_file(rev_file));
@@ -1934,8 +1934,8 @@ svn_fs_x__l2p_get_max_ids(apr_array_head
            * the number of items in a revision, i.e. there is no consistency
            * issue here. */
           svn_pool_clear(header_pool);
-          SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, revision,
-                                                  header_pool, header_pool));
+          SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, revision,
+                                          header_pool, header_pool));
           SVN_ERR(get_l2p_header(&header, rev_file, fs, revision,
                                  header_pool, header_pool));
           SVN_ERR(svn_fs_x__close_revision_file(rev_file));

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/pack.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/pack.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/pack.c Sat Feb 28 
14:44:00 2015
@@ -1241,7 +1241,7 @@ write_reps_containers(pack_context_t *co
     = apr_array_make(scratch_pool, 64, sizeof(svn_fs_x__id_t));
   svn_fs_x__revision_file_t *file;
 
-  SVN_ERR(svn_fs_x__wrap_temp_rev_file(&file, context->fs, temp_file,
+  SVN_ERR(svn_fs_x__rev_file_wrap_temp(&file, context->fs, temp_file,
                                        scratch_pool));
 
   /* copy all items in strict order */
@@ -1733,8 +1733,8 @@ pack_range(pack_context_t *context,
       svn_fs_x__index_info_t l2p_index_info;
 
       /* Get the rev file dimensions (mainly index locations). */
-      SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, context->fs,
-                                              revision, revpool, iterpool));
+      SVN_ERR(svn_fs_x__rev_file_open(&rev_file, context->fs, revision,
+                                      revpool, iterpool));
       SVN_ERR(svn_fs_x__rev_file_l2p_info(&l2p_index_info, rev_file));
 
       /* store the indirect array index */
@@ -1861,9 +1861,8 @@ append_revision(pack_context_t *context,
   SVN_ERR(svn_io_stat(&finfo, path, APR_FINFO_SIZE, scratch_pool));
 
   /* Copy all the bits from the rev file to the end of the pack file. */
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, context->fs,
-                                          context->start_rev, scratch_pool,
-                                          iterpool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, context->fs, context->start_rev,
+                                  scratch_pool, iterpool));
   SVN_ERR(svn_fs_x__rev_file_get(&file, rev_file));
   SVN_ERR(copy_file_data(context, context->pack_file, file, finfo.size,
                          iterpool));

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.c Sat Feb 28 
14:44:00 2015
@@ -240,11 +240,11 @@ open_pack_or_rev_file(svn_fs_x__revision
 }
 
 svn_error_t *
-svn_fs_x__open_pack_or_rev_file(svn_fs_x__revision_file_t **file,
-                                 svn_fs_t *fs,
-                                 svn_revnum_t rev,
-                                 apr_pool_t *result_pool,
-                                 apr_pool_t *scratch_pool)
+svn_fs_x__rev_file_open(svn_fs_x__revision_file_t **file,
+                        svn_fs_t *fs,
+                        svn_revnum_t rev,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   *file = init_revision_file(fs, rev, result_pool);
   return svn_error_trace(open_pack_or_rev_file(*file, fs, rev, FALSE,
@@ -252,11 +252,11 @@ svn_fs_x__open_pack_or_rev_file(svn_fs_x
 }
 
 svn_error_t *
-svn_fs_x__open_pack_or_rev_file_writable(svn_fs_x__revision_file_t** file,
-                                         svn_fs_t* fs,
-                                         svn_revnum_t rev,
-                                         apr_pool_t* result_pool,
-                                         apr_pool_t *scratch_pool)
+svn_fs_x__rev_file_open_writable(svn_fs_x__revision_file_t** file,
+                                 svn_fs_t* fs,
+                                 svn_revnum_t rev,
+                                 apr_pool_t* result_pool,
+                                 apr_pool_t *scratch_pool)
 {
   *file = init_revision_file(fs, rev, result_pool);
   return svn_error_trace(open_pack_or_rev_file(*file, fs, rev, TRUE,
@@ -311,11 +311,11 @@ auto_read_footer(svn_fs_x__revision_file
 }
 
 svn_error_t *
-svn_fs_x__open_proto_rev_file(svn_fs_x__revision_file_t **file,
-                               svn_fs_t *fs,
-                               svn_fs_x__txn_id_t txn_id,
-                               apr_pool_t* result_pool,
-                               apr_pool_t *scratch_pool)
+svn_fs_x__rev_file_open_proto_rev(svn_fs_x__revision_file_t **file,
+                                  svn_fs_t *fs,
+                                  svn_fs_x__txn_id_t txn_id,
+                                  apr_pool_t* result_pool,
+                                  apr_pool_t *scratch_pool)
 {
   apr_file_t *apr_file;
   SVN_ERR(svn_io_file_open(&apr_file,
@@ -324,12 +324,12 @@ svn_fs_x__open_proto_rev_file(svn_fs_x__
                            APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
                            result_pool));
 
-  return svn_error_trace(svn_fs_x__wrap_temp_rev_file(file, fs, apr_file,
+  return svn_error_trace(svn_fs_x__rev_file_wrap_temp(file, fs, apr_file,
                                                       result_pool));
 }
 
 svn_error_t *
-svn_fs_x__wrap_temp_rev_file(svn_fs_x__revision_file_t **file,
+svn_fs_x__rev_file_wrap_temp(svn_fs_x__revision_file_t **file,
                              svn_fs_t *fs,
                              apr_file_t *temp_file,
                              apr_pool_t *result_pool)

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.h?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.h (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/rev_file.h Sat Feb 28 
14:44:00 2015
@@ -76,11 +76,11 @@ typedef struct svn_fs_x__revision_file_t
  * file doesn't exist.  Allocate *FILE in RESULT_POOL and use SCRATCH_POOL
  * for temporaries. */
 svn_error_t *
-svn_fs_x__open_pack_or_rev_file(svn_fs_x__revision_file_t **file,
-                                svn_fs_t *fs,
-                                svn_revnum_t rev,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool);
+svn_fs_x__rev_file_open(svn_fs_x__revision_file_t **file,
+                        svn_fs_t *fs,
+                        svn_revnum_t rev,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
 
 /* Open the correct revision file for REV with read and write access.
  * If necessary, temporarily reset the file's read-only state.  If the
@@ -90,26 +90,26 @@ svn_fs_x__open_pack_or_rev_file(svn_fs_x
  * Return SVN_ERR_FS_NO_SUCH_REVISION if the file doesn't exist.
  * Allocate *FILE in RESULT_POOL and use SCRATCH_POOLfor temporaries. */
 svn_error_t *
-svn_fs_x__open_pack_or_rev_file_writable(svn_fs_x__revision_file_t **file,
-                                         svn_fs_t *fs,
-                                         svn_revnum_t rev,
-                                         apr_pool_t *result_pool,
-                                         apr_pool_t *scratch_pool);
+svn_fs_x__rev_file_open_writable(svn_fs_x__revision_file_t **file,
+                                 svn_fs_t *fs,
+                                 svn_revnum_t rev,
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool);
 
 /* Open the proto-rev file of transaction TXN_ID in FS and return it in *FILE.
  * Allocate *FILE in RESULT_POOL use and SCRATCH_POOL for temporaries.. */
 svn_error_t *
-svn_fs_x__open_proto_rev_file(svn_fs_x__revision_file_t **file,
-                              svn_fs_t *fs,
-                              svn_fs_x__txn_id_t txn_id,
-                              apr_pool_t* result_pool,
-                              apr_pool_t *scratch_pool);
+svn_fs_x__rev_file_open_proto_rev(svn_fs_x__revision_file_t **file,
+                                  svn_fs_t *fs,
+                                  svn_fs_x__txn_id_t txn_id,
+                                  apr_pool_t* result_pool,
+                                  apr_pool_t *scratch_pool);
 
 /* Wrap the TEMP_FILE, used in the context of FS, into a revision file
  * struct, allocated in RESULT_POOL, and return it in *FILE.
  */
 svn_error_t *
-svn_fs_x__wrap_temp_rev_file(svn_fs_x__revision_file_t **file,
+svn_fs_x__rev_file_wrap_temp(svn_fs_x__revision_file_t **file,
                              svn_fs_t *fs,
                              apr_file_t *temp_file,
                              apr_pool_t *result_pool);

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/verify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/verify.c?rev=1662945&r1=1662944&r2=1662945&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/verify.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/verify.c Sat Feb 28 
14:44:00 2015
@@ -203,8 +203,8 @@ verify_index_checksums(svn_fs_t *fs,
   svn_fs_x__index_info_t p2l_index_info;
 
   /* Open the rev / pack file and read the footer */
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, start,
-                                          scratch_pool, scratch_pool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, start,
+                                  scratch_pool, scratch_pool));
   SVN_ERR(svn_fs_x__rev_file_l2p_info(&l2p_index_info, rev_file));
   SVN_ERR(svn_fs_x__rev_file_p2l_info(&p2l_index_info, rev_file));
 
@@ -239,8 +239,8 @@ compare_l2p_to_p2l_index(svn_fs_t *fs,
 
   /* common file access structure */
   svn_fs_x__revision_file_t *rev_file;
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, start, scratch_pool,
-                                          iterpool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, start, scratch_pool,
+                                  iterpool));
 
   /* determine the range of items to check for each revision */
   SVN_ERR(svn_fs_x__l2p_get_max_ids(&max_ids, fs, start, count, scratch_pool,
@@ -331,8 +331,8 @@ compare_p2l_to_l2p_index(svn_fs_t *fs,
 
   /* common file access structure */
   svn_fs_x__revision_file_t *rev_file;
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, start, scratch_pool,
-                                          iterpool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, start, scratch_pool,
+                                  iterpool));
 
   /* get the size of the rev / pack file as covered by the P2L index */
   SVN_ERR(svn_fs_x__p2l_get_max_offset(&max_offset, fs, rev_file, start,
@@ -584,8 +584,8 @@ compare_p2l_to_rev(svn_fs_t *fs,
   svn_fs_x__index_info_t l2p_index_info;
 
   /* open the pack / rev file that is covered by the p2l index */
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, start, scratch_pool,
-                                          iterpool));
+  SVN_ERR(svn_fs_x__rev_file_open(&rev_file, fs, start, scratch_pool,
+                                  iterpool));
 
   /* check file size vs. range covered by index */
   SVN_ERR(svn_fs_x__rev_file_l2p_info(&l2p_index_info, rev_file));


Reply via email to