You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/03/27 18:52:48 UTC
svn commit: r1461743 - /subversion/trunk/subversion/libsvn_fs/fs-loader.c
Author: danielsh
Date: Wed Mar 27 17:52:47 2013
New Revision: 1461743
URL: http://svn.apache.org/r1461743
Log:
Set an output parameter. Also refactor code.
The output parameter is NEW_REV. It will now be set before anything else
happens in this function, regardless of compile-time options.
The refactoring rejiggers the various #ifdef'd blocks, but should have no
functional change.
* subversion/libsvn_fs/fs-loader.c
(svn_fs_commit_txn): As above.
Modified:
subversion/trunk/subversion/libsvn_fs/fs-loader.c
Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1461743&r1=1461742&r2=1461743&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Wed Mar 27 17:52:47 2013
@@ -753,15 +753,10 @@ svn_fs_commit_txn(const char **conflict_
#if defined(PACK_AFTER_EVERY_COMMIT) || defined(SVN_DEBUG)
svn_fs_root_t *txn_root;
#endif
-#ifdef PACK_AFTER_EVERY_COMMIT
- svn_fs_t *fs;
- const char *fs_path;
*new_rev = SVN_INVALID_REVNUM;
- SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
- fs = svn_fs_root_fs(txn_root);
- fs_path = svn_fs_path(fs, pool);
-#elif defined (SVN_DEBUG)
+
+#if defined(PACK_AFTER_EVERY_COMMIT) || defined(SVN_DEBUG)
SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
#endif
@@ -789,6 +784,8 @@ svn_fs_commit_txn(const char **conflict_
#ifdef PACK_AFTER_EVERY_COMMIT
{
+ svn_fs_t *fs = svn_fs_root_fs(txn_root);
+ const char *fs_path = svn_fs_path(fs, pool);
err = svn_fs_pack(fs_path, NULL, NULL, NULL, NULL, pool);
if (err && err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE)
/* Pre-1.6 filesystem. */