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

相关推荐
peaceLT3 天前
【SVN】一文读懂Subversion(SVN)
svn
程序人生5185 天前
TortoiseSVN提交时忽略某些文件夹,不让它在提交列表中出现
svn
Casual_15736 天前
SVN 迁移到 GIT,并保留提交记录
git·svn
△曉風殘月〆9 天前
解决SVN蓝色问号的问题
运维·服务器·svn
前端开发菜鸟的自我修养12 天前
HTML5 Video标签的属性、方法和事件汇总,以及常用视频插件推荐
前端·javascript·svn·html·音视频·html5·video-codec
24203014 天前
SVN笔记-SVN安装
svn
baowxz16 天前
svn回退到以前历史版本修改并上传
svn·回退到历史版本·修改并上传·回退到以前版本
吴半杯18 天前
Docker安装SVN,搭建自己的本地版本仓库
docker·svn·容器
王夏奇22 天前
SVN的使用技巧
svn
taozi_518825 天前
码云中只用svn
svn