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

相关推荐
NexTunnel6 小时前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
鱼听禅1 天前
CentOS 源码模式配置SVNAdmin2管理SVN仓库
linux·svn·centos
_阿伟_3 天前
SVN简单使用教程
svn
NexTunnel3 天前
告别传统组网,也能安全访问公司 GitLab / SVN
安全·svn·gitlab
2601_9618752421 天前
花生十三公考课程|网课|视频
数据库·windows·git·svn·eclipse·github
2601_9618752421 天前
花生十三资料网盘|百度云|下载
数据库·windows·git·svn·eclipse·github
WSKH09291 个月前
【操作记录】Mac 系统安装并使用 SVN
macos·svn
不想努力只想躺平的菜鸟ing1 个月前
svn使用指南
svn
佛山个人技术开发1 个月前
GitCode个人技术开发者总结完整使用指南
windows·git·svn·github·gitcode
深度学习04071 个月前
SVN 独立服务端部署与客户端使用指南(CentOS/Rocky 9.5 + Windows)
windows·svn