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 2015/01/17 21:35:30 UTC
svn commit: r1652667 - in /subversion/trunk/subversion/libsvn_fs_x:
cached_data.c cached_data.h transaction.c
Author: stefan2
Date: Sat Jan 17 20:35:30 2015
New Revision: 1652667
URL: http://svn.apache.org/r1652667
Log:
Eliminate svn_fs_x__rev_get_root by merging it with its only remaining caller.
* subversion/libsvn_fs_x/cached_data.c
(svn_fs_x__rev_get_root): Remove.
* subversion/libsvn_fs_x/cached_data.h
(svn_fs_x__rev_get_root): Same.
* subversion/libsvn_fs_x/transaction.c
(svn_fs_x__create_txn): Explicitly check the base revision for validity.
Construct the root noderev ID directly.
Modified:
subversion/trunk/subversion/libsvn_fs_x/cached_data.c
subversion/trunk/subversion/libsvn_fs_x/cached_data.h
subversion/trunk/subversion/libsvn_fs_x/transaction.c
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=1652667&r1=1652666&r2=1652667&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Sat Jan 17 20:35:30 2015
@@ -457,19 +457,6 @@ svn_fs_x__get_mergeinfo_count(apr_int64_
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_fs_x__rev_get_root(svn_fs_x__id_t *root_id,
- svn_fs_t *fs,
- svn_revnum_t rev,
- apr_pool_t *scratch_pool)
-{
- SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, scratch_pool));
- svn_fs_x__init_rev_root(root_id, rev);
-
- return SVN_NO_ERROR;
-}
-
/* Describes a lazily opened rev / pack file. Instances will be shared
between multiple instances of rep_state_t. */
typedef struct shared_file_t
Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.h?rev=1652667&r1=1652666&r2=1652667&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.h Sat Jan 17 20:35:30 2015
@@ -49,14 +49,6 @@ svn_fs_x__get_mergeinfo_count(apr_int64_
const svn_fs_x__id_t *id,
apr_pool_t *scratch_pool);
-/* Set *ROOT_ID to the noderev ID for the root of revision REV in
- filesystem FS. Do temporary allocations in SCRATCH_POOL. */
-svn_error_t *
-svn_fs_x__rev_get_root(svn_fs_x__id_t *root_id,
- svn_fs_t *fs,
- svn_revnum_t rev,
- apr_pool_t *scratch_pool);
-
/* Verify that representation REP in FS can be accessed.
Do any allocations in SCRATCH_POOL. */
svn_error_t *
Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.c?rev=1652667&r1=1652666&r2=1652667&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.c Sat Jan 17 20:35:30 2015
@@ -1250,6 +1250,9 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
txn = apr_pcalloc(pool, sizeof(*txn));
ftd = apr_pcalloc(pool, sizeof(*ftd));
+ /* Valid revision number? */
+ SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, pool));
+
/* Get the txn_id. */
SVN_ERR(create_txn_dir(&txn->id, &ftd->txn_id, fs, pool));
@@ -1261,7 +1264,7 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
*txn_p = txn;
/* Create a new root node for this transaction. */
- SVN_ERR(svn_fs_x__rev_get_root(&root_id, fs, rev, pool));
+ svn_fs_x__init_rev_root(&root_id, rev);
SVN_ERR(create_new_txn_noderev_from_rev(fs, ftd->txn_id, &root_id, pool));
/* Create an empty rev file. */