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
> >> 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
> >> + * 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
const char **txn_name,
const char **txn_name,
and hence be named SVN_FS_EDITOR_TXN_NO_AUTOCOMMIT.
Received on 2012-04-23 23:59:33 CEST