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

相关推荐
金融小师妹6 小时前
基于多因子流动性模型的“黄金闪崩”解析:利率预期强化与资金再平衡驱动的金价8%下跌机制
大数据·人工智能·svn·能源
金融小师妹8 小时前
基于多因子定价模型解析:美元强势与利率预期重构驱动的金价8连跌机制
大数据·人工智能·svn·能源
shughui3 天前
SVN 下载+安装+汉化+使用全教程(附安装包详细图文)
svn
猿小路4 天前
SVN安装及IDEA集成详细使用教程
java·svn·intellij-idea
Liu.7745 天前
vscode使用git和svn
git·vscode·svn
苦逼IT运维6 天前
SVN 仓库目录迁移,仓库 “降级” 成子目录实战
linux·运维·ci/cd·svn·运维开发
企鹅郁金香7 天前
Gitlab和Confluence和Svn的备份
svn·gitlab·confluence·gitlab备份·svn备份·confluence备份
阿萨德528号8 天前
SVN提交报错“Unable to create pristine install stream“解决方案
svn
云中飞鸿8 天前
git、svn;TortoiseGit、TortoiseSVN;gitlab、github、bitbucket、bamboo有什么关系?
git·svn·gitlab
谁动了我的代码?10 天前
VNC中使用QT的GDB调试,触发断点时与界面窗口交互导致整个VNC冻结
开发语言·qt·svn