subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1173283 - in /subversion/branches/fs-successor-ids/subversion: libsvn_fs_base/fs.c libsvn_fs_fs/fs_fs.c
Date Tue, 20 Sep 2011 18:05:31 GMT
Author: danielsh
Date: Tue Sep 20 18:05:31 2011
New Revision: 1173283

URL: http://svn.apache.org/viewvc?rev=1173283&view=rev
Log:
On the fs-successor-id branch, make 'svnadmin upgrade' abort(), on
both backends.

* subversion/libsvn_fs_base/fs.c
  (base_upgrade):
    Add a format number check, which simply aborts.

* subversion/libsvn_fs_fs/fs_fs.c
  (upgrade_body):
    Move the format number check, simplify it, and s/error/abort()/.

Modified:
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/fs.c
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/fs.c?rev=1173283&r1=1173282&r2=1173283&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/fs.c Tue Sep 20 18:05:31
2011
@@ -883,6 +883,11 @@ base_upgrade(svn_fs_t *fs, const char *p
       svn_pool_destroy(subpool);
     }
 
+  /* Create the successors index. */
+  if (old_format_number < SVN_FS_BASE__MIN_SUCCESSOR_IDS_FORMAT)
+    /* ### TODO(sid): implement upgrade */
+    abort();
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c?rev=1173283&r1=1173282&r2=1173283&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c Tue Sep 20 18:05:31
2011
@@ -1406,20 +1406,6 @@ upgrade_body(void *baton, apr_pool_t *po
   if (format == SVN_FS_FS__FORMAT_NUMBER)
     return SVN_NO_ERROR;
 
-  /* ### We don't [yet] support upgrades to formats that support successor-IDs.
-   * ### We'd need to parse all node-revisions to create successor-ID data.
-   * ### This could be done, but for now, we punt. */
-  if (SVN_FS_FS__FORMAT_NUMBER >= SVN_FS_FS__MIN_SUCCESSORS_FORMAT &&
-      format < SVN_FS_FS__MIN_SUCCESSORS_FORMAT)
-    {
-      return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                               _("Upgrading FSFS filesystems to format %d is "
-                                 "not supported; please dump this repository "
-                                 "and load the dump file into a new "
-                                 "repository"),
-                               SVN_FS_FS__MIN_SUCCESSORS_FORMAT);
-    }
-
   /* If our filesystem predates the existance of the 'txn-current
      file', make that file and its corresponding lock file. */
   if (format < SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
@@ -1444,6 +1430,12 @@ upgrade_body(void *baton, apr_pool_t *po
   if (format < SVN_FS_FS__MIN_PACKED_FORMAT)
     SVN_ERR(svn_io_file_create(path_min_unpacked_rev(fs, pool), "0\n", pool));
 
+  /* ### We don't [yet] support upgrades to formats that support successor-IDs.
+   * ### We'd need to parse all node-revisions to create successor-ID data.
+   * ### This could be done, but for now, we punt. */
+  if (format < SVN_FS_FS__MIN_SUCCESSORS_FORMAT)
+    abort();
+
   /* Bump the format file. */
   return write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, max_files_per_dir,
                       TRUE, pool);



Mime
View raw message