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

相关推荐
重生之我来学Python2 天前
Git-SVN 混合开发,从入门到精通!
开发语言·git·svn·github
青禾8372 天前
Git 与 SVN 完全指南:从集中式到分布式的版本控制
分布式·git·svn
是乐乐啊呀3 天前
版本控制 GIT 和 SVN
git·svn
page_qiu6 天前
jekins 完整部署详细流程(集成 SVN 源码管理 + Maven 打包 + Jar 程序自动部署)
svn·maven·jar
aXin_ya10 天前
SVN使用
svn
EXI-小洲16 天前
Pycharm 使用SVN进行拉取或提交 - SVN基本使用
svn·pycharm·版本控制
EXI-小洲17 天前
MacOS IDEA将本地项目代码上传至SVN空仓库
macos·svn·intellij-idea
▍ 小太阳 ☼1 个月前
如何让Codex读svn项目
svn·chatgpt
云小逸1 个月前
【SVN 详细使用指南:从入门到团队协作】
c++·svn
曹牧2 个月前
Eclipse:SVN 回复
java·svn·eclipse