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

相关推荐
去旅行、在路上7 小时前
Git & Svn
git·svn
冰淇淋分你一半7 小时前
window查看SVN账号密码
svn
chilx4 天前
高效易用的 MAC 版 SVN 客户端:macSvn 使用体验
svn
Linux运维技术栈14 天前
从版本控制到协同开发:深度解析 Git、SVN 及现代工具链
git·svn
闲人一小枚21 天前
mac 10.15.7 svn安装
svn·mac
口嗨农民工24 天前
svn status . 命令返回分析
linux·svn
yuanbenshidiaos1 个月前
讲讲git 和svn
git·svn
梁萌1 个月前
Windows系统Jenkins企业级实战
运维·windows·ci/cd·svn·jenkins
阳光下的大嘴猴王1 个月前
SVN仓库突然没有权限访问
svn
EQ-雪梨蛋花汤1 个月前
【版本控制】SVN + TortoiseSVN版本管理实用教程(附安装+开发常用操作)
svn