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

相关推荐
前端啊龙2 天前
Git vs SVN 核心区别
git·svn
程序猿John2 天前
Linux下创建svn库 和 svn安装与操作
linux·运维·svn
H1346948903 天前
svn服务器数据备份,svn服务器数据备份的方法你会吗?
服务器·svn·负载均衡
困觉少年7 天前
我该怎么设置SVN客户端的认证信息?
svn
逍遥天下0078 天前
svn提交时候,要写注释
svn
涛ing9 天前
【Git “fetch“ 命令详解】
linux·c语言·c++·人工智能·git·vscode·svn
never_go_away9 天前
SVN server on ubuntu
linux·ubuntu·svn
Beyond欣11 天前
RepoReporter 仿照`TortoiseSVN`项目监视器,能够同时支持SVN和Git仓库
git·svn
努力的搬砖人.14 天前
SVN常用命令
java·后端·svn
Bulut090714 天前
版本控制工具SVN的基本使用
svn·版本控制工具·连接svn仓库·将代码提交到本地的svn·同步本地的svn