svnsvn-hooks

How to create the hooks directory


We have a pre-existing SVN repository. Whoever created it did not follow the SVN standard directory structure and so there is no hooks folder.

Is there a way to tell SVN to regenerate the hooks folder? If not, is there a way to create a directory manually and configure SVN to use that folder?


Solution

  • A simple mkdir hooks should do. Be sure to give the various scripts the exec bit; and have them executable by the svn (webserver) user.

    If you want to example scripts; simply do

    mkdir temp-example-copy-of-repo
    cd temp-example-copy-of-repo
    svnadmin create repo
    cd repo/hooks
    

    to get the example templates.