Author: stefan2
Date: Wed Feb  4 11:17:27 2015
New Revision: 1657120

URL: http://svn.apache.org/r1657120
Log:
Remove the now unused "is-fresh-txn-root" flag from FSX.

* subversion/libsvn_fs_x/fs.h
  (svn_fs_x__noderev_t): Remove the flag from our internal struct.

* subversion/libsvn_fs_x/low_level.c
  (HEADER_FRESHTXNRT): Remove this noderev header.
  (svn_fs_x__read_noderev,
   svn_fs_x__write_noderev): One noderev element less to process.

* subversion/libsvn_fs_x/cached_data.c
  (block_read_noderev): No workaround necessary anymore.

* subversion/libsvn_fs_x/transaction.h
  (svn_fs_x__put_node_revision): Drop the fresh-txn-root flag.

* subversion/libsvn_fs_x/transaction.c
  (svn_fs_x__put_node_revision): Update implementation.
  (create_new_txn_noderev_from_rev,
   svn_fs_x__create_node,
   svn_fs_x__set_entry
   rep_write_contents_close,
   svn_fs_x__create_successor,
   svn_fs_x__set_proplist): Update callers.
  (write_final_rev): No workaround necessary anymore.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_increment_mergeinfo_count,
   svn_fs_x__dag_set_has_mergeinfo,
   svn_fs_x__dag_update_ancestry): Update callers.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/cached_data.c
    subversion/trunk/subversion/libsvn_fs_x/dag.c
    subversion/trunk/subversion/libsvn_fs_x/fs.h
    subversion/trunk/subversion/libsvn_fs_x/low_level.c
    subversion/trunk/subversion/libsvn_fs_x/transaction.c
    subversion/trunk/subversion/libsvn_fs_x/transaction.h

Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Wed Feb  4 11:17:27 
2015
@@ -3100,10 +3100,6 @@ block_read_noderev(svn_fs_x__noderev_t *
 
   SVN_ERR(svn_fs_x__read_noderev(noderev_p, stream, result_pool,
                                  scratch_pool));
-
-  /* Workaround issue #4031: is-fresh-txn-root in revision files. */
-  (*noderev_p)->is_fresh_txn_root = FALSE;
-
   if (ffd->node_revision_cache)
     SVN_ERR(svn_cache__set(ffd->node_revision_cache, key, *noderev_p,
                            scratch_pool));

Modified: subversion/trunk/subversion/libsvn_fs_x/dag.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/dag.c?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/dag.c Wed Feb  4 11:17:27 2015
@@ -618,7 +618,7 @@ svn_fs_x__dag_increment_mergeinfo_count(
     }
 
   /* Flush it out. */
-  return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+  return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
 }
 
 svn_error_t *
@@ -644,7 +644,7 @@ svn_fs_x__dag_set_has_mergeinfo(dag_node
   noderev->has_mergeinfo = has_mergeinfo;
 
   /* Flush it out. */
-  return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+  return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
 }
 
 
@@ -1401,6 +1401,6 @@ svn_fs_x__dag_update_ancestry(dag_node_t
   target_noderev->predecessor_count = source_noderev->predecessor_count;
   target_noderev->predecessor_count++;
 
-  return svn_fs_x__put_node_revision(target->fs, target_noderev, FALSE,
+  return svn_fs_x__put_node_revision(target->fs, target_noderev,
                                      scratch_pool);
 }

Modified: subversion/trunk/subversion/libsvn_fs_x/fs.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs.h?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs.h Wed Feb  4 11:17:27 2015
@@ -517,9 +517,6 @@ typedef struct svn_fs_x__noderev_t
   /* path at which this node first came into existence.  */
   const char *created_path;
 
-  /* is this the unmodified root of a transaction? */
-  svn_boolean_t is_fresh_txn_root;
-
   /* Does this node itself have svn:mergeinfo? */
   svn_boolean_t has_mergeinfo;
 

Modified: subversion/trunk/subversion/libsvn_fs_x/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/low_level.c?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/low_level.c Wed Feb  4 11:17:27 2015
@@ -48,7 +48,6 @@
 #define HEADER_PRED        "pred"
 #define HEADER_COPYFROM    "copyfrom"
 #define HEADER_COPYROOT    "copyroot"
-#define HEADER_FRESHTXNRT  "is-fresh-txn-root"
 #define HEADER_MINFO_HERE  "minfo-here"
 #define HEADER_MINFO_CNT   "minfo-cnt"
 
@@ -560,10 +559,6 @@ svn_fs_x__read_noderev(svn_fs_x__noderev
                                                   result_pool);
     }
 
-  /* Get whether this is a fresh txn root. */
-  value = svn_hash_gets(headers, HEADER_FRESHTXNRT);
-  noderev->is_fresh_txn_root = (value != NULL);
-
   /* Get the mergeinfo count. */
   value = svn_hash_gets(headers, HEADER_MINFO_CNT);
   if (value)
@@ -691,9 +686,6 @@ svn_fs_x__write_noderev(svn_stream_t *ou
                               auto_escape_path(noderev->copyroot_path,
                                                scratch_pool)));
 
-  if (noderev->is_fresh_txn_root)
-    SVN_ERR(svn_stream_puts(outfile, HEADER_FRESHTXNRT ": y\n"));
-
   if (noderev->mergeinfo_count > 0)
     SVN_ERR(svn_stream_printf(outfile, scratch_pool, HEADER_MINFO_CNT ": %"
                               APR_INT64_T_FMT "\n",

Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.c?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.c Wed Feb  4 11:17:27 
2015
@@ -786,14 +786,11 @@ svn_fs_x__is_fresh_txn_root(svn_fs_x__no
 svn_error_t *
 svn_fs_x__put_node_revision(svn_fs_t *fs,
                             svn_fs_x__noderev_t *noderev,
-                            svn_boolean_t fresh_txn_root,
                             apr_pool_t *scratch_pool)
 {
   apr_file_t *noderev_file;
   const svn_fs_x__id_t *id = &noderev->noderev_id;
 
-  noderev->is_fresh_txn_root = fresh_txn_root;
-
   if (! svn_fs_x__is_txn(id->change_set))
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                              _("Attempted to write to non-transaction '%s'"),
@@ -1192,7 +1189,7 @@ create_new_txn_noderev_from_rev(svn_fs_t
   /* For the transaction root, the copyroot never changes. */
   svn_fs_x__init_txn_root(&noderev->noderev_id, txn_id);
 
-  return svn_fs_x__put_node_revision(fs, noderev, TRUE, scratch_pool);
+  return svn_fs_x__put_node_revision(fs, noderev, scratch_pool);
 }
 
 /* A structure used by get_and_increment_txn_key_body(). */
@@ -1675,7 +1672,7 @@ svn_fs_x__create_node(svn_fs_t *fs,
   SVN_ERR(allocate_item_index(&noderev->noderev_id.number, fs, txn_id,
                               scratch_pool));
 
-  SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1771,8 +1768,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
       rep->id.number = SVN_FS_X__ITEM_INDEX_UNUSED;
 
       /* Save noderev to disk. */
-      SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, FALSE,
-                                          subpool));
+      SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, subpool));
     }
   else
     {
@@ -2415,8 +2411,7 @@ rep_write_contents_close(void *baton)
   apr_pool_cleanup_kill(b->local_pool, b, rep_write_cleanup);
 
   /* Write out the new node-rev information. */
-  SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, FALSE,
-                                      b->local_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, b->local_pool));
   if (!old_rep)
     {
       svn_fs_x__p2l_entry_t entry;
@@ -2503,7 +2498,7 @@ svn_fs_x__create_successor(svn_fs_t *fs,
         = svn_fs_x__get_revnum(new_noderev->noderev_id.change_set);
     }
 
-  SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, FALSE, scratch_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -2538,7 +2533,7 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
       noderev->prop_rep->id.change_set = id->change_set;
       SVN_ERR(allocate_item_index(&noderev->prop_rep->id.number, fs,
                                   txn_id, scratch_pool));
-      SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+      SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -3008,9 +3003,6 @@ write_final_rev(svn_fs_x__id_t *new_id_p
   if (noderev->prop_rep)
     noderev->prop_rep->has_sha1 = FALSE;
 
-  /* Workaround issue #4031: is-fresh-txn-root in revision files. */
-  noderev->is_fresh_txn_root = FALSE;
-
   /* Write out our new node-revision. */
   if (at_root)
     SVN_ERR(validate_root_noderev(fs, noderev, rev, scratch_pool));

Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.h?rev=1657120&r1=1657119&r2=1657120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.h Wed Feb  4 11:17:27 
2015
@@ -79,12 +79,10 @@ svn_boolean_t
 svn_fs_x__is_fresh_txn_root(svn_fs_x__noderev_t *noderev);
 
 /* Store NODEREV as the node-revision in the transaction defined by NODEREV's
-   ID within FS, after setting its is_fresh_txn_root to FRESH_TXN_ROOT.  Do
-   any necessary temporary allocation in SCRATCH_POOL. */
+   ID within FS.  Do any necessary temporary allocation in SCRATCH_POOL. */
 svn_error_t *
 svn_fs_x__put_node_revision(svn_fs_t *fs,
                             svn_fs_x__noderev_t *noderev,
-                            svn_boolean_t fresh_txn_root,
                             apr_pool_t *scratch_pool);
 
 /* Find the paths which were changed in transaction TXN_ID of


Reply via email to