You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by bl...@apache.org on 2010/12/21 21:04:26 UTC

svn commit: r1051632 - /subversion/trunk/subversion/libsvn_fs/fs-loader.c

Author: blair
Date: Tue Dec 21 20:04:26 2010
New Revision: 1051632

URL: http://svn.apache.org/viewvc?rev=1051632&view=rev
Log:
If any work is done that can return an error before the real
svn_fs_commit_txn() implementation is executed, then make sure to set
*new_rev to SVN_INVALID_REVNUM so callers can check if the commit was
successful.

This partially implements svn_fs_commit_txn()'s contract that *new_rev
tells if the transaction was committed; if it isn't set, then callers
will not be able to tell if the transaction was committed unless they
set the revision number to SVN_INVALID_REVNUM themselves, which isn't
required.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_commit_txn):
    Set *new_rev to SVN_INVALID_REVNUM if PACK_AFTER_EVERY_COMMIT is
    defined.

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=1051632&r1=1051631&r2=1051632&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Tue Dec 21 20:04:26 2010
@@ -676,6 +676,7 @@ svn_fs_commit_txn(const char **conflict_
   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);