Author: stefan2
Date: Thu Sep 6 23:52:16 2012
New Revision: 1381808
URL: http://svn.apache.org/viewvc?rev=1381808&view=rev
Log:
Address issue #4031 by ignoring the is-fresh-txn-root flag when
we read from committed revisions.
Note: This does not fix the root cause but fixed svnadmin verify
for existing repositories that contain empty revisions.
* subversion/libsvn_fs_fs/fs_fs.h
(svn_fs_fs__read_noderev): add allow_for_txn_roots parameter
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__read_noderev): adapt implementation
(get_node_revision_body): adapt caller
Modified:
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
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=1381808&r1=1381807&r2=1381808&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Sep 6 23:52:16 2012
@@ -2284,6 +2284,7 @@ get_node_revision_body(node_revision_t *
SVN_ERR(svn_fs_fs__read_noderev(noderev_p,
svn_stream_from_aprfile2(revision_file,
FALSE,
pool),
+ svn_fs_fs__id_txn_id(id) != NULL,
pool));
/* The noderev is not in cache, yet. Add it, if caching has been enabled. */
@@ -2293,6 +2294,7 @@ get_node_revision_body(node_revision_t *
svn_error_t *
svn_fs_fs__read_noderev(node_revision_t **noderev_p,
svn_stream_t *stream,
+ svn_boolean_t allow_for_txn_roots,
apr_pool_t *pool)
{
apr_hash_t *headers;
@@ -2423,7 +2425,9 @@ svn_fs_fs__read_noderev(node_revision_t
}
/* Get whether this is a fresh txn root. */
- value = apr_hash_get(headers, HEADER_FRESHTXNRT, APR_HASH_KEY_STRING);
+ value = allow_for_txn_roots
+ ? apr_hash_get(headers, HEADER_FRESHTXNRT, APR_HASH_KEY_STRING)
+ : NULL;
noderev->is_fresh_txn_root = (value != NULL);
/* Get the mergeinfo count. */
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h?rev=1381808&r1=1381807&r2=1381808&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h Thu Sep 6 23:52:16 2012
@@ -94,11 +94,13 @@ svn_fs_fs__write_noderev(svn_stream_t *o
apr_pool_t *pool);
/* Read a node-revision from STREAM. Set *NODEREV to the new structure,
- allocated in POOL. */
+ allocated in POOL. If ALLOW_FOR_TXN_ROOTS is FALSE, the is-fresh-txn-root
+ flag will be ignored. */
/* ### Currently used only by fs_fs.c */
svn_error_t *
svn_fs_fs__read_noderev(node_revision_t **noderev,
svn_stream_t *stream,
+ svn_boolean_t allow_for_txn_roots,
apr_pool_t *pool);