-
-
Save olleolleolle/434197 to your computer and use it in GitHub Desktop.
[useful] Subversion pre-commit hook for Windows machine
This file contains hidden or 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
REM Subversion pre-commit hook for Windows machine | |
REM put this in your SVN repository folder /hooks/pre-commit.bat | |
REM we use it with svn version | |
REM http://stackoverflow.com/questions/869248/windows-pre-commit-hook-for-comment-length-subversion | |
@echo off | |
:: Stops commits that have empty log messages. | |
@echo off | |
setlocal | |
rem Subversion sends through the path to the repository and transaction id | |
set REPOS=%1 | |
set TXN=%2 | |
rem line below ensures at least one character ".", 5 characters require change to "....." | |
svnlook log %REPOS% -t %TXN% | findstr . > nul | |
if %errorlevel% gtr 0 (goto err) else exit 0 | |
:err | |
echo. 1>&2 | |
echo Your commit has been blocked because you didn't enter a comment. 1>&2 | |
echo Write a log message describing the changes made and try again. 1>&2 | |
echo Thanks 1>&2 | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Se agradece era justo lo que andaba buscando