Windows:
[Code] @echo off
Setlocal
Set repos=%1
Set txn=%2
REM Check that logmessage contains at least characters
Svnlook Log "%repos%"-T "%txn%" | Findstr "..." > nul.
If%errorlevel% GTR 0 goto ERR
Exit 0
: Err
echo that logmessage contains at least alphanumeric characters. Commit aborted! 1>&2
Exit 1[/code]
Linux:
[Code]
#!/bin/sh
Repos= "$"
Txn= "$"
Svnlook=/usr/bin/svnlook
# Check that logmessage contains at least alphanumeric characters
logmsg= ' $SVNLOOK log-t "$TXN" "$REPOS" | grep "[A-za-z0-9]" | Wc-c '
If ["$LOGMSG"-lt 10];
Then
Echo-e "/that logmessage contains at least alphanumeric. Commit aborted! " 1>&2
Exit 1
Fi[/code]
Pre-revprop-change.bat files under Windows System, as follows:: LOL
REM SVN pre-revprop-change Hook allows edit of logmessages from TSVN
setlocal
Set repos=%1
Set rev=%2
Set user=%3
Set propname=%4
Set action=%5
If not "%action%" = = "M" goto refuse
If not "%propname%" = "Svn:log" goto refuse
Goto OK
: Refuse
Echo Cann ' t set%propname%/%action%, only Svn:log are allowed 1>&2
endlocal
Exit 1
: O K
Endlocal
Exit 0