pub unsafe extern "C" fn svn_fs_commit_txn(
conflict_p: *mut *const c_char,
new_rev: *mut svn_revnum_t,
txn: *mut svn_fs_txn_t,
pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Commit @a txn.
@note You usually don’t want to call this directly. Instead, call svn_repos_fs_commit_txn(), which honors the repository’s hook configurations.
If the transaction conflicts with other changes committed to the repository, return an #SVN_ERR_FS_CONFLICT error. Otherwise, create a new filesystem revision containing the changes made in @a txn, storing that new revision number in @a *new_rev, and return zero.
If #SVN_FS_TXN_CLIENT_DATE was passed to #svn_fs_begin_txn2 any svn:date on the transaction will be become the unversioned property svn:date on the revision. svn:date can have any value, it does not have to be a timestamp. If the transaction has no svn:date the revision will have no svn:date.
If #SVN_FS_TXN_CLIENT_DATE was not passed to #svn_fs_begin_txn2 the new revision will have svn:date set to the current time at some point during the commit and any svn:date on the transaction will be lost.
If @a conflict_p is non-zero, use it to provide details on any conflicts encountered merging @a txn with the most recent committed revisions. If a conflict occurs, set @a *conflict_p to the path of the conflict in @a txn, allocated within @a pool; otherwise, set @a *conflict_p to NULL.
If the commit succeeds, @a txn is invalid.
If the commit fails for any reason, @a *new_rev is an invalid revision number, an error other than #SVN_NO_ERROR is returned and @a txn is still valid; you can make more operations to resolve the conflict, or call svn_fs_abort_txn() to abort the transaction.
@note Success or failure of the commit of @a txn is determined by examining the value of @a *new_rev upon this function’s return. If the value is a valid revision number, the commit was successful, even though a non-@c NULL function return value may indicate that something else went wrong in post commit FS processing.
@note See api-errata/1.8/fs001.txt for information on how this function was documented in versions prior to 1.8.