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

相关推荐
橘子☆心酸3 天前
Git 的自我修养
git·svn·gitee
7177774 天前
SVN 迁移到 Git 用什么工具:git-svn、svn2git 与平台化方案的取舍
git·svn
এ慕ོ冬℘゜1 个月前
Git 基础规范:小步提交、提交信息规范与常用命令
git·svn
zjx23881 个月前
批量删除.svn信息的Windows脚本
svn
এ慕ོ冬℘゜1 个月前
Git 基础入门|和 SVN 对比 + 四大区域 + 常用命令详解
git·svn
阿萨德528号1 个月前
IDEA 项目 SVN 配置消失、版本控制变成 Git 且无 VCS 菜单的解决办法
git·svn·intellij-idea
天府云创1 个月前
Anthropic重做Git:Scion——Agent时代的版本管理系统
git·svn·版本控制·软件设计·迭代升级·scion
爱吃辣椒的小豆豆1 个月前
Apache 日志轮转触发 SVN 更新异常
svn·apache
鶴哥只手遮天1 个月前
Apache Subversion 1.15 源码深度剖析-第 3 章 文件系统层(FS 抽象与 FSFS 后端)
svn·开源
鶴哥只手遮天1 个月前
Apache Subversion 1.15 源码深度剖析-第 6 章 工作副本:WC-NG 与 pristineless
svn·开源