start-commit — Notification of the beginning of a commit.
The start-commit hook is run immediately after the commit transaction is created and its initial properties set. It is typically used as an early termination mechanism, avoiding what could be a lengthy commit process which would eventually fail at a later phase anyway due to a user's lack of commit privileges or some other commit metadata validation failure.
If the start-commit hook program returns a nonzero exit
value, the commit process is stopped, the commit transaction
is destroyed, and anything printed to
stderr is marshalled back to the
The start-commit hook is not a suitable place to evaluate the substance of a particular commit, as it is invoked before any file or directory change information has been transmitted. Use the pre-commit hook script (which is described in pre-commit elsewhere in this reference) for that purpose.
Prior to Subversion 1.8, the Subversion invoked the start-commit hook before creating the commit transaction. Failure of the script resulted in that transaction not being created at all. This was changed in Subversion 1.8, though, to allow implementations of the start-commit hook access to the transaction's properties, which can include (among other things) the revision log associated with the commit.
The command-line arguments passed to the hook program, in order, are:
Authenticated username attempting the commit
Colon-separated list of capabilities that a client passes to the server, including
log-revprops(new in Subversion 1.5)
Commit transaction name (new in Subversion 1.8)