Created
December 14, 2011 14:47
-
-
Save rasmuskl/1476866 to your computer and use it in GitHub Desktop.
SVN pre-commit hook for enforcing presence of 'review'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET REPOS=%1% | |
SET TXN=%2% | |
REM Allow configuration tool updates | |
svnlook log %REPOS% -t %TXN% | findstr /C:"Configuration tool commited update to corticon rule" > nul | |
IF %ERRORLEVEL% EQU 0 (EXIT 0) | |
REM Verify commit message contains "Review:" (case-insensitive) | |
svnlook log %REPOS% -t %TXN% | findstr /I "Review" > nul | |
IF %ERRORLEVEL% EQU 0 (EXIT 0) | |
ECHO Commit comments skal indeholde en reviewer - 'Review: [reviewer]' >&2 | |
EXIT 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment