On Thu, 4 Nov 2004 firstname.lastname@example.org wrote:
OK. Maybe to early for this level yet, but anyways...
> Author: sussman
> Date: Thu Nov 4 14:19:34 2004
> New Revision: 11750
> Modified: branches/locking/subversion/include/svn_error_codes.h
> Url: http://svn.collab.net/viewcvs/svn/branches/locking/subversion/include/svn_error_codes.h?view=diff&rev=11750&p1=branches/locking/subversion/include/svn_error_codes.h&r1=11749&p2=branches/locking/subversion/include/svn_error_codes.h&r2=11750
> --- branches/locking/subversion/include/svn_error_codes.h (original)
> +++ branches/locking/subversion/include/svn_error_codes.h Thu Nov 4 14:19:34 2004
> @@ -505,6 +505,28 @@
> SVN_ERR_FS_CATEGORY_START + 33,
> "Unknown FS type")
> + /* @since New in 1.2 */
> + SVN_ERRDEF (SVN_ERR_FS_NO_USER,
> + SVN_ERR_FS_CATEGORY_START + 34,
> + "No user associated with filesystem.")
I think you are consistent in adding periods to the new messages. :-)
> Modified: branches/locking/subversion/include/svn_fs.h
> Url: http://svn.collab.net/viewcvs/svn/branches/locking/subversion/include/svn_fs.h?view=diff&rev=11750&p1=branches/locking/subversion/include/svn_fs.h&r1=11749&p2=branches/locking/subversion/include/svn_fs.h&r2=11750
> --- branches/locking/subversion/include/svn_fs.h (original)
> +++ branches/locking/subversion/include/svn_fs.h Thu Nov 4 14:19:34 2004
> @@ -272,6 +272,52 @@
> /** @} */
> +/** Set @a *user to the current @a fs user. */
> +svn_error_t *svn_fs_get_user (svn_fs_user_t **user,
> + svn_fs_t *fs);
I assume it sets *user to NULL if there is no current user. Might want to
> +/** Lock @a path in @a fs, and set @a *token to a lock-token
> + * representing the new lock, allocated in @a pool.
> + *
> + * @a fs must have a user associated with it, else return @c
> + * SVN_ERR_FS_NO_USER. Set the 'owner' field in @a *token to the
> + * username of the current @a fs user.
> + *
> + * If path is already locked by a different user, then return @c
> + * SVN_ERR_FS_PATH_LOCKED. If @a force is true, then delete the lock
> + * on path (if any), and unconditionally create a new lock.
> + *
> + * If @a timeout is zero, then create a non-expiring lock. Else, the
> + * lock will expire in @a timeout seconds after creation.
> + *
Why not have an absolute time instead? There may be some time between the
client starting the request and this function actually getting called.
Wasn't some DAV client using 2 minute locks? Might not be very important.
I jsut don't see a reason to have a relative time.
> +typedef struct svn_lock_token_t
> + const char *path; /* the path this token applies to */
> + const char *uuid; /* unique lock token identifier */
> + const char *owner; /* the username which 'owns' the lock */
> + apr_time_t creation_date; /* when lock was made */
> + apr_time_t expiration_date; /* (optional) when lock will expire;
> + A value of 0 will never expire. */
> +} svn_lock_token_t;
Is it the value that expires? :-)
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Nov 4 22:11:14 2004