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 2014/02/16 19:20:26 UTC
svn commit: r1568800 - /subversion/trunk/subversion/libsvn_fs_x/transaction.c
Author: stefan2
Date: Sun Feb 16 18:20:25 2014
New Revision: 1568800
URL: http://svn.apache.org/r1568800
Log:
* subversion/libsvn_fs_x/transaction.c
(create_new_txn_noderev_from_rev): Simplify using the specialized txn
root node ID creation API.
Modified:
subversion/trunk/subversion/libsvn_fs_x/transaction.c
Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.c?rev=1568800&r1=1568799&r2=1568800&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.c Sun Feb 16 18:20:25 2014
@@ -955,10 +955,12 @@ create_new_txn_noderev_from_rev(svn_fs_t
apr_pool_t *pool)
{
node_revision_t *noderev;
- const svn_fs_x__id_part_t *node_id, *copy_id;
SVN_ERR(svn_fs_x__get_node_revision(&noderev, fs, src, pool));
+ /* This must be a root node. */
+ SVN_ERR_ASSERT(svn_fs_x__id_node_id(noderev->id)->number == 0);
+
if (svn_fs_x__id_is_txn(noderev->id))
return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
_("Copying from transactions not allowed"));
@@ -970,9 +972,7 @@ create_new_txn_noderev_from_rev(svn_fs_t
/* For the transaction root, the copyroot never changes. */
- node_id = svn_fs_x__id_node_id(noderev->id);
- copy_id = svn_fs_x__id_copy_id(noderev->id);
- noderev->id = svn_fs_x__id_txn_create(node_id, copy_id, txn_id, pool);
+ noderev->id = svn_fs_x__id_txn_create_root(txn_id, pool);
return svn_fs_x__put_node_revision(fs, noderev->id, noderev, TRUE, pool);
}