| Goul In Space |
|
My day-day technical notes and chat.
Twitter Updates
Local Links
Front page Archive Mars Plugins Netbeans and Sourceforge Checkstyle For Netbeans Syndication
|
Wednesday, January 28, 2009
If you need to enforce certain patterns in commit messages for svn (eg. ticket nos etc) create a script in ~repos/hooks/pre-commit :
REPOS="$1" TXN="$2" # Make sure that the log message contains some text of form Feedback nnnnn: SVNLOOK=/usr/local/bin/svnlook match=`$SVNLOOK log -t "$TXN" "$REPOS" | grep -i 'feedback.*[0-9]:'| wc -c` if [ $match -eq 0 ] then echo "COMMIT HAS FAILED:Log message does not contain feedback number eg. feedback nnnn: commit message" 2>&1 exit 1 else exit 0 fi exit 0
Comments:
Post a Comment
|