You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2012/04/27 13:17:07 UTC

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

gstein@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?

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

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Greg Stein wrote on Mon, Apr 30, 2012 at 02:15:27 -0400:
> On Fri, Apr 27, 2012 at 07:17, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > gstein@apache.org wrote on Thu, Apr 26, 2012 at 18:47:32 -0000:
> >...
> >> +++ 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?
> 
> Fixed in r1332062.

Thanks

Daniel

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

Posted by Greg Stein <gs...@gmail.com>.
On Fri, Apr 27, 2012 at 07:17, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> gstein@apache.org wrote on Thu, Apr 26, 2012 at 18:47:32 -0000:
>...
>> +++ 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?

Fixed in r1332062.