subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1670790 - in /subversion/branches/fsx-1.10/subversion: libsvn_fs_x/fs.h libsvn_fs_x/fs_x.c tests/libsvn_fs/fs-test.c
Date Wed, 01 Apr 2015 22:52:50 GMT
Author: stefan2
Date: Wed Apr  1 22:52:50 2015
New Revision: 1670790

URL: http://svn.apache.org/r1670790
Log:
On the fsx-1.10 branch:
Bump FSX format number since we will soon start changing the
on-disk format.

* subversion/libsvn_fs_x/fs.h
  (SVN_FS_X__FORMAT_NUMBER): Bump.
  (SVN_FS_X__EXPERIMENTAL_FORMAT_NUMBER): New.

* subversion/libsvn_fs_x/fs_x.c
  (check_format): Handle incompatibility of experimental formats.
  (svn_fs_x__info_format): Update.

* subversion/tests/libsvn_fs/fs-test.c
  (test_fs_info_format): Update expecatations. FSX currenty supports
                         extactly one format / SVN combination.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs.h
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/fsx-1.10/subversion/tests/libsvn_fs/fs-test.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs.h?rev=1670790&r1=1670789&r2=1670790&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/fs.h Wed Apr  1 22:52:50 2015
@@ -124,7 +124,11 @@ extern "C" {
    Note: If you bump this, please update the switch statement in
          svn_fs_x__create() as well.
  */
-#define SVN_FS_X__FORMAT_NUMBER   1
+#define SVN_FS_X__FORMAT_NUMBER   2
+
+/* Latest experimental format number.  Experimental formats are only
+   compatible with themselves. */
+#define SVN_FS_X__EXPERIMENTAL_FORMAT_NUMBER   2
 
 /* On most operating systems apr implements file locks per process, not
    per file.  On Windows apr implements the locking as per file handle

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=1670790&r1=1670789&r2=1670790&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 Wed Apr  1 22:52:50 2015
@@ -95,8 +95,16 @@ check_format(int format)
 {
   /* Put blacklisted versions here. */
 
-  /* We support all formats from 1-current simultaneously */
-  if (1 <= format && format <= SVN_FS_X__FORMAT_NUMBER)
+  /* We don't support experimental formats except when it matches the
+   * current format. */
+  if (   SVN_FS_X__EXPERIMENTAL_FORMAT_NUMBER < format
+      || format == SVN_FS_X__FORMAT_NUMBER)
+    return SVN_NO_ERROR;
+
+  /* By default, we will support any non-experimental format released so far.
+   */
+  if (   SVN_FS_X__EXPERIMENTAL_FORMAT_NUMBER < format
+      && format <= SVN_FS_X__FORMAT_NUMBER)
     return SVN_NO_ERROR;
 
   return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
@@ -1207,8 +1215,11 @@ svn_fs_x__info_format(int *fs_format,
     {
     case 1:
       break;
+    case 2:
+      (*supports_version)->minor = 10;
+      break;
 #ifdef SVN_DEBUG
-# if SVN_FS_X__FORMAT_NUMBER != 1
+# if SVN_FS_X__FORMAT_NUMBER != 2
 #  error "Need to add a 'case' statement here"
 # endif
 #endif

Modified: subversion/branches/fsx-1.10/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/libsvn_fs/fs-test.c?rev=1670790&r1=1670789&r2=1670790&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/libsvn_fs/fs-test.c Wed Apr  1 22:52:50
2015
@@ -5190,20 +5190,20 @@ test_fs_info_format(const svn_test_opts_
   int fs_format;
   svn_version_t *supports_version;
   svn_version_t v1_5_0 = {1, 5, 0, ""};
-  svn_version_t v1_9_0 = {1, 9, 0, ""};
+  svn_version_t v1_10_0 = {1, 10, 0, ""};
   svn_test_opts_t opts2;
   svn_boolean_t is_fsx = strcmp(opts->fs_type, "fsx") == 0;
 
   opts2 = *opts;
-  opts2.server_minor_version = is_fsx ? 9 : 5;
+  opts2.server_minor_version = is_fsx ? 10 : 5;
 
   SVN_ERR(svn_test__create_fs(&fs, "test-fs-format-info", &opts2, pool));
   SVN_ERR(svn_fs_info_format(&fs_format, &supports_version, fs, pool, pool));
 
   if (is_fsx)
     {
-      SVN_TEST_ASSERT(fs_format == 1);
-      SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_9_0));
+      SVN_TEST_ASSERT(fs_format == 2);
+      SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_10_0));
     }
   else
     {



Mime
View raw message