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

相关推荐
天府云创2 天前
Anthropic重做Git:Scion——Agent时代的版本管理系统
git·svn·版本控制·软件设计·迭代升级·scion
爱吃辣椒的小豆豆2 天前
Apache 日志轮转触发 SVN 更新异常
svn·apache
鶴哥只手遮天3 天前
Apache Subversion 1.15 源码深度剖析-第 3 章 文件系统层(FS 抽象与 FSFS 后端)
svn·开源
鶴哥只手遮天3 天前
Apache Subversion 1.15 源码深度剖析-第 6 章 工作副本:WC-NG 与 pristineless
svn·开源
解道Jdon5 天前
FigCraft把Figma用Rust从零重写了一遍
ide·windows·git·svn·eclipse·github·visual studio
Peter(阿斯拉)12 天前
[macOS Tahoe 26]_[使用SmartSVN访问库路径报错的问题]
macos·svn·tahoe·smartsvn·macos26
inferno14 天前
SVN学习笔记(二)
笔记·学习·svn
inferno16 天前
SVN服务端下载、安装与配置(Windows版)
svn
mhmh12316 天前
SVN 版本控制从入门到实战:安装、配置与日常使用指南
svn
inferno16 天前
SVN学习笔记(一)
笔记·学习·svn