[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31605 - in trunk/subversion: include libsvn_repos

From: David Glasser <glasser_at_davidglasser.net>
Date: Fri, 6 Jun 2008 09:32:22 -0700

Doesn't this require a bump?

Otherwise, I could go to the 'latest version' doxygen, read it, think
"ah, it's legal to pass NULL to svn_repos_get_commit_editor5", and
then write a program that only works if you have 1.6+.

--dave

On Thu, Jun 5, 2008 at 2:49 PM, <kfogel_at_tigris.org> wrote:
> Author: kfogel
> Date: Thu Jun 5 14:49:04 2008
> New Revision: 31605
>
> Log:
> Improve an API by allowing a callback to be null.
>
> Suggested by: Neels Janosch Hofmeyr <neels_at_elego.de>
>
> * subversion/include/svn_repos.h
> (svn_repos_get_commit_editor5): Document that callback can be null.
> Also, fix up some obsolete documentation: the modern callback type
> takes a struct instead of separate parameters.
>
> * subversion/libsvn_repos/commit.c
> (close_edit): Test callback before calling.
>
> Modified:
> trunk/subversion/include/svn_repos.h
> trunk/subversion/libsvn_repos/commit.c
>
> Modified: trunk/subversion/include/svn_repos.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_repos.h?pathrev=31605&r1=31604&r2=31605
> ==============================================================================
> --- trunk/subversion/include/svn_repos.h Thu Jun 5 14:03:39 2008 (r31604)
> +++ trunk/subversion/include/svn_repos.h Thu Jun 5 14:49:04 2008 (r31605)
> @@ -938,14 +938,15 @@ svn_repos_replay(svn_fs_root_t *root,
> * due to authz will return SVN_ERR_AUTHZ_UNREADABLE or
> * SVN_ERR_AUTHZ_UNWRITABLE.
> *
> - * Calling @a (*editor)->close_edit completes the commit. Before
> - * @c close_edit returns, but after the commit has succeeded, it will
> - * invoke @a callback with the new revision number, the commit date (as a
> - * <tt>const char *</tt>), commit author (as a <tt>const char *</tt>), and
> - * @a callback_baton as arguments. If @a 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 and will
> - * have code SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.
> + * Calling @a (*editor)->close_edit completes the commit.
> + *
> + * If @a callback is non-NULL, then before @c close_edit returns (but
> + * after the commit has succeeded) @c close_edit will invoke
> + * @a callback with a filled-in @c svn_commit_info_t *, @a callback_baton,
> + * and @a pool or some subpool thereof as arguments. If @a 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.
> *
> * Calling @a (*editor)->abort_edit aborts the commit, and will also
> * abort the commit transaction unless @a txn was supplied (not @c
>
> Modified: trunk/subversion/libsvn_repos/commit.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_repos/commit.c?pathrev=31605&r1=31604&r2=31605
> ==============================================================================
> --- trunk/subversion/libsvn_repos/commit.c Thu Jun 5 14:03:39 2008 (r31604)
> +++ trunk/subversion/libsvn_repos/commit.c Thu Jun 5 14:49:04 2008 (r31605)
> @@ -715,7 +715,7 @@ close_edit(void *edit_baton,
> pool);
> }
>
> - if (! err)
> + if ((! err) && eb->commit_callback)
> {
> commit_info = svn_create_commit_info(pool);
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-06 18:32:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.