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

相关推荐
JAVA面经实录9173 天前
Java开发工程基础完整手册(企业实战完整版)
java·开发语言·git·ci/cd·svn·github·intellij idea
长沙红胖子Qt7 天前
SVN培训笔记(四):使用sourceTree时,PC硬盘或者移动硬盘更换电脑后sourceTree无法拉取同步和推送已有项目管理的处理方法
svn·sourcetree管理svn·sourcetree迁移git·git svn
金融小师妹8 天前
AI多因子定价模型:美元强化与能源约束下 黄金反弹受限弹性解析
深度学习·svn·逻辑回归·能源
Irene19919 天前
推荐 win11 可用的 SVN 版本:64位,下载最新的 TortoiseSVN 1.14.x 版本
svn
曹牧9 天前
SVN:“both sides of the move must be committed together”
svn
CDwenhuohuo9 天前
svn小乌龟汉化包下载实现
svn
dozenyaoyida12 天前
svn异常锁死处理方法
svn·svn异常·svn被锁·经验案例
金融小师妹13 天前
多因子情景推演模型:霍尔木兹扰动下的全球资产再定价与波动率重构
深度学习·svn·逻辑回归·能源
农村小镇哥16 天前
SVN介绍+使用文档教程
svn
曹牧16 天前
SVN:Checkout Depth
svn