You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/04/07 21:19:15 UTC
svn commit: r1585568 - in /subversion/trunk/subversion: include/svn_fs.h
svnserve/serve.c
Author: philip
Date: Mon Apr 7 19:19:14 2014
New Revision: 1585568
URL: http://svn.apache.org/r1585568
Log:
* subversion/svnserve/serve.c
(lock_many, unlock_many): Tweak comments.
* subversion/include/svn_fs.h
(svn_fs_lock_target_t,
svn_fs_lock_target_create,
svn_fs_lock_target_set_token): Tweak comments.
Modified:
subversion/trunk/subversion/include/svn_fs.h
subversion/trunk/subversion/svnserve/serve.c
Modified: subversion/trunk/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1585568&r1=1585567&r2=1585568&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_fs.h (original)
+++ subversion/trunk/subversion/include/svn_fs.h Mon Apr 7 19:19:14 2014
@@ -2514,8 +2514,9 @@ svn_fs_set_uuid(svn_fs_t *fs,
* expiration error (depending on the API).
*/
-/** The @a targets hash passed to svn_fs_lock_many() has <tt>const char
- * *</tt> keys and <tt>svn_fs_lock_target_t *</tt> values.
+/** Lock information for use with svn_fs_lock_many() [and svn_repos_fs_...].
+ *
+ * @see svn_fs_lock_target_create().
*
* @since New in 1.9.
*/
@@ -2524,6 +2525,9 @@ typedef struct svn_fs_lock_target_t svn_
/* Create an <tt>svn_fs_lock_target_t</tt> allocated in @a pool. @a
* token can be NULL and @a current_rev can be SVN_INVALID_REVNUM.
*
+ * The @a token is not duplicated and so must have a lifetime at least as
+ * long as the returned target object.
+ *
* @since New in 1.9.
**/
svn_fs_lock_target_t *svn_fs_lock_target_create(const char *token,
@@ -2532,6 +2536,9 @@ svn_fs_lock_target_t *svn_fs_lock_target
/* Update @a target changing the token to @a token, @a token can be NULL.
*
+ * The @a token is not duplicated and so must have a lifetime at least as
+ * long as the returned target object.
+ *
* @since New in 1.9.
**/
void svn_fs_lock_target_set_token(svn_fs_lock_target_t *target,
Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1585568&r1=1585567&r2=1585568&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Mon Apr 7 19:19:14 2014
@@ -2803,7 +2803,9 @@ static svn_error_t *lock_many(svn_ra_svn
pool);
target = svn_fs_lock_target_create(NULL, current_rev, pool);
- /* We could check for duplicate paths and reject the request? */
+ /* Any duplicate paths, once canonicalized, get collapsed into a
+ single path that is processed once. The result is then
+ returned multiple times. */
svn_hash_sets(targets, full_path, target);
}
@@ -2976,6 +2978,10 @@ static svn_error_t *unlock_many(svn_ra_s
full_path = svn_fspath__join(b->repository->fs_path->data,
svn_relpath_canonicalize(path, subpool),
pool);
+
+ /* Any duplicate paths, once canonicalized, get collapsed into a
+ single path that is processed once. The result is then
+ returned multiple times. */
svn_hash_sets(targets, full_path, token);
}