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

Re: [PATCH] #2246: repos_get_commit_editor API

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-03-28 17:07:02 CEST

On Mar 28, 2005, at 5:59 AM, Chia-liang Kao wrote:

> * include/svn_repos.h:
> (svn_repos_get_txn_commit_editor): New.
> (svn_repos_get_commit_editor): Correct doc.
>
> * libsvn_repos/commit.c:
> (struct edit_baton): Remove user and log_msg from baton. Add
> txn_cleanup.
> (open_root): Don't call begin_txn here.
> (svn_repos_get_commit_editor): begin_txn here, and make use
> of new txn_commit_editor api, and override txn_cleanup.
> (svn_repos_get_txn_commit_editor): New.
>

A very elegant patch.

But: there's a problem with this design. Years ago, we deliberately
decided that get_commit_editor() should *not* create a txn. We felt it
was overoptimization. Merely asking for the ability to commit doesn't
mean you're about to commit -- we didn't like the idea of empty
transactions lying around (for hours? days?) just because commit
editors were fetched. So only open_root() should be creating the
transaction.

How about a different approach: why not just 'rev' the existing API?
Create svn_repos_get_commit_editor2(), and have it take an optional
pre-existing txn parameter? If the new parameter is NULL, then
open_root() will create a new txn. If the new parameter is non-NULL,
then open_root() will do nothing.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 28 17:08:22 2005

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.