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

Re: aborting txn's

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-09-20 16:20:14 CEST

On Thu, Sep 20, 2001 at 09:50:51AM -0400, Kevin Pilch-Bisson wrote:
> Hey,
>
> In trying to get pre-commit hooks working, I have run into an interesting
> situation. In hooks.c if the precommit hook fails, then svn_fs_abort_txn
> is called on the txn, then the error is returned.
>
>
> At that point ra_local catches the error and tries to abort the txn again
> (which fails). mod_dav_svn on the other hand, never aborts the txn.
>
> My suggestion is that mod_dav_svn should abort the txn, and hooks.c should
> leave it alone. Thoughts?

Let me clarify a bit more. Specifically the cleanup for fail pre-commit hooks
takes place in hooks.c:svn_repos_fs_commit_txn. However, there are a number
of other errors which could occur in that function, none of which result
in the txn being aborted. So why is run_pre_commit_hook and different?
Answer: It's not.

Thus we can do one of two things. Add a call to svn_fs_abort_txn in
mod_dav_svn in the case where svn_repos_fs_commit_txn returns erorr, or
remove the call in libsvn_repos:get_editor.c, and call it within
svn_repos_fs_commit_txn for all error cases instead of just one.

I decided on the former, which I will commit now, but if people are against
it, I can change it to be the latter.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:42 2006

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.