SVN限制Message提交的格式

限制Message提交的格式必须为以下格式

[Version]

[Description]

[TPA]

[Doors]

bash 复制代码
REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
MSG=`$SVNLOOK log -t "$TXN" "$REPOS"`

if [[ $MSG =~ ^\[Version\].*\[Description\].*\[TPA\].*\[Doors\].* ]]; then
  exit 0
else
  echo -e "Message format error, please standardize the message format!"  1>&2
  exit 1
fi

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.

# All checks passed, so allow the commit.
exit 0

pre-commit 这个文件需要加读写权限!!!否则不生效

相关推荐
彬sir哥1 天前
SVN把英文换中文
svn·中文
彬sir哥2 天前
Cannot import to svn: ‘C:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
svn·android studio
好大个bug解决不了9 天前
【SVN基础】
svn
Jack Sparrow丶9 天前
麒麟系统离线安装SVN
svn
沐沐森的故事10 天前
Unity与SVN集成:实现高效版本控制
unity·svn·游戏引擎·提交·process·sliksvn·检出
黑客呀15 天前
Linux下安装SVN服务端小白教程
安全·web安全·svn
H.2025 天前
centos7安装SVN
svn
zhuangzhunag1 个月前
svn diff 同一个文件的不同版本命令
svn
null or notnull1 个月前
IDEA2020同时使用SVN和GIT
ide·svn·gitee·github
look_outs1 个月前
SVN客户端使用手册
svn