Name

start-commit — Notification of the beginning of a commit.

Description

The start-commit hook is run before the commit transaction is even created. It is typically used to decide whether the user has commit privileges at all.

If the start-commit hook program returns a nonzero exit value, the commit is stopped before the commit transaction is even created, and anything printed to stderr is marshaled back to the client.

Input Parameter(s)

The command-line arguments passed to the hook program, in order, are:

  1. Repository path

  2. Authenticated username attempting the commit

  3. Colon-separated list of capabilities that a client passes to the server, including depth, mergeinfo, and log-revprops (new in Subversion 1.5).

Common uses

Access control (e.g., temporarily lockout commits for some reason); a means to allow access only from clients that have certain capabilities.

Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.