svn_repos_fs_commit_txn

Function svn_repos_fs_commit_txn 

Source
pub unsafe extern "C" fn svn_repos_fs_commit_txn(
    conflict_p: *mut *const c_char,
    repos: *mut svn_repos_t,
    new_rev: *mut svn_revnum_t,
    txn: *mut svn_fs_txn_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Like svn_fs_commit_txn(), but invoke the @a repos’ pre- and post-commit hooks around the commit. Use @a pool for any necessary allocations.

If the pre-commit hook fails, do not attempt to commit the transaction and throw the original error to the caller.

A successful commit is indicated by a valid revision value in @a *new_rev, not if svn_fs_commit_txn() returns an error, which can occur during its post commit FS processing. If the transaction was not committed, then return the associated error and do not execute the post-commit hook.

If the commit succeeds the post-commit hook is executed. If the post-commit hook returns an error, always wrap it with SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED; this allows the caller to find the post-commit hook error in the returned error chain. If both svn_fs_commit_txn() and the post-commit hook return errors, then svn_fs_commit_txn()’s error is the parent error and the SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error is the child error.

@a conflict_p, @a new_rev, and @a txn are as in svn_fs_commit_txn().