Subversion Repository Hook Reference


Subversion repositories provide a number of event hooks which are essentially opportunities for administrators to extend Subversion's functionality at key moments of key operations. Repository hooks are implemented as programs executed by Subversion itself at those key moments—before and after a commit, before and after a user locks a file, and so on.

For each hook it provides, Subversion will attempt to execute the program of that hook's name which is found in the hooks/ subdirectory of the repository's on-disk directory structure. For example, on a Unix system, the start-commit hook script would be installed at REPOS_PATH/hooks/start-commit, where it could be a binary executable program, a shell script, a Python program, etc. On a Windows system, the program would be installed in the same location, but would be named START-COMMIT.EXE or START-COMMIT.BAT instead of simply start-commit.

This reference guide describes the various hooks which Subversion offers to administrators, detailing when the hook is invoked, its input parameters, and how its behavior affects the Subversion workflow.