You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/04/03 21:17:02 UTC
svn commit: r1309099 [3/6] - in /subversion/branches/master-passphrase: ./
build/ build/generator/ build/generator/templates/
subversion/bindings/swig/perl/native/t/ subversion/include/
subversion/include/private/ subversion/libsvn_client/ subversion/l...
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/ra.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/ra.c Tue Apr 3 19:16:59 2012
@@ -391,9 +391,7 @@ svn_client_open_ra_session(svn_ra_sessio
for a URL or 'working' for a WC path. If REVISION->kind is
'unspecified', the operative revision is the peg revision.
- Store the actual revision number of the object in *REV_P, and the
- final resulting URL in *URL_P. REV_P and/or URL_P may be NULL if not
- wanted.
+ Store the actual location of the object in *RESOLVED_LOC_P.
RA_SESSION should be an open RA session pointing at the URL of
PATH_OR_URL, or NULL, in which case this function will open its own
@@ -404,8 +402,7 @@ svn_client_open_ra_session(svn_ra_sessio
Use POOL for all allocations. */
static svn_error_t *
-resolve_rev_and_url(svn_revnum_t *rev_p,
- const char **url_p,
+resolve_rev_and_url(svn_client__pathrev_t **resolved_loc_p,
svn_ra_session_t *ra_session,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
@@ -430,29 +427,25 @@ resolve_rev_and_url(svn_revnum_t *rev_p,
ra_session, path_or_url, &peg_rev,
&start_rev, NULL, ctx, pool));
- if (rev_p)
- *rev_p = rev;
- if (url_p)
- *url_p = url;
-
+ SVN_ERR(svn_client__pathrev_create_with_session(resolved_loc_p,
+ ra_session, rev, url, pool));
return SVN_NO_ERROR;
}
svn_error_t *
-svn_client__ra_session_from_path(svn_ra_session_t **ra_session_p,
- svn_revnum_t *rev_p,
- const char **url_p,
- const char *path_or_url,
- const char *base_dir_abspath,
- const svn_opt_revision_t *peg_revision,
- const svn_opt_revision_t *revision,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+svn_client__ra_session_from_path2(svn_ra_session_t **ra_session_p,
+ svn_client__pathrev_t **resolved_loc_p,
+ const char *path_or_url,
+ const char *base_dir_abspath,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
{
svn_ra_session_t *ra_session;
const char *initial_url;
const char *corrected_url;
- const char *resolved_url;
+ svn_client__pathrev_t *resolved_loc;
SVN_ERR(svn_client_url_from_path2(&initial_url, path_or_url, ctx, pool,
pool));
@@ -471,16 +464,41 @@ svn_client__ra_session_from_path(svn_ra_
if (corrected_url && svn_path_is_url(path_or_url))
path_or_url = corrected_url;
- SVN_ERR(resolve_rev_and_url(rev_p, &resolved_url, ra_session,
+ SVN_ERR(resolve_rev_and_url(&resolved_loc, ra_session,
path_or_url, peg_revision, revision,
ctx, pool));
/* Make the session point to the real URL. */
- SVN_ERR(svn_ra_reparent(ra_session, resolved_url, pool));
+ SVN_ERR(svn_ra_reparent(ra_session, resolved_loc->url, pool));
*ra_session_p = ra_session;
+ if (resolved_loc_p)
+ *resolved_loc_p = resolved_loc;
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_client__ra_session_from_path(svn_ra_session_t **ra_session_p,
+ svn_revnum_t *rev_p,
+ const char **url_p,
+ const char *path_or_url,
+ const char *base_dir_abspath,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ svn_client__pathrev_t *resolved_loc;
+
+ SVN_ERR(svn_client__ra_session_from_path2(ra_session_p, &resolved_loc,
+ path_or_url, base_dir_abspath,
+ peg_revision, revision,
+ ctx, pool));
+ if (rev_p)
+ *rev_p = resolved_loc->rev;
if (url_p)
- *url_p = resolved_url;
+ *url_p = resolved_loc->url;
return SVN_NO_ERROR;
}
@@ -649,24 +667,28 @@ repos_locations(const char **start_url,
}
svn_error_t *
-svn_client__repos_location(const char **op_url,
+svn_client__repos_location(svn_client__pathrev_t **op_loc_p,
svn_ra_session_t *ra_session,
- const char *peg_url,
- svn_revnum_t peg_revnum,
+ const svn_client__pathrev_t *peg_loc,
svn_revnum_t op_revnum,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const char *old_session_url;
+ const char *op_url;
SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session,
- peg_url, scratch_pool));
- SVN_ERR(repos_locations(op_url, NULL,
- ra_session, peg_url, peg_revnum,
+ peg_loc->url, scratch_pool));
+ SVN_ERR(repos_locations(&op_url, NULL, ra_session,
+ peg_loc->url, peg_loc->rev,
op_revnum, SVN_INVALID_REVNUM,
result_pool, scratch_pool));
SVN_ERR(svn_ra_reparent(ra_session, old_session_url, scratch_pool));
+
+ *op_loc_p = svn_client__pathrev_create(peg_loc->repos_root_url,
+ peg_loc->repos_uuid,
+ op_revnum, op_url, result_pool);
return SVN_NO_ERROR;
}
@@ -808,19 +830,15 @@ svn_client__repos_locations(const char *
svn_error_t *
-svn_client__get_youngest_common_ancestor(const char **ancestor_relpath,
- const char **ancestor_url,
- svn_revnum_t *ancestor_revision,
- const char *url1,
- svn_revnum_t rev1,
- const char *url2,
- svn_revnum_t rev2,
+svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
+ const svn_client__pathrev_t *loc1,
+ const svn_client__pathrev_t *loc2,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- apr_pool_t *sesspool = svn_pool_create(pool);
+ apr_pool_t *sesspool = svn_pool_create(scratch_pool);
svn_ra_session_t *session;
- const char *repos_root_url;
apr_hash_t *history1, *history2;
apr_hash_index_t *hi;
svn_revnum_t yc_revision = SVN_INVALID_REVNUM;
@@ -828,31 +846,36 @@ svn_client__get_youngest_common_ancestor
svn_boolean_t has_rev_zero_history1;
svn_boolean_t has_rev_zero_history2;
+ if (strcmp(loc1->repos_root_url, loc2->repos_root_url) != 0)
+ {
+ *ancestor_p = NULL;
+ return SVN_NO_ERROR;
+ }
+
/* Open an RA session for the two locations. */
- SVN_ERR(svn_client_open_ra_session(&session, url1, ctx, sesspool));
- SVN_ERR(svn_ra_get_repos_root2(session, &repos_root_url, pool));
+ SVN_ERR(svn_client_open_ra_session(&session, loc1->url, ctx, sesspool));
/* We're going to cheat and use history-as-mergeinfo because it
saves us a bunch of annoying custom data comparisons and such. */
SVN_ERR(svn_client__get_history_as_mergeinfo(&history1,
&has_rev_zero_history1,
- url1, rev1,
+ loc1->url, loc1->rev,
SVN_INVALID_REVNUM,
SVN_INVALID_REVNUM,
- session, ctx, pool));
+ session, ctx, scratch_pool));
SVN_ERR(svn_client__get_history_as_mergeinfo(&history2,
&has_rev_zero_history2,
- url2, rev2,
+ loc2->url, loc2->rev,
SVN_INVALID_REVNUM,
SVN_INVALID_REVNUM,
- session, ctx, pool));
+ session, ctx, scratch_pool));
/* Close the source and target sessions. */
svn_pool_destroy(sesspool);
/* Loop through the first location's history, check for overlapping
paths and ranges in the second location's history, and
remembering the youngest matching location. */
- for (hi = apr_hash_first(pool, history1); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(scratch_pool, history1); hi; hi = apr_hash_next(hi))
{
const char *path = svn__apr_hash_index_key(hi);
apr_ssize_t path_len = svn__apr_hash_index_klen(hi);
@@ -865,7 +888,7 @@ svn_client__get_youngest_common_ancestor
/* We have a path match. Now, did our two histories share
any revisions at that path? */
SVN_ERR(svn_rangelist_intersect(&common, ranges1, ranges2,
- TRUE, pool));
+ TRUE, scratch_pool));
if (common->nelts)
{
svn_merge_range_t *yc_range =
@@ -888,14 +911,19 @@ svn_client__get_youngest_common_ancestor
yc_revision = 0;
}
- if (ancestor_relpath)
- *ancestor_relpath = yc_relpath;
- if (ancestor_url)
- *ancestor_url
- = yc_relpath ? svn_path_url_add_component2(repos_root_url, yc_relpath,
- pool) : NULL;
- if (ancestor_revision)
- *ancestor_revision = yc_revision;
+ if (yc_relpath)
+ {
+ const char *yc_url = svn_path_url_add_component2(
+ loc1->repos_root_url, yc_relpath, result_pool);
+
+ *ancestor_p = svn_client__pathrev_create(
+ loc1->repos_root_url, loc1->repos_uuid,
+ yc_revision, yc_url, result_pool);
+ }
+ else
+ {
+ *ancestor_p = NULL;
+ }
return SVN_NO_ERROR;
}
@@ -912,22 +940,30 @@ svn_client__youngest_common_ancestor(con
{
apr_pool_t *sesspool = svn_pool_create(scratch_pool);
svn_ra_session_t *session;
- const char *url1, *url2;
- svn_revnum_t rev1, rev2;
+ svn_client__pathrev_t *loc1, *loc2, *ancestor;
/* Resolve the two locations */
- SVN_ERR(svn_client__ra_session_from_path(&session, &rev1, &url1,
- path_or_url1, NULL,
- revision1, revision1,
- ctx, sesspool));
- SVN_ERR(resolve_rev_and_url(&rev2, &url2, session,
+ SVN_ERR(svn_client__ra_session_from_path2(&session, &loc1,
+ path_or_url1, NULL,
+ revision1, revision1,
+ ctx, sesspool));
+ SVN_ERR(resolve_rev_and_url(&loc2, session,
path_or_url2, revision2, revision2,
ctx, scratch_pool));
SVN_ERR(svn_client__get_youngest_common_ancestor(
- NULL, ancestor_url, ancestor_rev,
- url1, rev1, url2, rev2, ctx, result_pool));
+ &ancestor, loc1, loc2, ctx, result_pool, scratch_pool));
+ if (ancestor)
+ {
+ *ancestor_url = ancestor->url;
+ *ancestor_rev = ancestor->rev;
+ }
+ else
+ {
+ *ancestor_url = NULL;
+ *ancestor_rev = SVN_INVALID_REVNUM;
+ }
svn_pool_destroy(sesspool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/switch.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/switch.c Tue Apr 3 19:16:59 2012
@@ -197,20 +197,23 @@ switch_internal(svn_revnum_t *result_rev
### okay? */
if (! ignore_ancestry)
{
- const char *target_url, *yc_url;
- svn_revnum_t target_rev, yc_rev;
+ const char *target_url;
+ svn_revnum_t target_rev;
+ svn_client__pathrev_t *switch_loc, *target_loc, *yca;
+ SVN_ERR(svn_client__pathrev_create_with_session(
+ &switch_loc, ra_session, revnum, switch_rev_url, pool));
SVN_ERR(svn_wc__node_get_url(&target_url, ctx->wc_ctx, local_abspath,
pool, pool));
SVN_ERR(svn_wc__node_get_base_rev(&target_rev, ctx->wc_ctx,
local_abspath, pool));
+ SVN_ERR(svn_client__pathrev_create_with_session(
+ &target_loc, ra_session, target_rev, target_url, pool));
/* ### It would be nice if this function could reuse the existing
ra session instead of opening two for its own use. */
- SVN_ERR(svn_client__get_youngest_common_ancestor(NULL, &yc_url, &yc_rev,
- switch_rev_url, revnum,
- target_url, target_rev,
- ctx, pool));
- if (! (yc_url && SVN_IS_VALID_REVNUM(yc_rev)))
+ SVN_ERR(svn_client__get_youngest_common_ancestor(
+ &yca, switch_loc, target_loc, ctx, pool, pool));
+ if (! yca)
return svn_error_createf(SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL,
_("'%s' shares no common ancestry with '%s'"),
switch_url, local_abspath);
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/util.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/util.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/util.c Tue Apr 3 19:16:59 2012
@@ -41,6 +41,69 @@
#include "svn_private_config.h"
+svn_client__pathrev_t *
+svn_client__pathrev_create(const char *repos_root_url,
+ const char *repos_uuid,
+ svn_revnum_t rev,
+ const char *url,
+ apr_pool_t *result_pool)
+{
+ svn_client__pathrev_t *loc = apr_palloc(result_pool, sizeof(*loc));
+
+ loc->repos_root_url = apr_pstrdup(result_pool, repos_root_url);
+ loc->repos_uuid = apr_pstrdup(result_pool, repos_uuid);
+ loc->rev = rev;
+ loc->url = apr_pstrdup(result_pool, url);
+ return loc;
+}
+
+svn_client__pathrev_t *
+svn_client__pathrev_create_with_relpath(const char *repos_root_url,
+ const char *repos_uuid,
+ svn_revnum_t rev,
+ const char *relpath,
+ apr_pool_t *result_pool)
+{
+ return svn_client__pathrev_create(
+ repos_root_url, repos_uuid, rev,
+ svn_path_url_add_component2(repos_root_url, relpath, result_pool),
+ result_pool);
+}
+
+svn_error_t *
+svn_client__pathrev_create_with_session(svn_client__pathrev_t **pathrev_p,
+ svn_ra_session_t *ra_session,
+ svn_revnum_t rev,
+ const char *url,
+ apr_pool_t *result_pool)
+{
+ svn_client__pathrev_t *pathrev = apr_palloc(result_pool, sizeof(*pathrev));
+
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &pathrev->repos_root_url,
+ result_pool));
+ SVN_ERR(svn_ra_get_uuid2(ra_session, &pathrev->repos_uuid, result_pool));
+ pathrev->rev = rev;
+ pathrev->url = url;
+ *pathrev_p = pathrev;
+ return SVN_NO_ERROR;
+}
+
+svn_client__pathrev_t *
+svn_client__pathrev_dup(const svn_client__pathrev_t *loc,
+ apr_pool_t *result_pool)
+{
+ return svn_client__pathrev_create(loc->repos_root_url, loc->repos_uuid,
+ loc->rev, loc->url, result_pool);
+}
+
+const char *
+svn_client__pathrev_relpath(const svn_client__pathrev_t *pathrev,
+ apr_pool_t *result_pool)
+{
+ return svn_uri_skip_ancestor(pathrev->repos_root_url, pathrev->url,
+ result_pool);
+}
+
svn_client_commit_item3_t *
svn_client_commit_item3_create(apr_pool_t *pool)
{
Modified: subversion/branches/master-passphrase/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_delta/compat.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_delta/compat.c Tue Apr 3 19:16:59 2012
@@ -31,6 +31,8 @@
#include "svn_props.h"
#include "svn_pools.h"
+#include "svn_private_config.h"
+
struct file_rev_handler_wrapper_baton {
void *baton;
@@ -1525,8 +1527,6 @@ alter_symlink_cb(void *baton,
const char *target,
apr_pool_t *scratch_pool)
{
- struct editor_baton *eb = baton;
-
/* ### should we verify the kind is truly a symlink? */
/* ### do something */
@@ -1586,8 +1586,6 @@ move_cb(void *baton,
svn_revnum_t replaces_rev,
apr_pool_t *scratch_pool)
{
- struct editor_baton *eb = baton;
-
return SVN_NO_ERROR;
}
@@ -1598,8 +1596,6 @@ rotate_cb(void *baton,
const apr_array_header_t *revisions,
apr_pool_t *scratch_pool)
{
- struct editor_baton *eb = baton;
-
return SVN_NO_ERROR;
}
@@ -2012,9 +2008,9 @@ svn_delta_shim_callbacks_default(apr_poo
return shim_callbacks;
}
-/* Uncomment below to add editor shims throughout Subversion. In it's
- * current state, that will likely break The World. */
-/* #define ENABLE_EDITOR_SHIMS*/
+/* To enable editor shims throughout Subversion, ENABLE_EV2_SHIMS should be
+ * defined. This can be done manually, or by providing `--enable-ev2-shims'
+ * to `configure'. */
svn_error_t *
svn_editor__insert_shims(const svn_delta_editor_t **deditor_out,
@@ -2025,7 +2021,7 @@ svn_editor__insert_shims(const svn_delta
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
-#ifndef ENABLE_EDITOR_SHIMS
+#ifndef ENABLE_EV2_SHIMS
/* Shims disabled, just copy the editor and baton directly. */
*deditor_out = deditor_in;
*dedit_baton_out = dedit_baton_in;
Modified: subversion/branches/master-passphrase/subversion/libsvn_delta/xdelta.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_delta/xdelta.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_delta/xdelta.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_delta/xdelta.c Tue Apr 3 19:16:59 2012
@@ -44,7 +44,7 @@
*/
#define MATCH_BLOCKSIZE 64
-/* "no" / "invalid" / "unused" value for positions within the detla windows
+/* "no" / "invalid" / "unused" value for positions within the delta windows
*/
#define NO_POSITION ((apr_uint32_t)-1)
@@ -112,7 +112,7 @@ struct block
struct blocks
{
/* The largest valid index of slots. */
- apr_uint32_t max;
+ apr_size_t max;
/* Source buffer that the positions in SLOTS refer to. */
const char* data;
/* The vector of blocks. A pos value of NO_POSITION represents an unused
@@ -135,7 +135,7 @@ static apr_uint32_t hash_func(apr_uint32
data into the table BLOCKS. Ignore true duplicates, i.e. blocks with
actually the same content. */
static void
-add_block(struct blocks *blocks, apr_uint32_t adlersum, apr_uint32_t pos)
+add_block(struct blocks *blocks, apr_uint32_t adlersum, apr_size_t pos)
{
apr_uint32_t h = hash_func(adlersum) & blocks->max;
@@ -384,9 +384,9 @@ store_delta_trailer(svn_txdelta__ops_bat
static void
compute_delta(svn_txdelta__ops_baton_t *build_baton,
const char *a,
- apr_uint32_t asize,
+ apr_size_t asize,
const char *b,
- apr_uint32_t bsize,
+ apr_size_t bsize,
apr_pool_t *pool)
{
struct blocks blocks;
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.h?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs/fs-loader.h Tue Apr 3 19:16:59 2012
@@ -333,6 +333,7 @@ typedef struct root_vtable_t
svn_fs_root_t *ancestor_root,
const char *ancestor_path,
apr_pool_t *pool);
+ /* Mergeinfo. */
svn_error_t *(*get_mergeinfo)(svn_mergeinfo_catalog_t *catalog,
svn_fs_root_t *root,
const apr_array_header_t *paths,
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.c Tue Apr 3 19:16:59 2012
@@ -70,6 +70,9 @@ struct dag_node_t
things for you. */
node_revision_t *node_revision;
+ /* The pool to allocate NODE_REVISION in. */
+ apr_pool_t *node_pool;
+
/* the path at which this node was created. */
const char *created_path;
};
@@ -139,7 +142,7 @@ copy_node_revision(node_revision_t *node
/* Set *NODEREV_P to the cached node-revision for NODE.
If the node-revision was not already cached in NODE, read it in,
- allocating the cache in POOL.
+ allocating the cache in NODE->NODE_POOL.
If you plan to change the contents of NODE, be careful! We're
handing you a pointer directly to our cached node-revision, not
@@ -150,8 +153,7 @@ copy_node_revision(node_revision_t *node
the structure at all. */
static svn_error_t *
get_node_revision(node_revision_t **noderev_p,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
@@ -159,7 +161,7 @@ get_node_revision(node_revision_t **node
if (! node->node_revision)
{
SVN_ERR(svn_fs_fs__get_node_revision(&noderev, node->fs,
- node->id, pool));
+ node->id, node->node_pool));
node->node_revision = noderev;
}
@@ -190,7 +192,8 @@ svn_fs_fs__dag_get_node(dag_node_t **nod
new_node->id = svn_fs_fs__id_copy(id, pool);
/* Grab the contents so we can inspect the node's kind and created path. */
- SVN_ERR(get_node_revision(&noderev, new_node, pool));
+ new_node->node_pool = pool;
+ SVN_ERR(get_node_revision(&noderev, new_node));
/* Initialize the KIND and CREATED_PATH attributes */
new_node->kind = noderev->kind;
@@ -227,12 +230,11 @@ svn_fs_fs__dag_get_revision(svn_revnum_t
svn_error_t *
svn_fs_fs__dag_get_predecessor_id(const svn_fs_id_t **id_p,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*id_p = noderev->predecessor_id;
return SVN_NO_ERROR;
}
@@ -240,44 +242,40 @@ svn_fs_fs__dag_get_predecessor_id(const
svn_error_t *
svn_fs_fs__dag_get_predecessor_count(int *count,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*count = noderev->predecessor_count;
return SVN_NO_ERROR;
}
svn_error_t *
svn_fs_fs__dag_get_mergeinfo_count(apr_int64_t *count,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*count = noderev->mergeinfo_count;
return SVN_NO_ERROR;
}
svn_error_t *
svn_fs_fs__dag_has_mergeinfo(svn_boolean_t *has_mergeinfo,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*has_mergeinfo = noderev->has_mergeinfo;
return SVN_NO_ERROR;
}
svn_error_t *
svn_fs_fs__dag_has_descendants_with_mergeinfo(svn_boolean_t *do_they,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
@@ -287,7 +285,7 @@ svn_fs_fs__dag_has_descendants_with_merg
return SVN_NO_ERROR;
}
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
if (noderev->mergeinfo_count > 1)
*do_they = TRUE;
else if (noderev->mergeinfo_count == 1 && !noderev->has_mergeinfo)
@@ -309,15 +307,13 @@ static svn_error_t *
dir_entry_id_from_node(const svn_fs_id_t **id_p,
dag_node_t *parent,
const char *name,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_fs_dirent_t *dirent;
- apr_pool_t *subpool = svn_pool_create(pool);
- SVN_ERR(svn_fs_fs__dag_dir_entry(&dirent, parent, name, subpool, pool));
- *id_p = dirent ? svn_fs_fs__id_copy(dirent->id, pool) : NULL;
-
- svn_pool_destroy(subpool);
+ SVN_ERR(svn_fs_fs__dag_dir_entry(&dirent, parent, name, scratch_pool));
+ *id_p = dirent ? svn_fs_fs__id_copy(dirent->id, result_pool) : NULL;
return SVN_NO_ERROR;
}
@@ -342,7 +338,7 @@ set_entry(dag_node_t *parent,
node_revision_t *parent_noderev;
/* Get the parent's node-revision. */
- SVN_ERR(get_node_revision(&parent_noderev, parent, pool));
+ SVN_ERR(get_node_revision(&parent_noderev, parent));
/* Set the new entry. */
return svn_fs_fs__set_entry(parent->fs, txn_id, parent_noderev, name, id,
@@ -355,7 +351,7 @@ set_entry(dag_node_t *parent,
will be a file. The new node will be allocated in POOL. PARENT
must be mutable, and must not have an entry named NAME.
- Use POOL for all allocations including caching the node_revision in PARENT.
+ Use POOL for all allocations, except caching the node_revision in PARENT.
*/
static svn_error_t *
make_entry(dag_node_t **child_p,
@@ -392,7 +388,7 @@ make_entry(dag_node_t **child_p,
new_noderev.kind = is_dir ? svn_node_dir : svn_node_file;
new_noderev.created_path = svn_fspath__join(parent_path, name, pool);
- SVN_ERR(get_node_revision(&parent_noderev, parent, pool));
+ SVN_ERR(get_node_revision(&parent_noderev, parent));
new_noderev.copyroot_path = apr_pstrdup(pool,
parent_noderev->copyroot_path);
new_noderev.copyroot_rev = parent_noderev->copyroot_rev;
@@ -419,12 +415,11 @@ make_entry(dag_node_t **child_p,
svn_error_t *
svn_fs_fs__dag_dir_entries(apr_hash_t **entries,
dag_node_t *node,
- apr_pool_t *pool,
- apr_pool_t *node_pool)
+ apr_pool_t *pool)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, node_pool));
+ SVN_ERR(get_node_revision(&noderev, node));
if (noderev->kind != svn_node_dir)
return svn_error_create(SVN_ERR_FS_NOT_DIRECTORY, NULL,
@@ -437,11 +432,10 @@ svn_error_t *
svn_fs_fs__dag_dir_entry(svn_fs_dirent_t **dirent,
dag_node_t *node,
const char* name,
- apr_pool_t *pool,
- apr_pool_t *node_pool)
+ apr_pool_t *pool)
{
node_revision_t *noderev;
- SVN_ERR(get_node_revision(&noderev, node, node_pool));
+ SVN_ERR(get_node_revision(&noderev, node));
if (noderev->kind != svn_node_dir)
return svn_error_create(SVN_ERR_FS_NOT_DIRECTORY, NULL,
@@ -488,7 +482,7 @@ svn_fs_fs__dag_get_proplist(apr_hash_t *
node_revision_t *noderev;
apr_hash_t *proplist = NULL;
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
SVN_ERR(svn_fs_fs__get_proplist(&proplist, node->fs,
noderev, pool));
@@ -517,7 +511,7 @@ svn_fs_fs__dag_set_proplist(dag_node_t *
}
/* Go get a fresh NODE-REVISION for this node. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
/* Set the new proplist. */
return svn_fs_fs__set_proplist(node->fs, noderev, proplist, pool);
@@ -545,7 +539,7 @@ svn_fs_fs__dag_increment_mergeinfo_count
return SVN_NO_ERROR;
/* Go get a fresh NODE-REVISION for this node. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
noderev->mergeinfo_count += increment;
if (noderev->mergeinfo_count < 0)
@@ -594,7 +588,7 @@ svn_fs_fs__dag_set_has_mergeinfo(dag_nod
}
/* Go get a fresh NODE-REVISION for this node. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
noderev->has_mergeinfo = has_mergeinfo;
@@ -658,6 +652,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
dag_node_t *cur_entry; /* parent's current entry named NAME */
const svn_fs_id_t *new_node_id; /* node id we'll put into NEW_NODE */
svn_fs_t *fs = svn_fs_fs__dag_get_fs(parent);
+ apr_pool_t *subpool = svn_pool_create(pool);
/* First check that the parent is mutable. */
if (! svn_fs_fs__dag_check_mutable(parent))
@@ -672,7 +667,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
"Attempted to make a child clone with an illegal name '%s'", name);
/* Find the node named NAME in PARENT's entries list if it exists. */
- SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool));
+ SVN_ERR(svn_fs_fs__dag_open(&cur_entry, parent, name, pool, subpool));
/* Check for mutability in the node we found. If it's mutable, we
don't need to clone it. */
@@ -686,11 +681,11 @@ svn_fs_fs__dag_clone_child(dag_node_t **
node_revision_t *noderev, *parent_noderev;
/* Go get a fresh NODE-REVISION for current child node. */
- SVN_ERR(get_node_revision(&noderev, cur_entry, pool));
+ SVN_ERR(get_node_revision(&noderev, cur_entry));
if (is_parent_copyroot)
{
- SVN_ERR(get_node_revision(&parent_noderev, parent, pool));
+ SVN_ERR(get_node_revision(&parent_noderev, parent));
noderev->copyroot_rev = parent_noderev->copyroot_rev;
noderev->copyroot_path = apr_pstrdup(pool,
parent_noderev->copyroot_path);
@@ -714,6 +709,7 @@ svn_fs_fs__dag_clone_child(dag_node_t **
}
/* Initialize the youngster. */
+ svn_pool_destroy(subpool);
return svn_fs_fs__dag_get_node(child_p, fs, new_node_id, pool);
}
@@ -778,7 +774,7 @@ svn_fs_fs__dag_delete(dag_node_t *parent
"Attempted to delete a node with an illegal name '%s'", name);
/* Get a fresh NODE-REVISION for the parent node. */
- SVN_ERR(get_node_revision(&parent_noderev, parent, pool));
+ SVN_ERR(get_node_revision(&parent_noderev, parent));
subpool = svn_pool_create(pool);
@@ -851,7 +847,7 @@ svn_fs_fs__dag_delete_if_mutable(svn_fs_
apr_hash_index_t *hi;
/* Loop over hash entries */
- SVN_ERR(svn_fs_fs__dag_dir_entries(&entries, node, pool, pool));
+ SVN_ERR(svn_fs_fs__dag_dir_entries(&entries, node, pool));
if (entries)
{
for (hi = apr_hash_first(pool, entries);
@@ -912,7 +908,7 @@ svn_fs_fs__dag_get_contents(svn_stream_t
"Attempted to get textual contents of a *non*-file node");
/* Go get a fresh node-revision for FILE. */
- SVN_ERR(get_node_revision(&noderev, file, pool));
+ SVN_ERR(get_node_revision(&noderev, file));
/* Get a stream to the contents. */
SVN_ERR(svn_fs_fs__get_contents(&contents, file->fs,
@@ -942,10 +938,10 @@ svn_fs_fs__dag_get_file_delta_stream(svn
/* Go get fresh node-revisions for the nodes. */
if (source)
- SVN_ERR(get_node_revision(&src_noderev, source, pool));
+ SVN_ERR(get_node_revision(&src_noderev, source));
else
src_noderev = NULL;
- SVN_ERR(get_node_revision(&tgt_noderev, target, pool));
+ SVN_ERR(get_node_revision(&tgt_noderev, target));
/* Get the delta stream. */
return svn_fs_fs__get_file_delta_stream(stream_p, target->fs,
@@ -967,7 +963,7 @@ svn_fs_fs__dag_file_length(svn_filesize_
"Attempted to get length of a *non*-file node");
/* Go get a fresh node-revision for FILE, and . */
- SVN_ERR(get_node_revision(&noderev, file, pool));
+ SVN_ERR(get_node_revision(&noderev, file));
return svn_fs_fs__file_length(length, noderev, pool);
}
@@ -986,7 +982,7 @@ svn_fs_fs__dag_file_checksum(svn_checksu
(SVN_ERR_FS_NOT_FILE, NULL,
"Attempted to get checksum of a *non*-file node");
- SVN_ERR(get_node_revision(&noderev, file, pool));
+ SVN_ERR(get_node_revision(&noderev, file));
return svn_fs_fs__file_checksum(checksum, noderev, kind, pool);
}
@@ -1013,7 +1009,7 @@ svn_fs_fs__dag_get_edit_stream(svn_strea
"Attempted to set textual contents of an immutable node");
/* Get the node revision. */
- SVN_ERR(get_node_revision(&noderev, file, pool));
+ SVN_ERR(get_node_revision(&noderev, file));
SVN_ERR(svn_fs_fs__set_contents(&ws, file->fs, noderev, pool));
@@ -1066,11 +1062,13 @@ svn_fs_fs__dag_dup(const dag_node_t *nod
new_node->node_revision->is_fresh_txn_root =
node->node_revision->is_fresh_txn_root;
}
+ new_node->node_pool = pool;
+
return new_node;
}
svn_error_t *
-svn_fs_fs__dag_serialize(char **data,
+svn_fs_fs__dag_serialize(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool)
@@ -1092,6 +1090,10 @@ svn_fs_fs__dag_serialize(char **data,
svn_temp_serializer__set_null(context,
(const void * const *)&node->node_revision);
+ /* The deserializer will use its own pool. */
+ svn_temp_serializer__set_null(context,
+ (const void * const *)&node->node_pool);
+
/* serialize other sub-structures */
svn_fs_fs__id_serialize(context, (const svn_fs_id_t **)&node->id);
svn_fs_fs__id_serialize(context, &node->fresh_root_predecessor_id);
@@ -1107,7 +1109,7 @@ svn_fs_fs__dag_serialize(char **data,
svn_error_t *
svn_fs_fs__dag_deserialize(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool)
{
@@ -1124,6 +1126,7 @@ svn_fs_fs__dag_deserialize(void **out,
svn_fs_fs__id_deserialize(node,
(svn_fs_id_t **)&node->fresh_root_predecessor_id);
svn_fs_fs__noderev_deserialize(node, &node->node_revision);
+ node->node_pool = pool;
svn_temp_deserializer__resolve(node, (void**)&node->created_path);
@@ -1137,12 +1140,14 @@ svn_error_t *
svn_fs_fs__dag_open(dag_node_t **child_p,
dag_node_t *parent,
const char *name,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
const svn_fs_id_t *node_id;
/* Ensure that NAME exists in PARENT's entry list. */
- SVN_ERR(dir_entry_id_from_node(&node_id, parent, name, pool));
+ SVN_ERR(dir_entry_id_from_node(&node_id, parent, name,
+ scratch_pool, scratch_pool));
if (! node_id)
return svn_error_createf
(SVN_ERR_FS_NOT_FOUND, NULL,
@@ -1156,7 +1161,7 @@ svn_fs_fs__dag_open(dag_node_t **child_p
/* Now get the node that was requested. */
return svn_fs_fs__dag_get_node(child_p, svn_fs_fs__dag_get_fs(parent),
- node_id, pool);
+ node_id, result_pool);
}
@@ -1180,7 +1185,7 @@ svn_fs_fs__dag_copy(dag_node_t *to_node,
svn_fs_t *fs = svn_fs_fs__dag_get_fs(from_node);
/* Make a copy of the original node revision. */
- SVN_ERR(get_node_revision(&from_noderev, from_node, pool));
+ SVN_ERR(get_node_revision(&from_noderev, from_node));
to_noderev = copy_node_revision(from_noderev, pool);
/* Reserve a copy ID for this new copy. */
@@ -1222,8 +1227,7 @@ svn_error_t *
svn_fs_fs__dag_things_different(svn_boolean_t *props_changed,
svn_boolean_t *contents_changed,
dag_node_t *node1,
- dag_node_t *node2,
- apr_pool_t *pool)
+ dag_node_t *node2)
{
node_revision_t *noderev1, *noderev2;
@@ -1233,8 +1237,8 @@ svn_fs_fs__dag_things_different(svn_bool
return SVN_NO_ERROR;
/* The node revision skels for these two nodes. */
- SVN_ERR(get_node_revision(&noderev1, node1, pool));
- SVN_ERR(get_node_revision(&noderev2, node2, pool));
+ SVN_ERR(get_node_revision(&noderev1, node1));
+ SVN_ERR(get_node_revision(&noderev2, node2));
/* Compare property keys. */
if (props_changed != NULL)
@@ -1253,13 +1257,12 @@ svn_fs_fs__dag_things_different(svn_bool
svn_error_t *
svn_fs_fs__dag_get_copyroot(svn_revnum_t *rev,
const char **path,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
/* Go get a fresh node-revision for NODE. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*rev = noderev->copyroot_rev;
*path = noderev->copyroot_path;
@@ -1269,13 +1272,12 @@ svn_fs_fs__dag_get_copyroot(svn_revnum_t
svn_error_t *
svn_fs_fs__dag_get_copyfrom_rev(svn_revnum_t *rev,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
/* Go get a fresh node-revision for NODE. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*rev = noderev->copyfrom_rev;
@@ -1284,13 +1286,12 @@ svn_fs_fs__dag_get_copyfrom_rev(svn_revn
svn_error_t *
svn_fs_fs__dag_get_copyfrom_path(const char **path,
- dag_node_t *node,
- apr_pool_t *pool)
+ dag_node_t *node)
{
node_revision_t *noderev;
/* Go get a fresh node-revision for NODE. */
- SVN_ERR(get_node_revision(&noderev, node, pool));
+ SVN_ERR(get_node_revision(&noderev, node));
*path = noderev->copyfrom_path;
@@ -1309,8 +1310,8 @@ svn_fs_fs__dag_update_ancestry(dag_node_
(SVN_ERR_FS_NOT_MUTABLE, NULL,
_("Attempted to update ancestry of non-mutable node"));
- SVN_ERR(get_node_revision(&source_noderev, source, pool));
- SVN_ERR(get_node_revision(&target_noderev, target, pool));
+ SVN_ERR(get_node_revision(&source_noderev, source));
+ SVN_ERR(get_node_revision(&target_noderev, target));
target_noderev->predecessor_id = source->id;
target_noderev->predecessor_count = source_noderev->predecessor_count;
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.h?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_fs/dag.h Tue Apr 3 19:16:59 2012
@@ -81,7 +81,7 @@ svn_fs_fs__dag_dup(const dag_node_t *nod
/* Serialize a DAG node, except don't try to preserve the 'fs' member.
Implements svn_cache__serialize_func_t */
svn_error_t *
-svn_fs_fs__dag_serialize(char **data,
+svn_fs_fs__dag_serialize(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool);
@@ -90,7 +90,7 @@ svn_fs_fs__dag_serialize(char **data,
Implements svn_cache__deserialize_func_t */
svn_error_t *
svn_fs_fs__dag_deserialize(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool);
@@ -121,58 +121,39 @@ const char *svn_fs_fs__dag_get_created_p
/* Set *ID_P to the node revision ID of NODE's immediate predecessor,
- or NULL if NODE has no predecessor, allocating from POOL.
-
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ or NULL if NODE has no predecessor.
*/
svn_error_t *svn_fs_fs__dag_get_predecessor_id(const svn_fs_id_t **id_p,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *COUNT to the number of predecessors NODE has (recursively), or
- -1 if not known, allocating from POOL.
-
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ -1 if not known.
*/
+/* ### This function is currently only used by 'verify'. */
svn_error_t *svn_fs_fs__dag_get_predecessor_count(int *count,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *COUNT to the number of node under NODE (inclusive) with
- svn:mergeinfo properties, allocating from POOL.
-
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ svn:mergeinfo properties.
*/
svn_error_t *svn_fs_fs__dag_get_mergeinfo_count(apr_int64_t *count,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *DO_THEY to a flag indicating whether or not NODE is a
directory with at least one descendant (not including itself) with
svn:mergeinfo.
-
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
*/
svn_error_t *
svn_fs_fs__dag_has_descendants_with_mergeinfo(svn_boolean_t *do_they,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *HAS_MERGEINFO to a flag indicating whether or not NODE itself
has svn:mergeinfo set on it.
-
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
*/
svn_error_t *
svn_fs_fs__dag_has_mergeinfo(svn_boolean_t *has_mergeinfo,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Return non-zero IFF NODE is currently mutable. */
svn_boolean_t svn_fs_fs__dag_check_mutable(const dag_node_t *node);
@@ -188,8 +169,7 @@ svn_node_kind_t svn_fs_fs__dag_node_kind
If properties do not exist on NODE, *PROPLIST_P will be set to
NULL.
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_get_proplist(apr_hash_t **proplist_p,
dag_node_t *node,
@@ -198,8 +178,7 @@ svn_error_t *svn_fs_fs__dag_get_proplist
/* Set the property list of NODE to PROPLIST, allocating from POOL.
The node being changed must be mutable.
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_set_proplist(dag_node_t *node,
apr_hash_t *proplist,
@@ -208,8 +187,7 @@ svn_error_t *svn_fs_fs__dag_set_proplist
/* Increment the mergeinfo_count field on NODE by INCREMENT. The node
being changed must be mutable.
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_increment_mergeinfo_count(dag_node_t *node,
apr_int64_t increment,
@@ -218,8 +196,7 @@ svn_error_t *svn_fs_fs__dag_increment_me
/* Set the has-mergeinfo flag on NODE to HAS_MERGEINFO. The node
being changed must be mutable.
- Use POOL for all allocations, including to cache the node_revision in
- NODE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_set_has_mergeinfo(dag_node_t *node,
svn_boolean_t has_mergeinfo,
@@ -274,40 +251,35 @@ svn_error_t *svn_fs_fs__dag_clone_root(d
/* Open the node named NAME in the directory PARENT. Set *CHILD_P to
- the new node, allocated in POOL. NAME must be a single path
+ the new node, allocated in RESULT_POOL. NAME must be a single path
component; it cannot be a slash-separated directory path.
-
- Use POOL for all allocations, including to cache the node_revision in
- PARENT.
*/
-svn_error_t *svn_fs_fs__dag_open(dag_node_t **child_p,
- dag_node_t *parent,
- const char *name,
- apr_pool_t *pool);
+svn_error_t *
+svn_fs_fs__dag_open(dag_node_t **child_p,
+ dag_node_t *parent,
+ const char *name,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Set *ENTRIES_P to a hash table of NODE's entries. The keys of the
table are entry names, and the values are svn_fs_dirent_t's. The
returned table (and its keys and values) is allocated in POOL,
- which is also used for temporary allocations. NODE_POOL is used
- for any allocation of memory that needs to live as long as NODE
- lives. */
+ which is also used for temporary allocations. */
svn_error_t *svn_fs_fs__dag_dir_entries(apr_hash_t **entries_p,
dag_node_t *node,
- apr_pool_t *pool,
- apr_pool_t *node_pool);
+ apr_pool_t *pool);
/* Fetches the NODE's entries and returns a copy of the entry selected
by the key value given in NAME and set *DIRENT to a copy of that
entry. If such entry was found, the copy will be allocated in POOL.
- Otherwise, the *DIRENT will be set to NULL. NODE_POOL is used for
- any allocation of memory that needs to live as long as NODE lives.
+ Otherwise, the *DIRENT will be set to NULL.
*/
+/* ### This function is currently only called from dag.c. */
svn_error_t * svn_fs_fs__dag_dir_entry(svn_fs_dirent_t **dirent,
dag_node_t *node,
const char* name,
- apr_pool_t *pool,
- apr_pool_t *node_pool);
+ apr_pool_t *pool);
/* Set ENTRY_NAME in NODE to point to ID (with kind KIND), allocating
from POOL. NODE must be a mutable directory. ID can refer to a
@@ -343,8 +315,7 @@ svn_error_t *svn_fs_fs__dag_set_entry(da
TXN_ID is the Subversion transaction under which this occurs.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_clone_child(dag_node_t **child_p,
dag_node_t *parent,
@@ -366,8 +337,7 @@ svn_error_t *svn_fs_fs__dag_clone_child(
If return SVN_ERR_FS_NO_SUCH_ENTRY, then there is no entry NAME in
PARENT.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_delete(dag_node_t *parent,
const char *name,
@@ -408,8 +378,7 @@ svn_error_t *svn_fs_fs__dag_delete_if_mu
not currently have an entry named NAME. TXN_ID is the Subversion
transaction under which this occurs.
- Use POOL for all allocations, including to cache the node_revision in
- PARENT.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_make_dir(dag_node_t **child_p,
dag_node_t *parent,
@@ -428,8 +397,7 @@ svn_error_t *svn_fs_fs__dag_make_dir(dag
If FILE is not a file, return SVN_ERR_FS_NOT_FILE.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_get_contents(svn_stream_t **contents,
dag_node_t *file,
@@ -440,8 +408,7 @@ svn_error_t *svn_fs_fs__dag_get_contents
the contents of TARGET, allocated in POOL. If SOURCE is null, the empty
string will be used.
- Use POOL for all allocations, including to cache the node_revision in
- SOURCE and TARGET.
+ Use POOL for all allocations.
*/
svn_error_t *
svn_fs_fs__dag_get_file_delta_stream(svn_txdelta_stream_t **stream_p,
@@ -455,8 +422,7 @@ svn_fs_fs__dag_get_file_delta_stream(svn
Any previous edits on the file will be deleted, and a new edit
stream will be constructed.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_get_edit_stream(svn_stream_t **contents,
dag_node_t *file,
@@ -482,8 +448,7 @@ svn_error_t *svn_fs_fs__dag_finalize_edi
/* Set *LENGTH to the length of the contents of FILE.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_file_length(svn_filesize_t *length,
dag_node_t *file,
@@ -495,8 +460,7 @@ svn_error_t *svn_fs_fs__dag_file_length(
If no stored checksum is available, do not calculate the checksum,
just put NULL into CHECKSUM.
- Use POOL for all allocations, including to cache the node_revision in
- FILE.
+ Use POOL for all allocations.
*/
svn_error_t *
svn_fs_fs__dag_file_checksum(svn_checksum_t **checksum,
@@ -512,8 +476,7 @@ svn_fs_fs__dag_file_checksum(svn_checksu
canonicalized absolute path of the parent directory. TXN_ID is the
Subversion transaction under which this occurs.
- Use POOL for all allocations, including to cache the node_revision in
- PARENT.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_make_file(dag_node_t **child_p,
dag_node_t *parent,
@@ -538,8 +501,7 @@ svn_error_t *svn_fs_fs__dag_make_file(da
If PRESERVE_HISTORY is false, FROM_PATH and FROM_REV are ignored.
- Use POOL for all allocations, including to cache the node_revision in
- FROM_NODE.
+ Use POOL for all allocations.
*/
svn_error_t *svn_fs_fs__dag_copy(dag_node_t *to_node,
const char *entry,
@@ -569,39 +531,29 @@ svn_error_t *svn_fs_fs__dag_copy(dag_nod
may leave us with a slight chance of a false positive, though I
don't really see how that would happen in practice. Nevertheless,
it should probably be fixed.
-
- Use POOL for all allocations, including to cache the node_revision in NODE1
- and NODE2.
*/
svn_error_t *svn_fs_fs__dag_things_different(svn_boolean_t *props_changed,
svn_boolean_t *contents_changed,
dag_node_t *node1,
- dag_node_t *node2,
- apr_pool_t *pool);
+ dag_node_t *node2);
/* Set *REV and *PATH to the copyroot revision and path of node NODE, or
to SVN_INVALID_REVNUM and NULL if no copyroot exists.
- Use POOL for all allocations, including to cache the node_revision in NODE.
*/
svn_error_t *svn_fs_fs__dag_get_copyroot(svn_revnum_t *rev,
const char **path,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *REV to the copyfrom revision associated with NODE.
- Use POOL for all allocations, including to cache the node_revision in NODE.
*/
svn_error_t *svn_fs_fs__dag_get_copyfrom_rev(svn_revnum_t *rev,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Set *PATH to the copyfrom path associated with NODE.
- Use POOL for all allocations, including to cache the node_revision in NODE.
*/
svn_error_t *svn_fs_fs__dag_get_copyfrom_path(const char **path,
- dag_node_t *node,
- apr_pool_t *pool);
+ dag_node_t *node);
/* Update *TARGET so that SOURCE is it's predecessor.
*/
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_fs/fs_fs.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_fs/fs_fs.c Tue Apr 3 19:16:59 2012
@@ -2718,8 +2718,6 @@ set_revision_proplist(svn_fs_t *fs,
(Whereas the rev file should already exist at this point.) */
SVN_ERR(svn_fs_fs__path_rev_absolute(&perms_reference, fs, rev, pool));
SVN_ERR(move_into_place(tmp_path, final_path, perms_reference, pool));
-
- return SVN_NO_ERROR;
}
return SVN_NO_ERROR;
@@ -4361,7 +4359,7 @@ read_change(change_t **change_p,
/* Fetch all the changed path entries from FILE and store then in
*CHANGED_PATHS. Folding is done to remove redundant or unnecessary
- *data. Store a hash of paths to copyfrom revisions/paths in
+ *data. Store a hash of paths to copyfrom "REV PATH" strings in
COPYFROM_HASH if it is non-NULL. If PREFOLDED is true, assume that
the changed-path entries have already been folded (by
write_final_changed_path_info) and may be out of order, so we shouldn't
@@ -4369,7 +4367,7 @@ read_change(change_t **change_p,
allocations in POOL. */
static svn_error_t *
fetch_all_changes(apr_hash_t *changed_paths,
- apr_hash_t *copyfrom_hash,
+ apr_hash_t *copyfrom_cache,
apr_file_t *file,
svn_boolean_t prefolded,
apr_pool_t *pool)
@@ -4384,7 +4382,7 @@ fetch_all_changes(apr_hash_t *changed_pa
while (change)
{
- SVN_ERR(fold_change(changed_paths, change, copyfrom_hash));
+ SVN_ERR(fold_change(changed_paths, change, copyfrom_cache));
/* Now, if our change was a deletion or replacement, we have to
blow away any changes thus far on paths that are (or, were)
@@ -5004,6 +5002,7 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
apr_file_t *file;
svn_stream_t *out;
fs_fs_data_t *ffd = fs->fsap_data;
+ apr_pool_t *subpool = svn_pool_create(pool);
if (!rep || !rep->txn_id)
{
@@ -5011,7 +5010,8 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
{
apr_hash_t *entries;
- apr_pool_t *subpool = svn_pool_create(pool);
+
+ svn_pool_clear(subpool);
/* Before we can modify the directory, we need to dump its old
contents into a mutable representation file. */
@@ -5024,7 +5024,7 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
out = svn_stream_from_aprfile2(file, TRUE, pool);
SVN_ERR(svn_hash_write2(entries, out, SVN_HASH_TERMINATOR, subpool));
- svn_pool_destroy(subpool);
+ svn_pool_clear(subpool);
}
/* Mark the node-rev's data rep as mutable. */
@@ -5046,10 +5046,9 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
}
/* if we have a directory cache for this transaction, update it */
+ svn_pool_clear(subpool);
if (ffd->txn_dir_cache)
{
- apr_pool_t *subpool = svn_pool_create(pool);
-
/* build parameters: (name, new entry) pair */
const char *key =
svn_fs_fs__id_unparse(parent_noderev->id, subpool)->data;
@@ -5064,28 +5063,31 @@ svn_fs_fs__set_entry(svn_fs_t *fs,
}
/* actually update the cached directory (if cached) */
- SVN_ERR(svn_cache__set_partial(ffd->txn_dir_cache, key, svn_fs_fs__replace_dir_entry, &baton, subpool));
-
- svn_pool_destroy(subpool);
+ SVN_ERR(svn_cache__set_partial(ffd->txn_dir_cache, key,
+ svn_fs_fs__replace_dir_entry, &baton,
+ subpool));
}
+ svn_pool_clear(subpool);
/* Append an incremental hash entry for the entry change. */
if (id)
{
- const char *val = unparse_dir_entry(kind, id, pool);
+ const char *val = unparse_dir_entry(kind, id, subpool);
- SVN_ERR(svn_stream_printf(out, pool, "K %" APR_SIZE_T_FMT "\n%s\n"
+ SVN_ERR(svn_stream_printf(out, subpool, "K %" APR_SIZE_T_FMT "\n%s\n"
"V %" APR_SIZE_T_FMT "\n%s\n",
strlen(name), name,
strlen(val), val));
}
else
{
- SVN_ERR(svn_stream_printf(out, pool, "D %" APR_SIZE_T_FMT "\n%s\n",
+ SVN_ERR(svn_stream_printf(out, subpool, "D %" APR_SIZE_T_FMT "\n%s\n",
strlen(name), name));
}
- return svn_io_file_close(file, pool);
+ SVN_ERR(svn_io_file_close(file, subpool));
+ svn_pool_destroy(subpool);
+ return SVN_NO_ERROR;
}
/* Write a single change entry, path PATH, change CHANGE, and copyfrom
@@ -5909,7 +5911,7 @@ validate_root_noderev(svn_fs_t *fs,
This kind of corruption was seen on svn.apache.org (both on
the root noderev and on other fspaths' noderevs); see
- http://mid.gmane.org/20111002202833.GA12373@daniel3.local
+ issue #4129.
Normally (rev == root_noderev->predecessor_count), but here we
use a more roundabout check that should only trigger on new instances
@@ -7946,58 +7948,24 @@ svn_fs_fs__verify(svn_fs_t *fs,
start, end,
pool));
- /* Issue #4129: bogus pred-counts on the root node-rev. */
+ /* Issue #4129: bogus pred-counts and minfo-cnt's on the root node-rev
+ (and elsewhere). This code makes more thorough checks that the
+ commit-time checks in validate_root_noderev(). */
{
svn_revnum_t i;
- int predecessor_predecessor_count;
-
- /* Compute PREDECESSOR_PREDECESSOR_COUNT. */
- if (start == 0)
- /* The value that passes the if() at the end of the loop. */
- predecessor_predecessor_count = -1;
- else
- {
- svn_fs_id_t *root_id;
- node_revision_t *root_noderev;
- SVN_ERR(svn_fs_fs__rev_get_root(&root_id, fs, start-1, iterpool));
- SVN_ERR(svn_fs_fs__get_node_revision(&root_noderev, fs, root_id,
- iterpool));
- predecessor_predecessor_count = root_noderev->predecessor_count;
- }
-
for (i = start; i <= end; i++)
{
- /* ### Caching.
-
- svn_fs_fs__rev_get_root() consults caches, which in verify we
- don't want. But we can't easily bypass that, as
- svn_fs_revision_root()+svn_fs_node_id()'s implementation uses
- svn_fs_fs__rev_get_root() too.
-
- ### A future revision will make fs_verify() disable caches when it
- ### opens ffd.
- */
- svn_fs_id_t *root_id;
- node_revision_t *root_noderev;
+ svn_fs_root_t *root;
- if ((i % 128) == 0) /* uneducated guess */
- svn_pool_clear(iterpool);
-
- /* Fetch ROOT_NODEREV. */
- SVN_ERR(svn_fs_fs__rev_get_root(&root_id, fs, i, iterpool));
- SVN_ERR(svn_fs_fs__get_node_revision(&root_noderev, fs, root_id,
- iterpool));
-
- /* Check correctness. (Compare validate_root_noderev().) */
- if (1+predecessor_predecessor_count != root_noderev->predecessor_count)
- return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- _("predecessor count for "
- "the root node-revision is wrong: "
- "r%ld has %d, but r%ld has %d"),
- i, root_noderev->predecessor_count,
- i-1, predecessor_predecessor_count);
+ svn_pool_clear(iterpool);
- predecessor_predecessor_count = root_noderev->predecessor_count;
+ /* ### TODO: Make sure caches are disabled.
+
+ When this code is called in the library, we want to ensure we
+ use the on-disk data --- rather than some data that was read
+ in the possibly-distance past and cached since. */
+ SVN_ERR(svn_fs_fs__revision_root(&root, fs, i, iterpool));
+ SVN_ERR(svn_fs_fs__verify_root(root, iterpool));
}
}
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.c?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.c Tue Apr 3 19:16:59 2012
@@ -489,7 +489,7 @@ serialize_txdeltawindow(svn_temp_seriali
}
svn_error_t *
-svn_fs_fs__serialize_txdelta_window(char **buffer,
+svn_fs_fs__serialize_txdelta_window(void **buffer,
apr_size_t *buffer_size,
void *item,
apr_pool_t *pool)
@@ -522,7 +522,7 @@ svn_fs_fs__serialize_txdelta_window(char
svn_error_t *
svn_fs_fs__deserialize_txdelta_window(void **item,
- char *buffer,
+ void *buffer,
apr_size_t buffer_size,
apr_pool_t *pool)
{
@@ -548,7 +548,7 @@ svn_fs_fs__deserialize_txdelta_window(vo
}
svn_error_t *
-svn_fs_fs__serialize_manifest(char **data,
+svn_fs_fs__serialize_manifest(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool)
@@ -564,7 +564,7 @@ svn_fs_fs__serialize_manifest(char **dat
svn_error_t *
svn_fs_fs__deserialize_manifest(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool)
{
@@ -637,7 +637,7 @@ serialize_svn_string_array(svn_temp_seri
}
svn_error_t *
-svn_fs_fs__serialize_properties(char **data,
+svn_fs_fs__serialize_properties(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool)
@@ -682,7 +682,7 @@ svn_fs_fs__serialize_properties(char **d
svn_error_t *
svn_fs_fs__deserialize_properties(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool)
{
@@ -716,7 +716,7 @@ svn_fs_fs__deserialize_properties(void *
}
svn_error_t *
-svn_fs_fs__serialize_id(char **data,
+svn_fs_fs__serialize_id(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool)
@@ -741,7 +741,7 @@ svn_fs_fs__serialize_id(char **data,
svn_error_t *
svn_fs_fs__deserialize_id(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool)
{
@@ -759,10 +759,10 @@ svn_fs_fs__deserialize_id(void **out,
/** Caching node_revision_t objects. **/
svn_error_t *
-svn_fs_fs__serialize_node_revision(char **buffer,
- apr_size_t *buffer_size,
- void *item,
- apr_pool_t *pool)
+svn_fs_fs__serialize_node_revision(void **buffer,
+ apr_size_t *buffer_size,
+ void *item,
+ apr_pool_t *pool)
{
svn_stringbuf_t *serialized;
node_revision_t *noderev = item;
@@ -784,7 +784,7 @@ svn_fs_fs__serialize_node_revision(char
svn_error_t *
svn_fs_fs__deserialize_node_revision(void **item,
- char *buffer,
+ void *buffer,
apr_size_t buffer_size,
apr_pool_t *pool)
{
@@ -803,7 +803,7 @@ svn_fs_fs__deserialize_node_revision(voi
* to DATA and DATA_LEN. */
static svn_error_t *
return_serialized_dir_context(svn_temp_serializer__context_t *context,
- char **data,
+ void **data,
apr_size_t *data_len)
{
svn_stringbuf_t *serialized = svn_temp_serializer__get(context);
@@ -816,7 +816,7 @@ return_serialized_dir_context(svn_temp_s
}
svn_error_t *
-svn_fs_fs__serialize_dir_entries(char **data,
+svn_fs_fs__serialize_dir_entries(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool)
@@ -832,7 +832,7 @@ svn_fs_fs__serialize_dir_entries(char **
svn_error_t *
svn_fs_fs__deserialize_dir_entries(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool)
{
@@ -847,7 +847,7 @@ svn_fs_fs__deserialize_dir_entries(void
svn_error_t *
svn_fs_fs__get_sharded_offset(void **out,
- const char *data,
+ const void *data,
apr_size_t data_len,
void *baton,
apr_pool_t *pool)
@@ -908,7 +908,7 @@ find_entry(svn_fs_dirent_t **entries,
svn_error_t *
svn_fs_fs__extract_dir_entry(void **out,
- const char *data,
+ const void *data,
apr_size_t data_len,
void *baton,
apr_pool_t *pool)
@@ -961,7 +961,7 @@ svn_fs_fs__extract_dir_entry(void **out,
* modification as a simply deserialize / modify / serialize sequence.
*/
static svn_error_t *
-slowly_replace_dir_entry(char **data,
+slowly_replace_dir_entry(void **data,
apr_size_t *data_len,
void *baton,
apr_pool_t *pool)
@@ -983,7 +983,7 @@ slowly_replace_dir_entry(char **data,
}
svn_error_t *
-svn_fs_fs__replace_dir_entry(char **data,
+svn_fs_fs__replace_dir_entry(void **data,
apr_size_t *data_len,
void *baton,
apr_pool_t *pool)
Modified: subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.h?rev=1309099&r1=1309098&r2=1309099&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_fs_fs/temp_serializer.h Tue Apr 3 19:16:59 2012
@@ -77,7 +77,7 @@ typedef struct
* #svn_fs_fs__txdelta_cached_window_t.
*/
svn_error_t *
-svn_fs_fs__serialize_txdelta_window(char **buffer,
+svn_fs_fs__serialize_txdelta_window(void **buffer,
apr_size_t *buffer_size,
void *item,
apr_pool_t *pool);
@@ -88,7 +88,7 @@ svn_fs_fs__serialize_txdelta_window(char
*/
svn_error_t *
svn_fs_fs__deserialize_txdelta_window(void **item,
- char *buffer,
+ void *buffer,
apr_size_t buffer_size,
apr_pool_t *pool);
@@ -97,7 +97,7 @@ svn_fs_fs__deserialize_txdelta_window(vo
* (@a in is an #apr_array_header_t of apr_off_t elements).
*/
svn_error_t *
-svn_fs_fs__serialize_manifest(char **data,
+svn_fs_fs__serialize_manifest(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool);
@@ -108,7 +108,7 @@ svn_fs_fs__serialize_manifest(char **dat
*/
svn_error_t *
svn_fs_fs__deserialize_manifest(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool);
@@ -117,7 +117,7 @@ svn_fs_fs__deserialize_manifest(void **o
* (@a in is an #apr_hash_t of svn_string_t elements, keyed by const char*).
*/
svn_error_t *
-svn_fs_fs__serialize_properties(char **data,
+svn_fs_fs__serialize_properties(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool);
@@ -128,7 +128,7 @@ svn_fs_fs__serialize_properties(char **d
*/
svn_error_t *
svn_fs_fs__deserialize_properties(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool);
@@ -136,7 +136,7 @@ svn_fs_fs__deserialize_properties(void *
* Implements #svn_cache__serialize_func_t for #svn_fs_id_t
*/
svn_error_t *
-svn_fs_fs__serialize_id(char **data,
+svn_fs_fs__serialize_id(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool);
@@ -146,7 +146,7 @@ svn_fs_fs__serialize_id(char **data,
*/
svn_error_t *
svn_fs_fs__deserialize_id(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool);
@@ -154,7 +154,7 @@ svn_fs_fs__deserialize_id(void **out,
* Implements #svn_cache__serialize_func_t for #node_revision_t
*/
svn_error_t *
-svn_fs_fs__serialize_node_revision(char **buffer,
+svn_fs_fs__serialize_node_revision(void **buffer,
apr_size_t *buffer_size,
void *item,
apr_pool_t *pool);
@@ -164,7 +164,7 @@ svn_fs_fs__serialize_node_revision(char
*/
svn_error_t *
svn_fs_fs__deserialize_node_revision(void **item,
- char *buffer,
+ void *buffer,
apr_size_t buffer_size,
apr_pool_t *pool);
@@ -172,7 +172,7 @@ svn_fs_fs__deserialize_node_revision(voi
* Implements #svn_cache__serialize_func_t for a directory contents hash
*/
svn_error_t *
-svn_fs_fs__serialize_dir_entries(char **data,
+svn_fs_fs__serialize_dir_entries(void **data,
apr_size_t *data_len,
void *in,
apr_pool_t *pool);
@@ -182,7 +182,7 @@ svn_fs_fs__serialize_dir_entries(char **
*/
svn_error_t *
svn_fs_fs__deserialize_dir_entries(void **out,
- char *data,
+ void *data,
apr_size_t data_len,
apr_pool_t *pool);
@@ -192,7 +192,7 @@ svn_fs_fs__deserialize_dir_entries(void
* serialized manifest array @a data and @a data_len. */
svn_error_t *
svn_fs_fs__get_sharded_offset(void **out,
- const char *data,
+ const void *data,
apr_size_t data_len,
void *baton,
apr_pool_t *pool);
@@ -204,7 +204,7 @@ svn_fs_fs__get_sharded_offset(void **out
*/
svn_error_t *
svn_fs_fs__extract_dir_entry(void **out,
- const char *data,
+ const void *data,
apr_size_t data_len,
void *baton,
apr_pool_t *pool);
@@ -230,7 +230,7 @@ typedef struct replace_baton_t
* identified by its name in the #replace_baton_t in @a baton.
*/
svn_error_t *
-svn_fs_fs__replace_dir_entry(char **data,
+svn_fs_fs__replace_dir_entry(void **data,
apr_size_t *data_len,
void *baton,
apr_pool_t *pool);