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添加文件,一次性添加脚本
svn
曹牧3 天前
Eclipse 中 SVN 操作指南
java·svn·eclipse
云霄IT3 天前
TortoiseSVN的Checkout下载太慢了解决办法
svn
阿萨德528号3 天前
Git 与 SVN 对比详解
git·svn
rain bye bye4 天前
SVN 某个用户 进项目需要常常输入密码
svn
写代码的【黑咖啡】5 天前
版本控制工具介绍及常用命令:Git 与 SVN 入门指南
git·svn
郁大锤6 天前
SVN 版本管理工具在 Windows 上的简单配置与使用
windows·svn
程序员允诺6 天前
SVN 入门与实战:从零开始掌握企业级版本控制
svn
jcsx6 天前
pycharm下新建一个项目并加入svn
svn·pycharm
阿杰同学9 天前
SVN 面试题及答案整理,最新面试题
svn