提交注释

在库目录下面的
hooks目录下面建立
pre-commit.bat文件
@echo off
set SVN_BINDIR="C:\Program Files\Subversion\bin"
setlocal
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 10 characters
%SVN_BINDIR%\svnlook log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
if %errorlevel% gtr 0 goto err
exit 0
:err
echo "input" 1>&2
exit 1

中文说明
在apache的http.conf中的svn配置加上

AddDefaultCharset utf-8

<Location /svn/>
DAV svn
SVNListParentPath on
SVNParentPath D:/svn_rep
AuthzSVNAccessFile D:/svn_auth/access.conf
Satisfy Any
Require valid-user
AuthType Basic
AuthName "input password"
AuthUserFile D:/svn_auth/passwd.conf
AddDefaultCharset utf-8
</Location>

pre-commit.bat内容
@echo off
set SVN_BINDIR="C:\Program Files\Subversion\bin"
setlocal
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 10 characters
%SVN_BINDIR%\svnlook log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
if %errorlevel% gtr 0 goto err
exit 0
:err
echo "请输入注释!" 1>&2
exit 1
bat保存的编码格式,网上说也要设置为utf-8,但是我设置为utf-8就乱码,设置成ansi就不会,不知道肿么回事

你可能感兴趣的:(注释)