You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/03/19 19:24:29 UTC
svn commit: r1667844 - in /subversion/branches/1.9.x: ./ STATUS
subversion/include/svn_repos.h subversion/libsvn_repos/repos.c
Author: svn-role
Date: Thu Mar 19 18:24:28 2015
New Revision: 1667844
URL: http://svn.apache.org/r1667844
Log:
Merge the r1665438 group from trunk:
* r1665438, r1667107
Fixes to the public Repos layer API declarations and documentation.
Justification:
Have a complete, correct and easily accessible API description.
None of these changes should affect generated code nor the ABI.
Votes:
+1: stefan2, julianfoad, rhuijben
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/subversion/include/svn_repos.h
subversion/branches/1.9.x/subversion/libsvn_repos/repos.c
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 19 18:24:28 2015
@@ -89,4 +89,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664997,1665164,1665195,1665437,1665611-1665612,1665845,1665850,1665852,1665886,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667106
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664997,1665164,1665195,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667106-1667107
Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1667844&r1=1667843&r2=1667844&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu Mar 19 18:24:28 2015
@@ -177,11 +177,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1665438, r1667107
- Fixes to the public Repos layer API declarations and documentation.
- Justification:
- Have a complete, correct and easily accessible API description.
- None of these changes should affect generated code nor the ABI.
- Votes:
- +1: stefan2, julianfoad, rhuijben
Modified: subversion/branches/1.9.x/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_repos.h?rev=1667844&r1=1667843&r2=1667844&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_repos.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_repos.h Thu Mar 19 18:24:28 2015
@@ -559,15 +559,18 @@ svn_repos_has_capability(svn_repos_t *re
apr_pool_t *pool);
/**
- * Return a set capabilities supported by the running Subversion library and by
- * @a repos. (Capabilities supported by this version of Subversion but not by
- * @a repos are not listed. This may happen when svn_repos_upgrade2() has not
- * been called after a software upgrade.)
+ * Return a set of @a capabilities supported by the running Subversion
+ * library and by @a repos. (Capabilities supported by this version of
+ * Subversion but not by @a repos are not listed. This may happen when
+ * svn_repos_upgrade2() has not been called after a software upgrade.)
*
- * The set is represented as a hash whose keys are the set members. The values
- * are not defined.
+ * The set is represented as a hash whose const char * keys are the set
+ * members. The values are not defined.
*
- * @see svn_repos_info_format()
+ * Allocate @a capabilities in @a result_pool and use @a scratch_pool for
+ * temporary allocations.
+ *
+ * @see svn_repos_info_format
*
* @since New in 1.9.
*/
@@ -626,12 +629,15 @@ svn_fs_t *
svn_repos_fs(svn_repos_t *repos);
/** Return the type of filesystem associated with repository object
- * @a repos allocated in @a pool.
+ * @a repos allocated in @a result_pool.
+ *
+ * @see #svn_fs_backend_names
*
* @since New in 1.9.
*/
const char *
-svn_repos_fs_type(svn_repos_t *repos, apr_pool_t *pool);
+svn_repos_fs_type(svn_repos_t *repos,
+ apr_pool_t *result_pool);
/** Make a hot copy of the Subversion repository found at @a src_path
* to @a dst_path.
@@ -650,10 +656,16 @@ svn_repos_fs_type(svn_repos_t *repos, ap
* called with the @a notify_baton and a notification structure containing
* appropriate values in @c start_revision and @c end_revision (both
* inclusive). @c start_revision might be equal to @c end_revision in
- * case the copied range consists of a single revision. Currently, this
- * notification is only supported for FSFS repositories. @a notify_func
+ * case the copied range consists of a single revision. Currently, this
+ * notification is not triggered by the BDB backend. @a notify_func
* may be @c NULL if this notification is not required.
*
+ * The optional @a cancel_func callback will be invoked with
+ * @a cancel_baton as usual to allow the user to preempt this potentially
+ * lengthy operation.
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
* @since New in 1.9.
*/
svn_error_t *
@@ -665,7 +677,7 @@ svn_repos_hotcopy3(const char *src_path,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/**
* Like svn_repos_hotcopy3(), but with @a notify_func and @a notify_baton
@@ -1523,19 +1535,19 @@ svn_repos_replay(svn_fs_root_t *root,
* after the commit has succeeded) @c close_edit will invoke
* @a commit_callback with a filled-in #svn_commit_info_t *, @a commit_baton,
* and @a pool or some subpool thereof as arguments. The @c repos_root field
- * of the #svn_commit_info_t is null. If @a commit_callback
+ * of the #svn_commit_info_t is @c NULL. If @a commit_callback
* returns an error, that error will be returned from @c close_edit,
* otherwise if there was a post-commit hook failure, then that error
* will be returned with code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.
- * (Note that prior to Subversion 1.6, @a commit_callback cannot be NULL; if
- * you don't need a callback, pass a dummy function.)
+ * (Note that prior to Subversion 1.6, @a commit_callback cannot be @c NULL;
+ * if you don't need a callback, pass a dummy function.)
*
* Calling @a (*editor)->abort_edit aborts the commit, and will also
* abort the commit transaction unless @a txn was supplied (not @c
* NULL). Callers who supply their own transactions are responsible
* for cleaning them up (either by committing them, or aborting them).
*
- * @since New in 1.5. Since 1.6, @a commit_callback can be null.
+ * @since New in 1.5. Since 1.6, @a commit_callback can be @c NULL.
*
* @note Yes, @a repos_url_decoded is a <em>decoded</em> URL. We realize
* that's sorta wonky. Sorry about that.
@@ -2083,7 +2095,7 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
* the revision range for @a include_merged_revision @c FALSE reporting by
* switching @a start with @a end.
*
- * @note Prior to Subversion 1.9, this function may accept delta handlers
+ * @note Prior to Subversion 1.9, this function may request delta handlers
* from @a handler even for empty text deltas. Starting with 1.9, the
* delta handler / baton return arguments passed to @a handler will be
* #NULL unless there is an actual difference in the file contents between
@@ -2269,6 +2281,8 @@ svn_repos_fs_begin_txn_for_update(svn_fs
* The lock and path passed to @a lock_callback will be allocated in
* @a result_pool. Use @a scratch_pool for temporary allocations.
*
+ * @see svn_fs_lock_many
+ *
* @since New in 1.9.
*/
svn_error_t *
@@ -2321,6 +2335,8 @@ svn_repos_fs_lock(svn_lock_t **lock,
* The path passed to @a lock_callback will be allocated in @a result_pool.
* Use @a scratch_pool for temporary allocations.
*
+ * @see svn_fs_unlock_many
+ *
* @since New in 1.9.
*/
svn_error_t *
@@ -2702,12 +2718,13 @@ svn_repos_node_from_baton(void *edit_bat
*
* Set @a *repos_format to the repository format number of @a repos, which is
* an integer that increases when incompatible changes are made (such as
- * by #svn_repos_upgrade).
+ * by #svn_repos_upgrade2).
*
- * Set @a *supports_version to the version number of the minimum Subversion GA
- * release that can read and write @a repos.
+ * Set @a *supports_version to the version number of the minimum Subversion
+ * GA release that can read and write @a repos; allocate it in
+ * @a result_pool. Use @a scratch_pool for temporary allocations.
*
- * @see svn_fs_info_format(), svn_repos_capabilities()
+ * @see svn_fs_info_format, svn_repos_capabilities
*
* @since New in 1.9.
*/
Modified: subversion/branches/1.9.x/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/repos.c?rev=1667844&r1=1667843&r2=1667844&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/repos.c Thu Mar 19 18:24:28 2015
@@ -1635,9 +1635,10 @@ svn_repos_fs(svn_repos_t *repos)
}
const char *
-svn_repos_fs_type(svn_repos_t *repos, apr_pool_t *pool)
+svn_repos_fs_type(svn_repos_t *repos,
+ apr_pool_t *result_pool)
{
- return apr_pstrdup(pool, repos->fs_type);
+ return apr_pstrdup(result_pool, repos->fs_type);
}
/* For historical reasons, for the Berkeley DB backend, this code uses
@@ -1957,7 +1958,7 @@ svn_repos_hotcopy3(const char *src_path,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
svn_fs_hotcopy_notify_t fs_notify_func;
struct fs_hotcopy_notify_baton_t fs_notify_baton;
@@ -1968,8 +1969,8 @@ svn_repos_hotcopy3(const char *src_path,
svn_repos_t *dst_repos;
svn_error_t *err;
- SVN_ERR(svn_dirent_get_absolute(&src_abspath, src_path, pool));
- SVN_ERR(svn_dirent_get_absolute(&dst_abspath, dst_path, pool));
+ SVN_ERR(svn_dirent_get_absolute(&src_abspath, src_path, scratch_pool));
+ SVN_ERR(svn_dirent_get_absolute(&dst_abspath, dst_path, scratch_pool));
if (strcmp(src_abspath, dst_abspath) == 0)
return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
_("Hotcopy source and destination are equal"));
@@ -1979,7 +1980,7 @@ svn_repos_hotcopy3(const char *src_path,
FALSE, FALSE,
FALSE, /* don't try to open the db yet. */
NULL,
- pool, pool));
+ scratch_pool, scratch_pool));
/* If we are going to clean logs, then get an exclusive lock on
db-logs.lock, to ensure that no one else will work with logs.
@@ -1987,7 +1988,7 @@ svn_repos_hotcopy3(const char *src_path,
If we are just copying, then get a shared lock to ensure that
no one else will clean logs while we copying them */
- SVN_ERR(lock_db_logs_file(src_repos, clean_logs, pool));
+ SVN_ERR(lock_db_logs_file(src_repos, clean_logs, scratch_pool));
/* Copy the repository to a new path, with exception of
specially handled directories */
@@ -2001,16 +2002,16 @@ svn_repos_hotcopy3(const char *src_path,
0,
hotcopy_structure,
&hotcopy_context,
- pool));
+ scratch_pool));
/* Prepare dst_repos object so that we may create locks,
so that we may open repository */
- dst_repos = create_svn_repos_t(dst_abspath, pool);
+ dst_repos = create_svn_repos_t(dst_abspath, scratch_pool);
dst_repos->fs_type = src_repos->fs_type;
dst_repos->format = src_repos->format;
- err = create_locks(dst_repos, pool);
+ err = create_locks(dst_repos, scratch_pool);
if (err)
{
if (incremental && err->apr_err == SVN_ERR_DIR_NOT_EMPTY)
@@ -2019,7 +2020,8 @@ svn_repos_hotcopy3(const char *src_path,
return svn_error_trace(err);
}
- err = svn_io_dir_make_sgid(dst_repos->db_path, APR_OS_DEFAULT, pool);
+ err = svn_io_dir_make_sgid(dst_repos->db_path, APR_OS_DEFAULT,
+ scratch_pool);
if (err)
{
if (incremental && APR_STATUS_IS_EEXIST(err->apr_err))
@@ -2030,7 +2032,7 @@ svn_repos_hotcopy3(const char *src_path,
/* Exclusively lock the new repository.
No one should be accessing it at the moment */
- SVN_ERR(lock_repos(dst_repos, TRUE, FALSE, pool));
+ SVN_ERR(lock_repos(dst_repos, TRUE, FALSE, scratch_pool));
fs_notify_func = notify_func ? fs_hotcopy_notify : NULL;
fs_notify_baton.notify_func = notify_func;
@@ -2039,12 +2041,12 @@ svn_repos_hotcopy3(const char *src_path,
SVN_ERR(svn_fs_hotcopy3(src_repos->db_path, dst_repos->db_path,
clean_logs, incremental,
fs_notify_func, &fs_notify_baton,
- cancel_func, cancel_baton, pool));
+ cancel_func, cancel_baton, scratch_pool));
/* Destination repository is ready. Stamp it with a format number. */
return svn_io_write_version_file
- (svn_dirent_join(dst_repos->path, SVN_REPOS__FORMAT, pool),
- dst_repos->format, pool);
+ (svn_dirent_join(dst_repos->path, SVN_REPOS__FORMAT, scratch_pool),
+ dst_repos->format, scratch_pool);
}
/* Return the library version number. */