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/12/15 12:13:43 UTC
svn commit: r1645625 - in
/subversion/branches/fsx-id/subversion/libsvn_fs_x: cached_data.c
transaction.c util.c util.h
Author: stefan2
Date: Mon Dec 15 11:13:42 2014
New Revision: 1645625
URL: http://svn.apache.org/r1645625
Log:
On the fsx-id branch: Remove the svn_fs_t type from the internal utils API.
* subversion/libsvn_fs_x/util.h
(svn_fs_x__path_txn_node_props,
svn_fs_x__path_txn_node_children): Switch parameter ID type to noderev IDs.
* subversion/libsvn_fs_x/util.c
(svn_fs_x__path_txn_node_props,
svn_fs_x__path_txn_node_children): Update and simplify implementation.
* subversion/libsvn_fs_x/cached_data.c
(get_dir_contents,
svn_fs_x__get_proplist): Update caller.
* subversion/libsvn_fs_x/transaction.c
(svn_fs_x__set_entry,
svn_fs_x__set_proplist,
svn_fs_x__delete_node_revision): Same.
Modified:
subversion/branches/fsx-id/subversion/libsvn_fs_x/cached_data.c
subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c
subversion/branches/fsx-id/subversion/libsvn_fs_x/util.c
subversion/branches/fsx-id/subversion/libsvn_fs_x/util.h
Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/cached_data.c?rev=1645625&r1=1645624&r2=1645625&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/cached_data.c Mon Dec 15 11:13:42 2014
@@ -2549,7 +2549,7 @@ get_dir_contents(apr_array_header_t **en
&& ! svn_fs_x__is_revision(noderev->data_rep->id.change_set))
{
const char *filename
- = svn_fs_x__path_txn_node_children(fs, noderev->id, scratch_pool);
+ = svn_fs_x__path_txn_node_children(fs, id, scratch_pool);
/* The representation is mutable. Read the old directory
contents from the mutable children file, followed by the
@@ -2722,12 +2722,14 @@ svn_fs_x__get_proplist(apr_hash_t **prop
{
apr_hash_t *proplist;
svn_stream_t *stream;
+ const svn_fs_x__noderev_id_t *noderev_id
+ = svn_fs_x__id_noderev_id(noderev->id);
if (noderev->prop_rep
&& !svn_fs_x__is_revision(noderev->prop_rep->id.change_set))
{
const char *filename
- = svn_fs_x__path_txn_node_props(fs, noderev->id, pool);
+ = svn_fs_x__path_txn_node_props(fs, noderev_id, pool);
proplist = apr_hash_make(pool);
SVN_ERR(svn_stream_open_readonly(&stream, filename, pool, pool));
Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c?rev=1645625&r1=1645624&r2=1645625&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/transaction.c Mon Dec 15 11:13:42 2014
@@ -1706,8 +1706,10 @@ svn_fs_x__set_entry(svn_fs_t *fs,
apr_pool_t *pool)
{
representation_t *rep = parent_noderev->data_rep;
+ const svn_fs_x__noderev_id_t *parent_id
+ = svn_fs_x__id_noderev_id(parent_noderev->id);
const char *filename
- = svn_fs_x__path_txn_node_children(fs, parent_noderev->id, pool);
+ = svn_fs_x__path_txn_node_children(fs, parent_id, pool);
apr_file_t *file;
svn_stream_t *out;
fs_x_data_t *ffd = fs->fsap_data;
@@ -2480,8 +2482,8 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
apr_hash_t *proplist,
apr_pool_t *pool)
{
- const char *filename
- = svn_fs_x__path_txn_node_props(fs, noderev->id, pool);
+ const svn_fs_x__noderev_id_t *id = svn_fs_x__id_noderev_id(noderev->id);
+ const char *filename = svn_fs_x__path_txn_node_props(fs, id, pool);
apr_file_t *file;
svn_stream_t *out;
@@ -2498,8 +2500,7 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
|| svn_fs_x__is_revision(noderev->prop_rep->id.change_set))
{
noderev->prop_rep = apr_pcalloc(pool, sizeof(*noderev->prop_rep));
- noderev->prop_rep->id.change_set
- = svn_fs_x__id_noderev_id(noderev->id)->change_set;
+ noderev->prop_rep->id.change_set = id->change_set;
SVN_ERR(allocate_item_index(&noderev->prop_rep->id.number, fs,
svn_fs_x__id_txn_id(noderev->id), pool));
SVN_ERR(svn_fs_x__put_node_revision(fs, noderev->id, noderev, FALSE,
@@ -3634,7 +3635,8 @@ svn_fs_x__delete_node_revision(svn_fs_t
/* Delete any mutable property representation. */
if (noderev->prop_rep
&& svn_fs_x__is_txn(noderev->prop_rep->id.change_set))
- SVN_ERR(svn_io_remove_file2(svn_fs_x__path_txn_node_props(fs, id, pool),
+ SVN_ERR(svn_io_remove_file2(svn_fs_x__path_txn_node_props(fs, noderev_id,
+ pool),
FALSE, pool));
/* Delete any mutable data representation. */
@@ -3645,7 +3647,8 @@ svn_fs_x__delete_node_revision(svn_fs_t
fs_x_data_t *ffd = fs->fsap_data;
const svn_fs_x__id_part_t *key = svn_fs_x__id_noderev_id(id);
- SVN_ERR(svn_io_remove_file2(svn_fs_x__path_txn_node_children(fs, id,
+ SVN_ERR(svn_io_remove_file2(svn_fs_x__path_txn_node_children(fs,
+ noderev_id,
pool),
FALSE, pool));
Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/util.c?rev=1645625&r1=1645624&r2=1645625&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/util.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/util.c Mon Dec 15 11:13:42 2014
@@ -401,19 +401,19 @@ svn_fs_x__path_txn_node_rev(svn_fs_t *fs
const char *
svn_fs_x__path_txn_node_props(svn_fs_t *fs,
- const svn_fs_id_t *id,
+ const svn_fs_x__noderev_id_t *id,
apr_pool_t *pool)
{
- const svn_fs_x__noderev_id_t *noderev_id = svn_fs_x__id_noderev_id(id);
- return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, noderev_id, pool),
+ return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, id, pool),
PATH_EXT_PROPS, SVN_VA_NULL);
}
const char *
-svn_fs_x__path_txn_node_children(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
+svn_fs_x__path_txn_node_children(svn_fs_t *fs,
+ const svn_fs_x__noderev_id_t *id,
+ apr_pool_t *pool)
{
- const svn_fs_x__noderev_id_t *noderev_id = svn_fs_x__id_noderev_id(id);
- return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, noderev_id, pool),
+ return apr_pstrcat(pool, svn_fs_x__path_txn_node_rev(fs, id, pool),
PATH_EXT_CHILDREN, SVN_VA_NULL);
}
Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/util.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/util.h?rev=1645625&r1=1645624&r2=1645625&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/util.h (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/util.h Mon Dec 15 11:13:42 2014
@@ -250,12 +250,12 @@ svn_fs_x__path_txn_node_rev(svn_fs_t *fs
const char *
svn_fs_x__path_txn_node_props(svn_fs_t *fs,
- const svn_fs_id_t *id,
+ const svn_fs_x__noderev_id_t *id,
apr_pool_t *pool);
const char *
svn_fs_x__path_txn_node_children(svn_fs_t *fs,
- const svn_fs_id_t *id,
+ const svn_fs_x__noderev_id_t *id,
apr_pool_t *pool);
/* Check that BUF, a nul-terminated buffer of text from file PATH,