Skip to content

Instantly share code, notes, and snippets.

@rasmuskl
Created December 14, 2011 14:47
Show Gist options
  • Save rasmuskl/1476866 to your computer and use it in GitHub Desktop.
Save rasmuskl/1476866 to your computer and use it in GitHub Desktop.
SVN pre-commit hook for enforcing presence of 'review'
@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