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

相关推荐
程序员瓜叔3 天前
基于SVN搭建企业内部知识库系统实践
svn·centos
huhy~3 天前
基于Centos7.9搭建svn服务端
svn
高旭的旭6 天前
Gitlab 配置自定义 clone 地址
svn·ssh·gitlab·code
白帽小野8 天前
SVN和Git两种版本管理系统对比
git·svn·版本控制系统
闲人一小枚13 天前
mac Monterey 安装svn(已解决)
macos·svn
Jsy05090620 天前
dvcs-ripper ---CTFHub技能树: SVN泄露
svn·小白·网安·信息搜集
长沙红胖子Qt21 天前
关于 svn无法查看下拉日志提示“要离线”和根目录看日志“no data” 的解决方法
svn·离线·nodata·日志查看失败
码事漫谈1 个月前
SVN 仓库迁移与清理指南:如何正确切换仓库并保持代码整洁
svn
天和地丰1 个月前
AAltium SVN Database Library 配置使用说明
数据库·嵌入式硬件·svn
我是李武涯2 个月前
svn与git Merge重要区别讲解
git·svn