This operation needs to modify a hook file in the repository, there is a hooks folder in the repository you created, and at the beginning there is a file called Pre-commit.tmpl
Modify it to pre-commit.bat under windows and change it to Pre-commit under Linux
Under Linux (the file name is: Pre-commit, placed in the repository's/hooks directory)
==========================================================
#!/bin/sh
Repos= "$"
Txn= "$"
Svnlook=/usr/bin/svnlook
# Check this 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 "/nempty log message not allowed. Commit aborted! " 1>&2
Exit 1
Fi
Under Windows (Save to Hooks folder under Repository/hooks/pri-commit.bat)
=================================================================
@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 You must enter at least 5 characters! 1>&2
Exit 1
Force write comment When SVN file is submitted