subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1498616 - in /subversion/branches/fsfs-format7/subversion/libsvn_fs_x: fs.h fs_x.c hotcopy.c recovery.c recovery.h transaction.c util.c util.h
Date Mon, 01 Jul 2013 18:20:53 GMT
Author: stefan2
Date: Mon Jul  1 18:20:52 2013
New Revision: 1498616

URL: http://svn.apache.org/r1498616
Log:
On the fsfs-format7 branch:  Remove the SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT
flags from FSX because it has txn/rev-local ids only.  Remove all references
to that flag and the obsolete FSFS-fallback behavior.  That includes
trimming various function signatures.

* subversion/libsvn_fs_x/fs.h
  (SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT): remove flag

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

* subversion/libsvn_fs_x/hotcopy.c
  (hotcopy_update_current,
   hotcopy_create_empty_dest): ditto

* subversion/libsvn_fs_x/recovery.h
  (svn_fs_x__find_max_ids): remove obsolete function

* subversion/libsvn_fs_x/recovery.c
  (recover_body): remove check & fallback code
  (recover_read_from_file_baton,
   read_handler_recover,
   recover_find_max_ids,
   svn_fs_x__find_max_ids): remove

* subversion/libsvn_fs_x/transaction.c
  (get_final_id): remove check & fallback code
  (commit_body): 
  (get_next_revision_ids,
   write_final_current): remove

* subversion/libsvn_fs_x/util.h
  (svn_fs_x__write_current): remove IDs from signature

* subversion/libsvn_fs_x/util.c
  (svn_fs_x__write_current): remove check & fallback code

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/recovery.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.h

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=1498616&r1=1498615&r2=1498616&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 18:20:52 2013
@@ -133,9 +133,6 @@ extern "C" {
 /* The minimum format number that stores protorevs in a separate directory. */
 #define SVN_FS_FS__MIN_PROTOREVS_DIR_FORMAT 3
 
-/* The minimum format number that doesn't keep node and copy ID counters. */
-#define SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT 3
-
 /* The minimum format number that maintains minfo-here and minfo-count
    noderev fields. */
 #define SVN_FS_FS__MIN_MERGEINFO_FORMAT 3

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=1498616&r1=1498615&r2=1498616&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 18:20:52 2013
@@ -903,10 +903,7 @@ svn_fs_x__create(svn_fs_t *fs,
                                         pool));
 
   /* Create the 'current' file. */
-  SVN_ERR(svn_io_file_create(svn_fs_x__path_current(fs, pool),
-                              (format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT
-                               ? "0\n" : "0 1 1\n"),
-                             pool));
+  SVN_ERR(svn_io_file_create(svn_fs_x__path_current(fs, pool), "0\n", pool));
   SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_lock(fs, pool), pool));
   SVN_ERR(svn_fs_x__set_uuid(fs, NULL, pool));
 

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=1498616&r1=1498615&r2=1498616&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 18:20:52
2013
@@ -357,22 +357,11 @@ hotcopy_update_current(svn_revnum_t *dst
                        svn_revnum_t new_youngest,
                        apr_pool_t *scratch_pool)
 {
-  apr_uint64_t next_node_id = 0;
-  apr_uint64_t next_copy_id = 0;
-  fs_x_data_t *dst_ffd = dst_fs->fsap_data;
-
   if (*dst_youngest >= new_youngest)
     return SVN_NO_ERROR;
 
-  /* If necessary, get new current next_node and next_copy IDs. */
-  if (dst_ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    SVN_ERR(svn_fs_x__find_max_ids(dst_fs, new_youngest,
-                                   &next_node_id, &next_copy_id,
-                                   scratch_pool));
-
   /* Update 'current'. */
-  SVN_ERR(svn_fs_x__write_current(dst_fs, new_youngest, next_node_id,
-                                  next_copy_id, scratch_pool));
+  SVN_ERR(svn_fs_x__write_current(dst_fs, new_youngest, scratch_pool));
 
   *dst_youngest = new_youngest;
 
@@ -886,11 +875,8 @@ hotcopy_create_empty_dest(svn_fs_t *src_
                                         pool));
 
   /* Create the 'current' file. */
-  SVN_ERR(svn_io_file_create(svn_fs_x__path_current(dst_fs, pool),
-                              (dst_ffd->format >=
-                                 SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT
-                                 ? "0\n" : "0 1 1\n"), 
-                               pool));
+  SVN_ERR(svn_io_file_create(svn_fs_x__path_current(dst_fs, pool), "0\n", 
+                             pool));
 
   /* Create lock file and UUID. */
   SVN_ERR(svn_io_file_create_empty(svn_fs_x__path_lock(dst_fs, pool), pool));

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.c?rev=1498616&r1=1498615&r2=1498616&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.c Mon Jul  1 18:20:52
2013
@@ -103,218 +103,6 @@ recover_get_largest_revision(svn_fs_t *f
   return SVN_NO_ERROR;
 }
 
-/* A baton for reading a fixed amount from an open file.  For
-   recover_find_max_ids() below. */
-struct recover_read_from_file_baton
-{
-  svn_stream_t *stream;
-  apr_pool_t *pool;
-  apr_size_t remaining;
-};
-
-/* A stream read handler used by recover_find_max_ids() below.
-   Read and return at most BATON->REMAINING bytes from the stream,
-   returning nothing after that to indicate EOF. */
-static svn_error_t *
-read_handler_recover(void *baton, char *buffer, apr_size_t *len)
-{
-  struct recover_read_from_file_baton *b = baton;
-  apr_size_t bytes_to_read = *len;
-
-  if (b->remaining == 0)
-    {
-      /* Return a successful read of zero bytes to signal EOF. */
-      *len = 0;
-      return SVN_NO_ERROR;
-    }
-
-  if (bytes_to_read > b->remaining)
-    bytes_to_read = b->remaining;
-  b->remaining -= bytes_to_read;
-
-  return svn_stream_read(b->stream, buffer, &bytes_to_read);
-}
-
-/* Part of the recovery procedure.  Read the directory noderev at offset
-   OFFSET of file REV_FILE (the revision file of revision REV of
-   filesystem FS), and set MAX_NODE_ID and MAX_COPY_ID to be the node-id
-   and copy-id of that node, if greater than the current value stored
-   in either.  Recurse into any child directories that were modified in
-   this revision.
-
-   MAX_NODE_ID and MAX_COPY_ID must be arrays of at least MAX_KEY_SIZE.
-
-   Perform temporary allocation in POOL. */
-static svn_error_t *
-recover_find_max_ids(svn_fs_t *fs, svn_revnum_t rev,
-                     apr_file_t *rev_file, apr_off_t offset,
-                     apr_uint64_t *max_node_id,
-                     apr_uint64_t *max_copy_id,
-                     apr_pool_t *pool)
-{
-  svn_fs_x__rep_header_t *header;
-  struct recover_read_from_file_baton baton;
-  svn_stream_t *stream;
-  apr_hash_t *entries;
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-  node_revision_t *noderev;
-  apr_uint32_t sub_item;
-
-  SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &offset, pool));
-  SVN_ERR(svn_fs_x__read_noderev(&noderev,
-                                 svn_stream_from_aprfile2(rev_file, TRUE,
-                                                          pool),
-                                 pool));
-
-  /* Check that this is a directory.  It should be. */
-  if (noderev->kind != svn_node_dir)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Recovery encountered a non-directory node"));
-
-  /* Get the data location.  No data location indicates an empty directory. */
-  if (!noderev->data_rep)
-    return SVN_NO_ERROR;
-
-  /* If the directory's data representation wasn't changed in this revision,
-     we've already scanned the directory's contents for noderevs, so we don't
-     need to again.  This will occur if a property is changed on a directory
-     without changing the directory's contents. */
-  if (noderev->data_rep->revision != rev)
-    return SVN_NO_ERROR;
-
-  /* We could use get_dir_contents(), but this is much cheaper.  It does
-     rely on directory entries being stored as PLAIN reps, though. */
-  SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev, NULL,
-                                noderev->data_rep->item_index, pool));
-  SVN_ERR_ASSERT(sub_item == 0);
-  SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &offset, pool));
-
-  baton.stream = svn_stream_from_aprfile2(rev_file, TRUE, pool);
-  SVN_ERR(svn_fs_x__read_rep_header(&header, baton.stream, pool));
-  if (header->type != svn_fs_x__rep_plain)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Recovery encountered a deltified directory "
-                              "representation"));
-
-  /* Now create a stream that's allowed to read only as much data as is
-     stored in the representation. */
-  baton.pool = pool;
-  baton.remaining = (apr_size_t) noderev->data_rep->expanded_size;
-  stream = svn_stream_create(&baton, pool);
-  svn_stream_set_read(stream, read_handler_recover);
-
-  /* Now read the entries from that stream. */
-  entries = apr_hash_make(pool);
-  SVN_ERR(svn_hash_read2(entries, stream, SVN_HASH_TERMINATOR, pool));
-  SVN_ERR(svn_stream_close(stream));
-
-  /* Now check each of the entries in our directory to find new node and
-     copy ids, and recurse into new subdirectories. */
-  iterpool = svn_pool_create(pool);
-  for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
-    {
-      char *str_val;
-      char *str;
-      svn_node_kind_t kind;
-      svn_fs_id_t *id;
-      const svn_fs_x__id_part_t *rev_item;
-      apr_uint64_t node_id, copy_id;
-      apr_off_t child_dir_offset;
-      const svn_string_t *path = svn__apr_hash_index_val(hi);
-
-      svn_pool_clear(iterpool);
-
-      str_val = apr_pstrdup(iterpool, path->data);
-
-      str = svn_cstring_tokenize(" ", &str_val);
-      if (str == NULL)
-        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                _("Directory entry corrupt"));
-
-      if (strcmp(str, SVN_FS_FS__KIND_FILE) == 0)
-        kind = svn_node_file;
-      else if (strcmp(str, SVN_FS_FS__KIND_DIR) == 0)
-        kind = svn_node_dir;
-      else
-        {
-          return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                  _("Directory entry corrupt"));
-        }
-
-      str = svn_cstring_tokenize(" ", &str_val);
-      if (str == NULL)
-        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                _("Directory entry corrupt"));
-
-      id = svn_fs_x__id_parse(str, strlen(str), iterpool);
-
-      rev_item = svn_fs_x__id_rev_item(id);
-      if (rev_item->revision != rev)
-        {
-          /* If the node wasn't modified in this revision, we've already
-             checked the node and copy id. */
-          continue;
-        }
-
-      node_id = svn_fs_x__id_node_id(id)->number;
-      copy_id = svn_fs_x__id_copy_id(id)->number;
-
-      if (node_id > *max_node_id)
-        *max_node_id = node_id;
-      if (copy_id > *max_copy_id)
-        *max_copy_id = copy_id;
-
-      if (kind == svn_node_file)
-        continue;
-
-      SVN_ERR(svn_fs_x__item_offset(&child_dir_offset,
-                                    &sub_item,
-                                    fs,
-                                    rev_item->revision,
-                                    NULL,
-                                    rev_item->number,
-                                    iterpool));
-      SVN_ERR_ASSERT(sub_item == 0);
-      SVN_ERR(recover_find_max_ids(fs, rev, rev_file, child_dir_offset,
-                                   max_node_id, max_copy_id, iterpool));
-    }
-  svn_pool_destroy(iterpool);
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_fs_x__find_max_ids(svn_fs_t *fs, svn_revnum_t youngest,
-                       apr_uint64_t *max_node_id,
-                       apr_uint64_t *max_copy_id,
-                       apr_pool_t *pool)
-{
-  fs_x_data_t *ffd = fs->fsap_data;
-  apr_off_t root_offset;
-  apr_uint32_t sub_item;
-  apr_file_t *rev_file;
-  svn_fs_id_t *root_id;
-
-  /* call this function for old repo formats only */
-  SVN_ERR_ASSERT(ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT);
-
-  SVN_ERR(svn_fs_x__rev_get_root(&root_id, fs, youngest, pool));
-  SVN_ERR(svn_fs_x__item_offset(&root_offset, &sub_item, fs,
-                                svn_fs_x__id_rev(root_id),
-                                NULL,
-                                svn_fs_x__id_item(root_id),
-                                pool));
-  SVN_ERR_ASSERT(sub_item == 0);
-
-  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, youngest, pool));
-  SVN_ERR(recover_find_max_ids(fs, youngest, rev_file, root_offset,
-                               max_node_id, max_copy_id, pool));
-  SVN_ERR(svn_io_file_close(rev_file, pool));
-
-  return SVN_NO_ERROR;
-}
-
 /* Baton used for recover_body below. */
 struct recover_baton {
   svn_fs_t *fs;
@@ -332,8 +120,6 @@ recover_body(void *baton, apr_pool_t *po
   svn_fs_t *fs = b->fs;
   fs_x_data_t *ffd = fs->fsap_data;
   svn_revnum_t max_rev;
-  apr_uint64_t next_node_id = 0;
-  apr_uint64_t next_copy_id = 0;
   svn_revnum_t youngest_rev;
   svn_node_kind_t youngest_revprops_kind;
 
@@ -383,35 +169,6 @@ recover_body(void *baton, apr_pool_t *po
                              _("Expected current rev to be <= %ld "
                                "but found %ld"), max_rev, youngest_rev);
 
-  /* We only need to search for maximum IDs for old FS formats which
-     se global ID counters. */
-  if (ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    {
-      /* Next we need to find the maximum node id and copy id in use across the
-         filesystem.  Unfortunately, the only way we can get this information
-         is to scan all the noderevs of all the revisions and keep track as
-         we go along. */
-      svn_revnum_t rev;
-      apr_pool_t *iterpool = svn_pool_create(pool);
-
-      for (rev = 0; rev <= max_rev; rev++)
-        {
-          svn_pool_clear(iterpool);
-
-          if (b->cancel_func)
-            SVN_ERR(b->cancel_func(b->cancel_baton));
-
-          SVN_ERR(svn_fs_x__find_max_ids(fs, rev, &next_node_id,
-                                         &next_copy_id, iterpool));
-        }
-      svn_pool_destroy(iterpool);
-
-      /* Now that we finally have the maximum revision, node-id and copy-id, we
-         can bump the two ids to get the next of each. */
-      next_node_id++;
-      next_copy_id++;
-    }
-
   /* Before setting current, verify that there is a revprops file
      for the youngest revision.  (Issue #2992) */
   SVN_ERR(svn_io_check_path(svn_fs_x__path_revprops(fs, max_rev, pool),
@@ -459,8 +216,7 @@ recover_body(void *baton, apr_pool_t *po
 
   /* Now store the discovered youngest revision, and the next IDs if
      relevant, in a new 'current' file. */
-  return svn_fs_x__write_current(fs, max_rev, next_node_id, next_copy_id,
-                                 pool);
+  return svn_fs_x__write_current(fs, max_rev, pool);
 }
 
 /* This implements the fs_library_vtable_t.recover() API. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.h?rev=1498616&r1=1498615&r2=1498616&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/recovery.h Mon Jul  1 18:20:52
2013
@@ -25,16 +25,6 @@
 
 #include "fs.h"
 
-/* Find the "largest / max" node IDs in FS with the given YOUNGEST revision.
-   Return the result in the pre-allocated MAX_NODE_ID and MAX_COPY_ID data
-   buffer, respectively.   Use POOL for allocations.  */
-svn_error_t *
-svn_fs_x__find_max_ids(svn_fs_t *fs,
-                       svn_revnum_t youngest,
-                       apr_uint64_t *max_node_id,
-                       apr_uint64_t *max_copy_id,
-                       apr_pool_t *pool);
-
 /* Recover the fsfs associated with filesystem FS.
    Use optional CANCEL_FUNC/CANCEL_BATON for cancellation support.
    Use POOL for temporary allocations. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c?rev=1498616&r1=1498615&r2=1498616&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c Mon Jul  1 18:20:52
2013
@@ -2257,45 +2257,6 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
   return SVN_NO_ERROR;
 }
 
-/* Read the 'current' file for filesystem FS and store the next
-   available node id in *NODE_ID, and the next available copy id in
-   *COPY_ID.  Allocations are performed from POOL. */
-static svn_error_t *
-get_next_revision_ids(apr_uint64_t *node_id,
-                      apr_uint64_t *copy_id,
-                      svn_fs_t *fs,
-                      apr_pool_t *pool)
-{
-  char *buf;
-  char *str;
-  svn_stringbuf_t *content;
-
-  SVN_ERR(svn_fs_x__read_content(&content,
-                                 svn_fs_x__path_current(fs, pool), pool));
-  buf = content->data;
-
-  str = svn_cstring_tokenize(" ", &buf);
-  if (! str)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Corrupt 'current' file"));
-
-  str = svn_cstring_tokenize(" ", &buf);
-  if (! str)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Corrupt 'current' file"));
-
-  *node_id = svn__base36toui64(NULL, str);
-
-  str = svn_cstring_tokenize(" \n", &buf);
-  if (! str)
-    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                            _("Corrupt 'current' file"));
-
-  *copy_id = svn__base36toui64(NULL, str);
-
-  return SVN_NO_ERROR;
-}
-
 /* This baton is used by the stream created for write_hash_rep. */
 struct write_hash_baton
 {
@@ -2611,17 +2572,7 @@ get_final_id(svn_fs_x__id_part_t *part,
              int format)
 {
   if (part->revision == SVN_INVALID_REVNUM)
-    {
-      if (format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-        {
-          part->revision = revision;
-        }
-      else
-        {
-          part->revision = 0;
-          part->number += start_id;
-        }
-    }
+    part->revision = revision;
 }
 
 /* Copy a node-revision specified by id ID in fileystem FS from a
@@ -2939,34 +2890,6 @@ verify_as_revision_before_current_plus_p
   return SVN_NO_ERROR;
 }
 
-/* Update the 'current' file to hold the correct next node and copy_ids
-   from transaction TXN_ID in filesystem FS.  The current revision is
-   set to REV.  Perform temporary allocations in POOL. */
-static svn_error_t *
-write_final_current(svn_fs_t *fs,
-                    const svn_fs_x__id_part_t *txn_id,
-                    svn_revnum_t rev,
-                    apr_uint64_t start_node_id,
-                    apr_uint64_t start_copy_id,
-                    apr_pool_t *pool)
-{
-  apr_uint64_t txn_node_id;
-  apr_uint64_t txn_copy_id;
-  fs_x_data_t *ffd = fs->fsap_data;
-
-  if (ffd->format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    return svn_fs_x__write_current(fs, rev, 0, 0, pool);
-
-  /* To find the next available ids, we add the id that used to be in
-     the 'current' file, to the next ids from the transaction file. */
-  SVN_ERR(read_next_ids(&txn_node_id, &txn_copy_id, fs, txn_id, pool));
-
-  start_node_id += txn_node_id;
-  start_copy_id += txn_copy_id;
-
-  return svn_fs_x__write_current(fs, rev, start_node_id, start_copy_id, pool);
-}
-
 /* Verify that the user registed with FS has all the locks necessary to
    permit all the changes associate with TXN_NAME.
    The FS write lock is assumed to be held by the caller. */
@@ -3090,11 +3013,6 @@ commit_body(void *baton, apr_pool_t *poo
      discovered locks. */
   SVN_ERR(verify_locks(cb->fs, txn_id, pool));
 
-  /* Get the next node_id and copy_id to use. */
-  if (ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    SVN_ERR(get_next_revision_ids(&start_node_id, &start_copy_id, cb->fs,
-                                  pool));
-
   /* We are going to be one better than this puny old revision. */
   new_rev = old_rev + 1;
 
@@ -3217,8 +3135,7 @@ commit_body(void *baton, apr_pool_t *poo
 
   /* Update the 'current' file. */
   SVN_ERR(verify_as_revision_before_current_plus_plus(cb->fs, new_rev, pool));
-  SVN_ERR(write_final_current(cb->fs, txn_id, new_rev, start_node_id,
-                              start_copy_id, pool));
+  SVN_ERR(svn_fs_x__write_current(cb->fs, new_rev, pool));
 
   /* At this point the new revision is committed and globally visible
      so let the caller know it succeeded by giving it the new revision

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.c?rev=1498616&r1=1498615&r2=1498616&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.c Mon Jul  1 18:20:52 2013
@@ -504,33 +504,16 @@ svn_fs_x__write_revnum_file(svn_fs_t *fs
   return SVN_NO_ERROR;
 }
 
-/* Atomically update the 'current' file to hold the specifed REV,
-   NEXT_NODE_ID, and NEXT_COPY_ID.  (The two next-ID parameters are
-   ignored and may be NULL if the FS format does not use them.)
+/* Atomically update the 'current' file to hold the specifed REV.
    Perform temporary allocations in POOL. */
 svn_error_t *
-svn_fs_x__write_current(svn_fs_t *fs, svn_revnum_t rev,
-                        apr_uint64_t next_node_id,
-                        apr_uint64_t next_copy_id, apr_pool_t *pool)
+svn_fs_x__write_current(svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *pool)
 {
   char *buf;
   const char *tmp_name, *name;
-  fs_x_data_t *ffd = fs->fsap_data;
 
   /* Now we can just write out this line. */
-  if (ffd->format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    {
-      buf = apr_psprintf(pool, "%ld\n", rev);
-    }
-  else
-    {
-      char node_id_str[SVN_INT64_BUFFER_SIZE];
-      char copy_id_str[SVN_INT64_BUFFER_SIZE];
-      svn__ui64tobase36(node_id_str, next_node_id);
-      svn__ui64tobase36(copy_id_str, next_copy_id);
-
-      buf = apr_psprintf(pool, "%ld %s %s\n", rev, node_id_str, copy_id_str);
-    }
+  buf = apr_psprintf(pool, "%ld\n", rev);
 
   name = svn_fs_x__path_current(fs, pool);
   SVN_ERR(svn_io_write_unique(&tmp_name,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.h?rev=1498616&r1=1498615&r2=1498616&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/util.h Mon Jul  1 18:20:52 2013
@@ -263,15 +263,11 @@ svn_fs_x__write_revnum_file(svn_fs_t *fs
                             svn_revnum_t revnum,
                             apr_pool_t *scratch_pool);
 
-/* Atomically update the 'current' file to hold the specifed REV,
-   NEXT_NODE_ID, and NEXT_COPY_ID.  (The two next-ID parameters are
-   ignored and may be 0 if the FS format does not use them.)
+/* Atomically update the 'current' file to hold the specifed REV.
    Perform temporary allocations in POOL. */
 svn_error_t *
 svn_fs_x__write_current(svn_fs_t *fs,
                         svn_revnum_t rev,
-                        apr_uint64_t next_node_id,
-                        apr_uint64_t next_copy_id,
                         apr_pool_t *pool);
 
 /* Read the file at PATH and return its content in *CONTENT. *CONTENT will



Mime
View raw message