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 2012/12/16 22:59:57 UTC

svn commit: r1422700 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Author: stefan2
Date: Sun Dec 16 21:59:56 2012
New Revision: 1422700

URL: http://svn.apache.org/viewvc?rev=1422700&view=rev
Log:
Improve the workaround for issue #4031: since get_node_revision_body
will not be called for the root node in empty revisions, those would
still have the "is-fresh-txn-root" flag set in the rev file.

Therefore, simply reset all these flags unconditionally just before
writing the data to the rev file.

* subversion/libsvn_fs_fs/fs_fs.c
  (get_node_revision_body): remove workaround here
  (write_final_rev): and place it here; execute it unconditionally

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1422700&r1=1422699&r2=1422700&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sun Dec 16 21:59:56 2012
@@ -2329,10 +2329,6 @@ get_node_revision_body(node_revision_t *
                                   svn_stream_from_aprfile2(revision_file, FALSE,
                                                            pool),
                                   pool));
-  /* Workaround issue #4031: is-fresh-txn-root in revision files. */
-  if (svn_fs_fs__id_txn_id(id) == NULL)
-    (*noderev_p)->is_fresh_txn_root = FALSE;
-
 
   /* The noderev is not in cache, yet. Add it, if caching has been enabled. */
   return set_cached_node_revision_body(*noderev_p, fs, id, pool);
@@ -8139,9 +8135,13 @@ write_final_rev(const svn_fs_id_t **new_
   if (noderev->prop_rep)
     noderev->prop_rep->sha1_checksum = NULL;
 
+  /* 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, pool));
+
   SVN_ERR(svn_fs_fs__write_noderev(svn_stream_from_aprfile2(file, TRUE, pool),
                                    noderev, ffd->format,
                                    svn_fs_fs__fs_supports_mergeinfo(fs),