Subversion force comments to be entered

wanted to force someone to put in comments when they did a commit. So, below you will find what I did to enforce that. (I am sure that there is a more graceful way to do it, but this is how I did it.

With a default install of Fedora Core 4, Apache 2, and Subversion you can follow my example and everything should work fine.

You should find a directory: (substitute the X’s with your version numbers)

cd /usr/share/docs/subversion-X.X.X/tools/hook-scripts

I wanted this directory to be somewhere more memorable for me, so I actually moved it to: /usr/local/bin/svn_stuff/hook-scripts

I also wanted to ensure that apache would be able to do everything that it needed to, since I am using Subversion remotely. I did it this way:

cd /usr/local/bin
mkdir svn_stuff
cp -R /usr/share/docs/subversion-X.X.X/tools/hook-scripts /usr/local/bin/svn_stuff
chmod -R 755 svn_stuff
chown -R apache.apache svn_stuff

In my repository, which is located at /var/www/svnprojects I need to edit a file in the hooks directory. The file is pre-commit.tmpl that needs to be renamed to pre-commit, then edit the file by adding one line.

I renamed the file by typing:

# cp pre-commit.tmpl pre-commit 

Then I simply commented out the following line to the file pre-commit by adding the # symbol to the beginning of the line: "$REPOS" "$TXN" commit-access'control.cfg || exit 1

After closing the file a comment will be required upon a commit.