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

相关推荐
菩提小狗19 天前
第7天:信息打点-资产泄漏&CMS识别&Git监控&SVN&DS_Store&备份|【小迪安全】web安全|渗透测试|网络安全-2021
git·安全·svn
人间打气筒(Ada)20 天前
代码版本控制系统变更
git·svn·云计算·gitlab·ci·cd·代码变更
恬静的小魔龙24 天前
【群晖Nas】群晖Nas中实现SVN Server功能、Docker/ContainerManager等
docker·svn·容器
技术策划Boring1 个月前
什么是 SVN Blame 以及如何使用
svn
小疙瘩1 个月前
Windows 11 安装SVN 服务端和客户端
svn
长沙红胖子Qt1 个月前
SVN培训笔记(三):使用sourceTree管理svn项目添加、修改、删除和下载指定版本操作
svn·sourcetree
长沙红胖子Qt1 个月前
SVN培训笔记(二):使用sourceTree通过git桥接管理svn项目
git·svn·sourcetree·sourcetree管理svn
Snower_20221 个月前
CentOS 7 搭建 SVN 服务器(精简版教程)
linux·运维·服务器·svn·centos
siqiangming1 个月前
将SVN项目迁移到Git,保留提交记录
git·svn
小趴菜不能喝1 个月前
Linux 搭建SVN服务
linux·运维·svn