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

相关推荐
踏遍三十六岸17 小时前
SVN下载与拉取
svn
阳光开朗_大男孩儿14 天前
SVN上传代码
java·linux·服务器·svn
阳光开朗_大男孩儿14 天前
SVN 添加 .ignore
svn
搬码临时工17 天前
svn客户端使用教程简易入门:附外网远程访问内网SVN服务通用方法
svn
dyyshb19 天前
SVN迁移Git(保留历史提交记录)
git·svn
梦之翼61872020 天前
idea中配置svn及提交提示“未检测到更改”提示
java·svn·intellij-idea
Molike1 个月前
Linux Ubuntu安装SVN Server
svn
去旅行、在路上1 个月前
Git & Svn
git·svn
冰淇淋分你一半1 个月前
window查看SVN账号密码
svn
chilx1 个月前
高效易用的 MAC 版 SVN 客户端:macSvn 使用体验
svn