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 这个文件需要加读写权限!!!否则不生效

相关推荐
口嗨农民工1 天前
svn status . 命令返回分析
linux·svn
yuanbenshidiaos3 天前
讲讲git 和svn
git·svn
梁萌5 天前
Windows系统Jenkins企业级实战
运维·windows·ci/cd·svn·jenkins
阳光下的大嘴猴王17 天前
SVN仓库突然没有权限访问
svn
EQ-雪梨蛋花汤17 天前
【版本控制】SVN + TortoiseSVN版本管理实用教程(附安装+开发常用操作)
svn
limnade24 天前
版本控制利器——SVN简介
svn
前端啊龙1 个月前
Git vs SVN 核心区别
git·svn
程序猿John1 个月前
Linux下创建svn库 和 svn安装与操作
linux·运维·svn
H1346948901 个月前
svn服务器数据备份,svn服务器数据备份的方法你会吗?
服务器·svn·负载均衡
困觉少年1 个月前
我该怎么设置SVN客户端的认证信息?
svn