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 天前
day23_密码加密 前端验证码 监听器 svn版本控制
前端·svn
itas1095 天前
软件项目管理工具
git·svn·项目管理
jingshaoyou8 天前
ubuntu 搭建SVN服务器
服务器·ubuntu·svn
口嗨农民工11 天前
svn 回退某个文件进行上传
svn
口嗨农民工15 天前
SVN冲突处理相关,标识 C 语言源文件(.c)的不同版本或冲突状态
c语言·svn
默默coding的程序猿18 天前
3.git的分支携带问题是什么?怎么解决?
java·git·python·svn·gitee·github·intellij-idea
摇滚侠20 天前
Eclipse MyEclipse MyEclipseCI 安装SVN插件及使用说明
svn·eclipse·myeclipse
rain bye bye1 个月前
SVN ? ! 的解决
svn
weixin_7714323111 个月前
SVN 主分支合并之通过主分支合并子分支操作流程
svn