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

相关推荐
云小逸20 小时前
【SVN 详细使用指南:从入门到团队协作】
c++·svn
曹牧19 天前
Eclipse:SVN 回复
java·svn·eclipse
NexTunnel21 天前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
鱼听禅22 天前
CentOS 源码模式配置SVNAdmin2管理SVN仓库
linux·svn·centos
_阿伟_24 天前
SVN简单使用教程
svn
NexTunnel24 天前
告别传统组网,也能安全访问公司 GitLab / SVN
安全·svn·gitlab
2601_961875241 个月前
花生十三公考课程|网课|视频
数据库·windows·git·svn·eclipse·github
2601_961875241 个月前
花生十三资料网盘|百度云|下载
数据库·windows·git·svn·eclipse·github
WSKH09292 个月前
【操作记录】Mac 系统安装并使用 SVN
macos·svn
不想努力只想躺平的菜鸟ing2 个月前
svn使用指南
svn