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

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

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 23 Apr 2012 19:16:55 -0400

On Mon, Apr 23, 2012 at 17:58, Blair Zajac <blair_at_orcaware.com> wrote:
>
> On Apr 23, 2012, at 1:01 PM, Greg Stein wrote:
>
>>
>> On Apr 23, 2012 8:00 AM, "Blair Zajac" <blair_at_orcaware.com> wrote:
>> >
>> >
>> > On Apr 23, 2012, at 2:45 AM, gstein_at_apache.org wrote:
>> >
>> >> Author: gstein
>> >> Date: Mon Apr 23 06:45:46 2012
>> >> New Revision: 1329083
>> >>
>> >> URL: http://svn.apache.org/viewvc?rev=1329083&view=rev
>> >> Log:
>> >> Add a flag that we'll need. mod_dav_svn wants to keep the txn alive,
>> >> and will manually commit it. libsvn_repos never keeps a txn alive
>> >> beyond the editor drive. This new flag enables the two behaviors.
>> >>
>> >> * subversion/include/svn_fs.h:
>> >> (SVN_FS_TXN_NO_AUTOCOMMIT): new flag
>> >
>> >
>> > How about renaming this to SVN_FS_TXN_EDITOR_NO_AUTOCOMMIT to make it
>> > clear in the name that it's specific to an editor and not to txn's as a
>> > whole.
>> >
>> >
>> >> (make_editor): set the new flag, to be used by complete_cb later.
>> >>
>> >> 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=1329083&r1=1329082&r2=1329083&view=diff
>> >>
>> >> ==============================================================================
>> >> --- subversion/trunk/subversion/include/svn_fs.h (original)
>> >> +++ subversion/trunk/subversion/include/svn_fs.h Mon Apr 23 06:45:46
>> >> 2012
>> >> @@ -808,6 +808,11 @@ typedef struct svn_fs_txn_t svn_fs_txn_t
>> >> * if a caller tries to edit a locked item without having rights to the
>> >> lock.
>> >> */
>> >> #define SVN_FS_TXN_CHECK_LOCKS                   0x00002
>> >> +
>> >> +/** Do not auto-commit the txn when its associated editor is marked
>> >> + * as completed.
>> >> + */
>> >> +#define SVN_FS_TXN_NO_AUTOCOMMIT                 0x00004
>> >> /** @} */
>> >
>> >
>> > The new #define doesn't belong in this block of defines as they are for
>> > svn_fs_begin_txn2():
>>
>> But it does... these three flags can be passed as the FLAGS param to
>> svn_fs_editor_create, and are used to control the txn created as part of
>> that.
>>
> It's not controlling the underlying txn object though, just the editor.  I
> could pass SVN_FS_TXN_NO_AUTOCOMMIT to svn_fs_begin_txn2() but it doesn't do
> anything with it, so it's not appropriate.  It can ignore it and never use
> it, but it's not as clear.
>
>> (so I'm also not keen on inserting another word into the symbol)
>>
> I see what you're getting at in saving an argument to svn_fs_editor_create,
> but conceptually it's mixing two distinct sets of flags().
>
> svn_error_t *
> svn_fs_editor_create(svn_editor_t **editor,
>                     const char **txn_name,
>                     svn_fs_t *fs,
>                     svn_revnum_t revision,
>                     apr_uint32_t txn_flags,
>                     apr_uint32_t editor_flags,
>                     ...
>
> or
>
> svn_error_t *
> svn_fs_editor_create(svn_editor_t **editor,
>                     const char **txn_name,
>                     svn_fs_t *fs,
>                     svn_revnum_t revision,
>                     apr_uint32_t txn_flags,
>                     svn_boolean_t no_autocommit,
>                     ...
>
> and hence be named SVN_FS_EDITOR_TXN_NO_AUTOCOMMIT.
>
> Blair
>

Fixed in r1329505.
Received on 2012-04-24 01:17:28 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.