Saturday, January 2, 2010

Subversion pre-commit hook : Check Empty Log Message,Ignore File Extensions,Ignore Directories/Folders,Check For Lock Existance

Have you ever wondered a single svn/subversion pre-commit hook exists fow windows and can check for empty or no log message /messages ,ignore files and directories and check for lock existence(svn:needs-lock) on commiting binary files such as word documents, pdfs, exes,dlls,xls and others.

This small .net pre-commit hook can do it all for you, and is highly configurable to fit every ones need.Can easily maitain ignore list of files and folders, need lock files and turn off/on check using the configuration file.

Code can be used as a sample / example if you want to create a hook of your own.
You will get a Commit failed (details follow): Commit blocked by pre-commit hook (exit code xxxxxx) with output error if svnlook location is not defined in the xml configuration file.

here is the link for it.

http://code.google.com/p/prashanth-vakati-prj2/downloads/list

Config File:






Error Messages from the pre-commit hook:


No comments:

Post a Comment