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

Re: svn commit: r1331028 - in /subversion/trunk/subversion: include/svn_fs.h libsvn_fs/editor.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 27 Apr 2012 14:17:07 +0300

gstein_at_apache.org wrote on Thu, Apr 26, 2012 at 18:47:32 -0000:
> Author: gstein
> Date: Thu Apr 26 18:47:31 2012
> New Revision: 1331028
>
> URL: http://svn.apache.org/viewvc?rev=1331028&view=rev
> Log:
> Clarify that svn_fs_editor_commit() will either commit or abort the
> transaction. No need to worry about it once this function is called.
>
> * subversion/include/svn_fs.h:
> (svn_fs_editor_commit): update docstring with info on the txn
>
> * subversion/libsvn_fs/editor.c:
> (svn_fs_editor_commit): if svn_editor_complete() errors, then make
> sure the transaction gets aborted, since there is no way to use it
> any more.
>
> Modified:
> subversion/trunk/subversion/include/svn_fs.h
> subversion/trunk/subversion/libsvn_fs/editor.c
>
> Modified: subversion/trunk/subversion/include/svn_fs.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_fs.h?rev=1331028&r1=1331027&r2=1331028&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/include/svn_fs.h (original)
> +++ subversion/trunk/subversion/include/svn_fs.h Thu Apr 26 18:47:31 2012
> @@ -1109,7 +1109,9 @@ svn_fs_editor_create_for(svn_editor_t **
> * #SVN_ERR_FS_INCORRECT_EDITOR_COMPLETION will be returned.
> *
> * @note After calling this function, @a editor will be marked as completed
> - * and no further operations may be performed on it.
> + * and no further operations may be performed on it. The underlying
> + * transaction will either be committed or aborted once this function is
> + * called. It cannot be recovered for additional work.
> *
> * @a result_pool will be used to allocate space for @a conflict_path.
> * @a scratch_pool will be used for all temporary allocations.
>
> Modified: subversion/trunk/subversion/libsvn_fs/editor.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/editor.c?rev=1331028&r1=1331027&r2=1331028&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs/editor.c (original)
> +++ subversion/trunk/subversion/libsvn_fs/editor.c Thu Apr 26 18:47:31 2012
> @@ -471,16 +471,17 @@ svn_fs_editor_commit(svn_revnum_t *revis
>
> /* Clean up internal resources (eg. eb->root). This also allows the
> editor infrastructure to know this editor is "complete". */
> - SVN_ERR(svn_editor_complete(editor));
> + err = svn_editor_complete(editor);
>
> /* Note: docco for svn_fs_commit_txn() states that CONFLICT_PATH will
> be allocated in the txn's pool. But it lies.

If it lies fix it?
Received on 2012-04-27 13:17:47 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.