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:34:11 UTC

svn commit: r1051638 - /subversion/trunk/subversion/libsvn_repos/fs-wrap.c

Author: blair
Date: Tue Dec 21 20:34:10 2010
New Revision: 1051638

URL: http://svn.apache.org/viewvc?rev=1051638&view=rev
Log:
Following r1051632, 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 satisfies svn_fs_commit_txn()'s contract when it is used through
svn_repos_fs_commit_txn().

* subversion/libsvn_repos/fs-wrap.c
  (svn_repos_fs_commit_txn):
    Set *new_rev to SVN_INVALID_REVNUM before doing anything.

Modified:
    subversion/trunk/subversion/libsvn_repos/fs-wrap.c

Modified: subversion/trunk/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/fs-wrap.c?rev=1051638&r1=1051637&r2=1051638&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/trunk/subversion/libsvn_repos/fs-wrap.c Tue Dec 21 20:34:10 2010
@@ -49,6 +49,8 @@ svn_repos_fs_commit_txn(const char **con
   svn_error_t *err;
   const char *txn_name;
 
+  *new_rev = SVN_INVALID_REVNUM;
+
   /* Run pre-commit hooks. */
   SVN_ERR(svn_fs_txn_name(&txn_name, txn, pool));
   SVN_ERR(svn_repos__hooks_pre_commit(repos, txn_name, pool));