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/01 19:46:46 UTC

svn commit: r1498606 - in /subversion/branches/fsfs-format7/subversion/libsvn_fs_x: fs.h fs_x.c hotcopy.c low_level.c rep-cache.c verify.c

Author: stefan2
Date: Mon Jul  1 17:46:45 2013
New Revision: 1498606

URL: http://svn.apache.org/r1498606
Log:
On the fsfs-format7 branch:  Remove the SVN_FS_FS__MIN_REP_SHARING_FORMAT
flags from FSX because it always allows for reo sharing.  Remove all
references to that flag and the obsolete FSFS-fallback behavior.

* subversion/libsvn_fs_x/fs.h
  (SVN_FS_FS__MIN_REP_SHARING_FORMAT): drop

* subversion/libsvn_fs_x/fs_x.c
  (read_config): remove check & obsolete fallback code

* subversion/libsvn_fs_x/hotcopy.c
  (hotcopy_body): remove check

* subversion/libsvn_fs_x/low_level.c
  (svn_fs_x__unparse_representation): ditto

* subversion/libsvn_fs_x/rep-cache.c
  (svn_fs_x__walk_rep_reference,
   svn_fs_x__del_rep_reference): remove assertions

* subversion/libsvn_fs_x/verify.c
  (svn_fs_x__verify): remove check

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/rep-cache.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/verify.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h Mon Jul  1 17:46:45 2013
@@ -140,9 +140,6 @@ extern "C" {
    noderev fields. */
 #define SVN_FS_FS__MIN_MERGEINFO_FORMAT 3
 
-/* The minimum format number that allows rep sharing. */
-#define SVN_FS_FS__MIN_REP_SHARING_FORMAT 4
-
 /* The minimum format number that stores node kinds in changed-paths lists. */
 #define SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT 4
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c Mon Jul  1 17:46:45 2013
@@ -260,12 +260,9 @@ read_config(fs_x_data_t *ffd,
                            FALSE, FALSE, FALSE, pool));
 
   /* Initialize ffd->rep_sharing_allowed. */
-  if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
-    SVN_ERR(svn_config_get_bool(ffd->config, &ffd->rep_sharing_allowed,
-                                CONFIG_SECTION_REP_SHARING,
-                                CONFIG_OPTION_ENABLE_REP_SHARING, TRUE));
-  else
-    ffd->rep_sharing_allowed = FALSE;
+  SVN_ERR(svn_config_get_bool(ffd->config, &ffd->rep_sharing_allowed,
+                              CONFIG_SECTION_REP_SHARING,
+                              CONFIG_OPTION_ENABLE_REP_SHARING, TRUE));
 
   /* Initialize deltification settings in ffd. */
   SVN_ERR(svn_config_get_bool(ffd->config, &ffd->deltify_directories,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c Mon Jul  1 17:46:45 2013
@@ -785,18 +785,15 @@ hotcopy_body(void *baton, apr_pool_t *po
    *     Writers are still locked out at this point.
    */
 
-  if (dst_ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
+  /* Copy the rep cache and then remove entries for revisions
+   * younger than the destination's youngest revision. */
+  src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, pool);
+  dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, pool);
+  SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
+  if (kind == svn_node_file)
     {
-      /* Copy the rep cache and then remove entries for revisions
-       * younger than the destination's youngest revision. */
-      src_subdir = svn_dirent_join(src_fs->path, REP_CACHE_DB_NAME, pool);
-      dst_subdir = svn_dirent_join(dst_fs->path, REP_CACHE_DB_NAME, pool);
-      SVN_ERR(svn_io_check_path(src_subdir, &kind, pool));
-      if (kind == svn_node_file)
-        {
-          SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
-          SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, dst_youngest, pool));
-        }
+      SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
+      SVN_ERR(svn_fs_x__del_rep_reference(dst_fs, dst_youngest, pool));
     }
 
   /* Copy the txn-current file. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c Mon Jul  1 17:46:45 2013
@@ -529,7 +529,7 @@ svn_fs_x__unparse_representation(represe
   if (svn_fs_x__id_txn_used(&rep->txn_id) && mutable_rep_truncated)
     return svn_stringbuf_ncreate("-1", 2, pool);
 
-  if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT || !rep->has_sha1)
+  if (!rep->has_sha1)
     return svn_stringbuf_createf
             (pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
              " %" SVN_FILESIZE_T_FMT " %s",

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/rep-cache.c?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/rep-cache.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/rep-cache.c Mon Jul  1 17:46:45 2013
@@ -146,9 +146,6 @@ svn_fs_x__walk_rep_reference(svn_fs_t *f
 
   apr_pool_t *iterpool = svn_pool_create(pool);
 
-  /* Don't check ffd->rep_sharing_allowed. */
-  SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT);
-
   if (! ffd->rep_cache_db)
     SVN_ERR(svn_fs_x__open_rep_cache(fs, pool));
 
@@ -363,7 +360,6 @@ svn_fs_x__del_rep_reference(svn_fs_t *fs
   fs_x_data_t *ffd = fs->fsap_data;
   svn_sqlite__stmt_t *stmt;
 
-  SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT);
   if (! ffd->rep_cache_db)
     SVN_ERR(svn_fs_x__open_rep_cache(fs, pool));
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/verify.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/verify.c?rev=1498606&r1=1498605&r2=1498606&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/verify.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/verify.c Mon Jul  1 17:46:45 2013
@@ -389,9 +389,8 @@ svn_fs_x__verify(svn_fs_t *fs,
                                    cancel_func, cancel_baton, pool));
 
   /* rep cache consistency */
-  if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
-    SVN_ERR(verify_rep_cache(fs, start, end, notify_func, notify_baton,
-                             cancel_func, cancel_baton, pool));
+  SVN_ERR(verify_rep_cache(fs, start, end, notify_func, notify_baton,
+                            cancel_func, cancel_baton, pool));
 
   return SVN_NO_ERROR;
 }