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

相关推荐
Albert Edison2 天前
【Git】远程操作
git·svn·github
相逢太短,莫等茶凉3 天前
svn使用TortoiseSVN在非空目录下新建仓库
svn
bingquan33334 天前
SVN安装客户端-Tortoise SVN
svn
代衡_Monster4 天前
SVN安装后bin中没有svn.exe
svn
蒜丶7 天前
Windows 批量删除 .svn 隐藏文件
windows·svn
骁悦彬子8 天前
IntelliJ IDEA2025 版本控制(svn、git) 修改文件后,所属目录的颜色也变化
git·svn·intellij-idea
女程序猿!!!8 天前
SVN版本号
svn
✎ ﹏梦醒͜ღ҉繁华落℘9 天前
软件版本管理 SVN 和 Git
git·svn
梁萌9 天前
Jenkins构建的触发方式
运维·svn·gitlab·jenkins·webhook·job触发方式·自动触发构建
kangwq201712 天前
Ubuntu安装SVN
svn