1
votes

I have installed CollabNet SVN. It can be accessed and I created some repositories. I want to add two hooks:

1) A pre-commit hook to make comments mandatory while committing. The hook should check length of comments.

2) A hook to ignore contents of bin and obj folders.

I want that both these hooks should force all users of SVN to follow them, so they should be on the server, not on my local Tortoise SVN.

I would really appreciate if you can either show me how to do it or guide me to a tutorial. This is the first time I am working on SVN-related stuff.

Thanks.

1

1 Answers

-1
votes

I have not yet tried this particular package but it looks quite presentable: this pre-commit hook by Prashanth Vakati provides the two checks you are seeking plus more:

  • Check Empty Log Message;
  • Ignore Directories/Folders;
  • Ignore File Extensions;
  • Check For Lock Existence.

On the referenced web page, you'll find a clear, concise description of the package. It is unusual in that it comes as a zip file containing an exe file and a config file (rather than just a script file). Simply unzip both of them into your hooks directory, then edit the config file to specify the folders you wish to ignore. Note that the script generates an error if one tries to commit a folder on the list rather than silently filter out entries that are on the list. I personally prefer this approach because it makes the user aware that something is not going to be committed.