42Using Repository Hooks

Subversion exposes a number of integration points into its transaction life cycle. These integration points are called hooks, and they correspond to events in the repository such as committing a change, locking and unlocking files, and altering revision properties. When Subversion gets to each point in its transaction life cycle, it will check for and execute the appropriate hook script.

Hook scripts have access to the in-flight transaction as it is being processed and are passed different command-line arguments depending on which hook script is executing. For example, the pre-commit hook is told the repository path and the transaction ID for the currently executing commit. If a hook script returns a nonzero exit code, ...

Get Pragmatic Guide to Subversion 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.