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/03/16 20:03:03 UTC
svn commit: r1667106 - in /subversion/trunk/subversion: include/svn_fs.h
libsvn_fs/fs-loader.c libsvn_fs/fs-loader.h
Author: stefan2
Date: Mon Mar 16 19:03:02 2015
New Revision: 1667106
URL: http://svn.apache.org/r1667106
Log:
Explicitly rename pools to scratch_pools for new 1.9 declarations in the
FS API after 1.9 review. Update the implementatation outside the actual
FS modules. No functional change intended.
* subversion/include/svn_fs.h
(svn_fs_upgrade_notify_t,
svn_fs_upgrade2,
svn_fs_hotcopy_notify_t,
svn_fs_node_relation,
svn_fs_props_different,
svn_fs_contents_different): The POOL is actually a mere SCRATCH_POOL.
* subversion/libsvn_fs/fs-loader.c
(svn_fs_upgrade2,
svn_fs_node_relation,
svn_fs_props_different,
svn_fs_contents_different): Reflect API pool name changes in the
implementation.
* subversion/libsvn_fs/fs-loader.h
(fs_library_vtable_t.upgrade_fs,
root_vtable_t.node_relation,
root_vtable_t.props_changed,
root_vtable_t.contents_changed): Do the same in our vtables.
Modified:
subversion/trunk/subversion/include/svn_fs.h
subversion/trunk/subversion/libsvn_fs/fs-loader.c
subversion/trunk/subversion/libsvn_fs/fs-loader.h
Modified: subversion/trunk/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1667106&r1=1667105&r2=1667106&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Mon Mar 16 19:03:02 2015
@@ -361,22 +361,22 @@ typedef enum svn_fs_upgrade_notify_actio
/** The type of an upgrade notification function. @a number is specifc
* to @a action (see #svn_fs_upgrade_notify_action_t); @a action is the
* type of action being performed. @a baton is the corresponding baton
- * for the notification function, and @a pool can be used for temporary
- * allocations, but will be cleared between invocations.
+ * for the notification function, and @a scratch_pool can be used for
+ * temporary allocations, but will be cleared between invocations.
*
* @since New in 1.9.
*/
typedef svn_error_t *(*svn_fs_upgrade_notify_t)(void *baton,
apr_uint64_t number,
svn_fs_upgrade_notify_action_t action,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/**
* Upgrade the Subversion filesystem located in the directory @a path
* to the latest version supported by this library. Return
* #SVN_ERR_FS_UNSUPPORTED_UPGRADE and make no changes to the
- * filesystem if the requested upgrade is not supported. Use @a pool
- * for necessary allocations.
+ * filesystem if the requested upgrade is not supported. Use
+ * @a scratch_pool for temporary allocations.
*
* The optional @a notify_func callback is only a general feedback that
* the operation is still in process but may be called in e.g. random shard
@@ -399,7 +399,7 @@ svn_fs_upgrade2(const char *path,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/**
* Like svn_fs_upgrade2 but with notify_func, notify_baton, cancel_func
@@ -486,13 +486,14 @@ svn_fs_delete_fs(const char *path,
/** The type of a hotcopy notification function. @a start_revision and
* @a end_revision indicate the copied revision range. @a baton is the
- * corresponding baton for the notification function, and @a pool can be
- * used for temporary allocations, but will be cleared between invocations.
+ * corresponding baton for the notification function, and @a scratch_pool
+ * can be used for temporary allocations, but will be cleared between
+ * invocations.
*/
typedef void (*svn_fs_hotcopy_notify_t)(void *baton,
svn_revnum_t start_revision,
svn_revnum_t end_revision,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/**
* Copy a possibly live Subversion filesystem from @a src_path to
@@ -1731,7 +1732,7 @@ svn_fs_node_id(const svn_fs_id_t **id_p,
* are related and return the result in @a relation. There is no restriction
* concerning the roots: They may refer to different repositories, be in
* arbitrary revision order and any of them may pertain to a transaction.
- * @a pool is used for temporary allocations.
+ * @a scratch_pool is used for temporary allocations.
*
* @note Paths from different svn_fs_t will be reported as unrelated even
* if the underlying physical repository is the same.
@@ -1744,7 +1745,7 @@ svn_fs_node_relation(svn_fs_node_relatio
const char *path_a,
svn_fs_root_t *root_b,
const char *path_b,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/** Set @a *revision to the revision in which @a path under @a root was
* created. Use @a pool for any temporary allocations. @a *revision will
@@ -1834,7 +1835,7 @@ svn_fs_change_node_prop(svn_fs_root_t *r
* differ from those at @a path2 under @a root2, or set it to #FALSE if they
* are the same. Both paths must exist under their respective roots, and
* both roots must be in the same filesystem.
- * Do any necessary temporary allocation in @a pool.
+ * Do any necessary temporary allocation in @a scratch_pool.
*
* @since New in 1.9.
*/
@@ -1844,7 +1845,7 @@ svn_fs_props_different(svn_boolean_t *di
const char *path1,
svn_fs_root_t *root2,
const char *path2,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/** Determine if the properties of two path/root combinations are different.
@@ -2389,7 +2390,7 @@ svn_fs_apply_text(svn_stream_t **content
* @a root1 differ from those at @a path2 under @a root2, or set it to
* #FALSE if they are the same. Both paths must exist under their
* respective roots, and both roots must be in the same filesystem.
- * Do any necessary temporary allocation in @a pool.
+ * Do any necessary temporary allocation in @a scratch_pool.
*
* @since New in 1.9.
*/
@@ -2399,7 +2400,7 @@ svn_fs_contents_different(svn_boolean_t
const char *path1,
svn_fs_root_t *root2,
const char *path2,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/** Check if the contents of two root/path combos have changed. In
* contrast to #svn_fs_contents_different, we only perform a quick test
Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1667106&r1=1667105&r2=1667106&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Mon Mar 16 19:03:02 2015
@@ -561,19 +561,19 @@ svn_fs_upgrade2(const char *path,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
fs_library_vtable_t *vtable;
svn_fs_t *fs;
- SVN_ERR(fs_library_vtable(&vtable, path, pool));
- fs = fs_new(NULL, pool);
+ SVN_ERR(fs_library_vtable(&vtable, path, scratch_pool));
+ fs = fs_new(NULL, scratch_pool);
SVN_ERR(vtable->upgrade_fs(fs, path,
notify_func, notify_baton,
cancel_func, cancel_baton,
common_pool_lock,
- pool, common_pool));
+ scratch_pool, common_pool));
return SVN_NO_ERROR;
}
@@ -1141,7 +1141,7 @@ svn_error_t *
svn_fs_node_relation(svn_fs_node_relation_t *relation,
svn_fs_root_t *root_a, const char *path_a,
svn_fs_root_t *root_b, const char *path_b,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
/* Different repository types? */
if (root_a->fs != root_b->fs)
@@ -1150,9 +1150,10 @@ svn_fs_node_relation(svn_fs_node_relatio
return SVN_NO_ERROR;
}
- return svn_error_trace(root_a->vtable->node_relation(relation, root_a,
- path_a, root_b,
- path_b, pool));
+ return svn_error_trace(root_a->vtable->node_relation(relation,
+ root_a, path_a,
+ root_b, path_b,
+ scratch_pool));
}
svn_error_t *
@@ -1207,12 +1208,12 @@ svn_fs_change_node_prop(svn_fs_root_t *r
svn_error_t *
svn_fs_props_different(svn_boolean_t *changed_p, svn_fs_root_t *root1,
const char *path1, svn_fs_root_t *root2,
- const char *path2, apr_pool_t *pool)
+ const char *path2, apr_pool_t *scratch_pool)
{
return svn_error_trace(root1->vtable->props_changed(changed_p,
root1, path1,
root2, path2,
- TRUE, pool));
+ TRUE, scratch_pool));
}
svn_error_t *
@@ -1484,12 +1485,13 @@ svn_fs_apply_text(svn_stream_t **content
svn_error_t *
svn_fs_contents_different(svn_boolean_t *changed_p, svn_fs_root_t *root1,
const char *path1, svn_fs_root_t *root2,
- const char *path2, apr_pool_t *pool)
+ const char *path2, apr_pool_t *scratch_pool)
{
return svn_error_trace(root1->vtable->contents_changed(changed_p,
root1, path1,
root2, path2,
- TRUE, pool));
+ TRUE,
+ scratch_pool));
}
svn_error_t *
Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1667106&r1=1667105&r2=1667106&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Mon Mar 16 19:03:02 2015
@@ -99,7 +99,7 @@ typedef struct fs_library_vtable_t
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_mutex__t *common_pool_lock,
- apr_pool_t *pool,
+ apr_pool_t *scratch_pool,
apr_pool_t *common_pool);
svn_error_t *(*verify_fs)(svn_fs_t *fs, const char *path,
svn_revnum_t start,
@@ -314,7 +314,7 @@ typedef struct root_vtable_t
svn_error_t *(*node_relation)(svn_fs_node_relation_t *relation,
svn_fs_root_t *root_a, const char *path_a,
svn_fs_root_t *root_b, const char *path_b,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
svn_error_t *(*node_created_rev)(svn_revnum_t *revision,
svn_fs_root_t *root, const char *path,
apr_pool_t *pool);
@@ -353,7 +353,7 @@ typedef struct root_vtable_t
svn_error_t *(*props_changed)(int *changed_p, svn_fs_root_t *root1,
const char *path1, svn_fs_root_t *root2,
const char *path2, svn_boolean_t strict,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/* Directories */
svn_error_t *(*dir_entries)(apr_hash_t **entries_p, svn_fs_root_t *root,
@@ -394,7 +394,7 @@ typedef struct root_vtable_t
svn_error_t *(*contents_changed)(int *changed_p, svn_fs_root_t *root1,
const char *path1, svn_fs_root_t *root2,
const char *path2, svn_boolean_t strict,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
svn_error_t *(*get_file_delta_stream)(svn_txdelta_stream_t **stream_p,
svn_fs_root_t *source_root,
const char *source_path,