You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/01/05 14:37:06 UTC
svn commit: r1555499 - /subversion/trunk/subversion/libsvn_repos/commit.c
Author: stefan2
Date: Sun Jan 5 13:37:05 2014
New Revision: 1555499
URL: http://svn.apache.org/r1555499
Log:
In the svn_repos commit editor, make sure that close_edit() and
abort_edit() release all internal objects. This relaxes pool
usage constraints.
* subversion/libsvn_repos/commit.c
(close_edit,
abort_edit): Close FS layer objects that we own.
Modified:
subversion/trunk/subversion/libsvn_repos/commit.c
Modified: subversion/trunk/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1555499&r1=1555498&r2=1555499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Sun Jan 5 13:37:05 2014
@@ -761,6 +761,13 @@ close_edit(void *edit_baton,
if (SVN_IS_VALID_REVNUM(new_revision))
{
+ /* The actual commit succeeded, i.e. the transaction does no longer
+ exist and we can't use txn_root for conflict resolution etc.
+
+ Since close_edit is supposed to release resources, do it now. */
+ if (eb->txn_root)
+ svn_fs_close_root(eb->txn_root);
+
if (err)
{
/* If the error was in post-commit, then the commit itself
@@ -821,6 +828,10 @@ abort_edit(void *edit_baton,
eb->txn_aborted = TRUE;
+ /* Since abort_edit is supposed to release resources, do it now. */
+ if (eb->txn_root)
+ svn_fs_close_root(eb->txn_root);
+
return svn_error_trace(svn_fs_abort_txn(eb->txn, pool));
}