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

相关推荐
likuolei2 天前
Git 与 SVN 区别
git·svn
赵瓶子姑娘4 天前
【无标题】
svn
长沙红胖子Qt5 天前
关于 安装svn后不出现svn文件状态图标 的解决方法
svn·图标不显示
贝锐11 天前
私有代码仓库免费远程访问:VisualSVN+贝锐花生壳内网穿透教程
svn
龙泉寺天下行走13 天前
SVN冲突的解释
svn
逐风&者17 天前
windows SVN 修改提交作者、提交注释、提交日期
svn
rain bye bye17 天前
svn: E155000:
svn
浪潮IT馆17 天前
Alibaba Cloud Linux 3 安装 SVN
linux·运维·svn
逐风&者21 天前
centos7 部署和使用SVN
svn
编程学委21 天前
Idea(2023版)使用Svn
java·svn·intellij-idea