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

相关推荐
小疙瘩2 天前
Windows 11 安装SVN 服务端和客户端
svn
长沙红胖子Qt6 天前
SVN培训笔记(三):使用sourceTree管理svn项目添加、修改、删除和下载指定版本操作
svn·sourcetree
长沙红胖子Qt10 天前
SVN培训笔记(二):使用sourceTree通过git桥接管理svn项目
git·svn·sourcetree·sourcetree管理svn
Snower_202210 天前
CentOS 7 搭建 SVN 服务器(精简版教程)
linux·运维·服务器·svn·centos
siqiangming12 天前
将SVN项目迁移到Git,保留提交记录
git·svn
小趴菜不能喝13 天前
Linux 搭建SVN服务
linux·运维·svn
在下小孙14 天前
Git与SVN常用指令
git·svn
Albert Edison19 天前
【Git】多人协作二(不同分支下)
git·elasticsearch·svn·github
秃秃秃秃哇19 天前
svn学习记录
svn
相偎20 天前
Ubuntu搭建svn服务器
服务器·ubuntu·svn