You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2005/03/24 12:22:44 UTC
Re: svn commit: r13631 - in trunk/subversion: include libsvn_fs
libsvn_fs_base libsvn_fs_fs libsvn_ra_local libsvn_repos mod_dav_svn svnserve
tests/libsvn_fs tests/libsvn_repos
On Wed, 23 Mar 2005 cmpilato@tigris.org wrote:
> Author: cmpilato
> Date: Wed Mar 23 20:10:17 2005
> New Revision: 13631
>
> Log:
> Merge the functionalities of svn_fs_attach_lock() and svn_fs_lock()
> into a single function (svn_fs_lock).
>
> * subversion/include/svn_fs.h
> (svn_fs_lock): Add (optional) 'token' parameter, and move the
> 'force' parameter closer to the end. Finally, make 'timeout' an
> apr_time_t.
...
> ==============================================================================
> --- trunk/subversion/include/svn_fs.h (original)
> +++ trunk/subversion/include/svn_fs.h Wed Mar 23 20:10:17 2005
> @@ -1494,19 +1494,27 @@
> * 'owner' field in the new lock to the fs username.
> *
> * @a comment is optional: it's either an xml-escapable UTF8 string
> - * which describes the lock, or it is NULL.
> + * which describes the lock, or it is @c NULL.
> *
> * If path is already locked, then return @c SVN_ERR_FS_PATH_LOCKED.
> * If @a force is true, then "steal" the existing lock anyway, even if
> * the FS access-context's username does not match the current lock's
> * owner: delete the existing lock on @a path, and create a new one.
> *
> + * @a token is a lock token such as can be generated using @c
> + * svn_fs_generate_lock_token (indicating that the caller wants to
> + * dictate the lock token used), or it is @c NULL (indicating that the
> + * caller wishes to have a new token generated by this function). If
> + * @a token is not @c NULL, and represents an existing lock, then @a
> + * path must match the path associated with that existing lock.
> + *
> * If @a timeout is zero, then create a non-expiring lock. Else, the
> * lock will expire in @a timeout seconds after creation.
> *
> * If @a current_rev is a valid revnum, then do an out-of-dateness
> * check. If the revnum is less than the last-changed-revision of @a
> - * path (or if @a path doesn't exist in HEAD), return SVN_ERR_FS_OUT_OF_DATE.
> + * path (or if @a path doesn't exist in HEAD), return @c
> + * SVN_ERR_FS_OUT_OF_DATE.
> *
> * If @a path is non-existent, that's fine. The path is reserved, and
> * a lock-token is returned.
This got turned off later.
> @@ -1516,48 +1524,12 @@
> svn_error_t *svn_fs_lock (svn_lock_t **lock,
> svn_fs_t *fs,
> const char *path,
> + const char *token,
> const char *comment,
> - svn_boolean_t force,
> long int timeout,
That's not an apr_time_t as the log says. (I'd support that change,
though.)
Have a nice easter,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r13631 - in trunk/subversion: include libsvn_fs
libsvn_fs_base libsvn_fs_fs libsvn_ra_local libsvn_repos mod_dav_svn
svnserve tests/libsvn_fs tests/libsvn_repos
Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2005-03-24 at 09:50, C. Michael Pilato wrote:
> My fault. I started to make it an apr_time_t, then bailed (but forgot
> to tweak the log). My reasoning was that an apr_time_t is supposed to
> represent a moment in Time, not a span thereof. I dunno. I'd not -1
> a change to apr_time_t if the community wants it.
There's a bit of mental judo involved here: if I want to represent the
difference between two numbers of integral type foo_t, what type should
I use? Well, if the numbers and the difference are known to be
positive, then foo_t will definitely work, even though it's not intended
to represent a difference. Any other type isn't guaranteed to work.
(Sometimes people don't apply this mental judo. For instance, the C
standard chose to introduce ptrdiff_t as the result of subtracting one
pointer from another, even though size_t would have worked fine. I
guess they were just conceptually uncomfortable with the idea of using a
"size" type to represent a distance.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r13631 - in trunk/subversion: include libsvn_fs
libsvn_fs_base libsvn_fs_fs libsvn_ra_local libsvn_repos mod_dav_svn svnserve
tests/libsvn_fs tests/libsvn_repos
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 24 Mar 2005, C. Michael Pilato wrote:
> "Peter N. Lundblad" <pe...@famlundblad.se> writes:
>
> > > @@ -1516,48 +1524,12 @@
> > > svn_error_t *svn_fs_lock (svn_lock_t **lock,
> > > svn_fs_t *fs,
> > > const char *path,
> > > + const char *token,
> > > const char *comment,
> > > - svn_boolean_t force,
> > > long int timeout,
> >
> > That's not an apr_time_t as the log says. (I'd support that change,
> > though.)
>
> My fault. I started to make it an apr_time_t, then bailed (but forgot
> to tweak the log). My reasoning was that an apr_time_t is supposed to
> represent a moment in Time, not a span thereof. I dunno. I'd not -1
> a change to apr_time_t if the community wants it.
>
Of course it was your fault:-) Seriously, there is an apr_interval_time_t,
which we could use. But... well... I don't care much about it. subsecond
granularity for this seems like enormous overkill... But if someone wants
to feela little more pedantic...
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r13631 - in trunk/subversion: include libsvn_fs libsvn_fs_base libsvn_fs_fs libsvn_ra_local libsvn_repos mod_dav_svn svnserve tests/libsvn_fs tests/libsvn_repos
Posted by "C. Michael Pilato" <cm...@collab.net>.
"Peter N. Lundblad" <pe...@famlundblad.se> writes:
> > * If @a path is non-existent, that's fine. The path is reserved, and
> > * a lock-token is returned.
>
> This got turned off later.
Ah, yes. Seems someone failed to change the docstring when making
that change...
> > @@ -1516,48 +1524,12 @@
> > svn_error_t *svn_fs_lock (svn_lock_t **lock,
> > svn_fs_t *fs,
> > const char *path,
> > + const char *token,
> > const char *comment,
> > - svn_boolean_t force,
> > long int timeout,
>
> That's not an apr_time_t as the log says. (I'd support that change,
> though.)
My fault. I started to make it an apr_time_t, then bailed (but forgot
to tweak the log). My reasoning was that an apr_time_t is supposed to
represent a moment in Time, not a span thereof. I dunno. I'd not -1
a change to apr_time_t if the community wants it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org