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

相关推荐
Jsy0509066 小时前
dvcs-ripper ---CTFHub技能树: SVN泄露
svn·小白·网安·信息搜集
长沙红胖子Qt15 小时前
关于 svn无法查看下拉日志提示“要离线”和根目录看日志“no data” 的解决方法
svn·离线·nodata·日志查看失败
码事漫谈12 天前
SVN 仓库迁移与清理指南:如何正确切换仓库并保持代码整洁
svn
天和地丰19 天前
AAltium SVN Database Library 配置使用说明
数据库·嵌入式硬件·svn
我是李武涯1 个月前
svn与git Merge重要区别讲解
git·svn
Ellie艾藜1 个月前
mac版SVN客户端
svn
向上的车轮1 个月前
SVN与GIT的区别,分别使用与哪些管理场景?
git·svn
猫头虎1 个月前
GitHub下载教程:2025年最新详解从GitHub上传、下载文件、子目录与完整项目【图文教程】
git·svn·gitee·开源·github·gitea·gitcode
巧~·1 个月前
Linux下SVN常用指令
linux·服务器·svn
梁萌1 个月前
svn如何设置忽略文件夹或者文件的提交
svn·ignore·自动忽略