2017-11-28 1 views
0

Ich verwende einen Pre-Commit Hook, auf meinem SVN (Visual SVN Server und Tortoise Client). Es hat perfekt funktioniert. Jetzt wollen wir über Enterprise Architect (wo wir die svn.exe Adresse angeben) committen. Jetzt blockiert der Pre-Commit Hook das Commit. Unten ist der HakenPre Commit Hook für SVN verhält sich nicht wie erwartet mit Enterprise Architect

REM Pre Commit hook for having a comment of at least 20 characters. 

setlocal enabledelayedexpansion 

set REPOS=%1 
set TXN=%2 
set SVNLOOK="%VISUALSVN_SERVER%\bin\svnlook.exe" 

SET M= 
REM Concatenate all the lines in the commit message 
FOR /F "usebackq delims==" %%g IN (`%SVNLOOK% log -t %TXN% %REPOS%`) DO SET M=!M!%%g 

REM Make sure M is defined 
SET M=0%M% 

REM Here the 20 is the length we require 
IF NOT "%M:~20,1%"=="" goto NORMAL_EXIT 

:ERROR_TOO_SHORT 
echo "Commit note must be at least 20 letters" >&2 
goto ERROR_EXIT 

:ERROR_EXIT 
exit /b 1 

REM All checks passed, so allow the commit. 
:NORMAL_EXIT 
exit 0 

Bitte schlagen Sie uns Ihre Lösung für diese begehen. Der Fehlercode, den ich bekomme, ist E165001

+0

https://stackoverflow.com/questions/33789148/svn-e165001-comit-blocked-by-pre-commit-hook-exit-code-255-with-no-output –

+0

https://stackoverflow.com/questions/12837754/svn-commit-blocked-by-vor-commit-hook-exit-code-3-with-output –

+0

@ThomasKilian Ich kann keine Lösung in einem der von Ihnen zur Verfügung gestellten Links finden –

Antwort

1

Enterprise Architect, während committing Ordner fügt eigene Kommentare hinzu. "Ordner hinzufügen". Es verpflichtet nur die Addition auf einmal und inhaltlich das nächste Mal. Das ist der Grund, warum der obige Hook fehlgeschlagen ist, da er nicht 20 Zeichen lang war.