FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Copy a revision node-rev SRC into the current transaction TXN_ID in
   the filesystem FS.  This is only used to create the root of a transaction.
   Allocations are from POOL.  */
Copy a revision node-rev SRC into the current transaction TXN_ID in
the filesystem FS.  This is only used to create the root of a transaction.
Allocations are from POOL.
Copy a revision node - rev SRC into the current transaction TXN_ID in the filesystem FS . This is only used to create the root of a transaction . Allocations are from POOL .
static svn_error_t *
create_new_txn_noderev_from_rev(svn_fs_t *fs,
                                const svn_fs_fs__id_part_t *txn_id,
                                svn_fs_id_t *src,
                                apr_pool_t *pool)
{
  node_revision_t *noderev;
  const svn_fs_fs__id_part_t *node_id, *copy_id;
  SVN_ERR(svn_fs_fs__get_node_revision(&noderev, fs, src, pool, pool));
  if (svn_fs_fs__id_is_txn(noderev->id))
    return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                            _("Copying from transactions not allowed"));
  noderev->predecessor_id = noderev->id;
  noderev->predecessor_count++;
  noderev->copyfrom_path = NULL;
  noderev->copyfrom_rev = SVN_INVALID_REVNUM;
  node_id = svn_fs_fs__id_node_id(noderev->id);
  copy_id = svn_fs_fs__id_copy_id(noderev->id);
  noderev->id = svn_fs_fs__id_txn_create(node_id, copy_id, txn_id, pool);
  return svn_fs_fs__put_node_revision(fs, noderev->id, noderev, TRUE, pool);
}
static svn_error_t * create_new_txn_noderev_from_rev ( svn_fs_t * fs , const svn_fs_fs__id_part_t * txn_id , svn_fs_id_t * src , apr_pool_t * pool ) { node_revision_t * noderev ; const svn_fs_fs__id_part_t * node_id , * copy_id ; SVN_ERR ( svn_fs_fs__get_node_revision ( & noderev , fs , src , pool , pool ) ) ; if ( svn_fs_fs__id_is_txn ( noderev -> id ) ) return svn_error_create ( SVN_ERR_FS_CORRUPT , NULL , _ ( " " ) ) ; noderev -> predecessor_id = noderev -> id ; noderev -> predecessor_count ++ ; noderev -> copyfrom_path = NULL ; noderev -> copyfrom_rev = SVN_INVALID_REVNUM ; node_id = svn_fs_fs__id_node_id ( noderev -> id ) ; copy_id = svn_fs_fs__id_copy_id ( noderev -> id ) ; noderev -> id = svn_fs_fs__id_txn_create ( node_id , copy_id , txn_id , pool ) ; return svn_fs_fs__put_node_revision ( fs , noderev -> id , noderev , TRUE , pool ) ; }
Copy a revision node-rev SRC into the current transaction TXN_ID in
the filesystem FS.
Copy a revision node - rev SRC into the current transaction TXN_ID in the filesystem FS .
/* For the transaction root, the copyroot never changes. */