1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Hook Scripts

Subversion is capable of running server-side scripts during the various stages of a Subversion commit operation. These hook scripts are very powerful, but due to the implementation of hook scripts in Subversion at SourceForge.net, projects are not permitted full control over them. This is quite a large change from how CVS handles pre- and post- commit scripts. Accordingly, SourceForge.net makes available to projects specific scripts which may be of use to hosted projects.

The following scripts are available for your use:

  • svnnotify: Sends email notifications of changes made during a Subversion commit. Two versions of this hook script are available, one that includes a diff of the changes, and one that doesn't.
  • check-case-insensitive.py: Checks to make sure filenames are valid for a case insensitive environment (Windows, for example)
  • check-mime-type.pl: Checks to ensure a mime-type property is set for files added to the repository
  • ciabot_svn.py: Reports commit activity to cia.navi.cx.

Installing a hook script

  1. Login to SourceForge.net as a project administrator and access the Project Summary page.
  2. Mouse over the Project Admin menu and select Feature Settings
  3. In the row with Subversion, select the Manage link in the option column.
  4. Select the hook script from the 'Hooks:' pulldown menu.
  5. Click the 'Add' button.
  6. Fill in any of the requested hook parameter fields, as displayed on the resulting page (if any).
  7. Click the 'Finish Add' button.

Removing a hook script

  1. Login to SourceForge.net as a project administrator and access the Project Summary page.
  2. Mouse over the Project Admin menu and select Feature Settings
  3. In the row with Subversion, select the Manage link in the option column.
  4. Select the Subversion menu option from the Admin dropdown menu.
  5. Click the radio button to the left of the hook script to remove
  6. Click the 'Delete' button

Requesting a new hook script

To request an additional hook script be installed for use, submit a Feature Request.

Getting Help