svn强制注释配置
来源:互联网 发布:手机淘宝店店招 编辑:程序博客网 时间:2024/06/06 19:50
为了方便项目人员管理开发,我们强制要求开发人员在提交svn代码的时候填写备注
1.找到SVN 服务端
2.mv pre-commit.tmpl pre-commit将代码仓库根目录下,hooks文件夹中的pre-commit.tmpl文件重命名为pre-commit
3.vi pre-commit
REPOS="$1" TXN="$2" # Make sure that the log message contains some text. SVNLOOK=/usr/bin/svnlook # 定义个变量,注意这里不是单引号 LOGMSG=`$SVNLOOK log -t $TXN $REPOS | wc -m` #把这一行和下面的一行注释掉 #$SVNLOOK log -t "$TXN" "$REPOS" | \ # grep "[a-zA-Z0-9]" > /dev/null || exit 1 #这里为什么是48呢,一个汉字对应16个字符 必须填四个汉字 if [ "$LOGMSG" -lt 48 ] then echo "\n至少输入4个汉字" >&2 exit 1 fi # Exit on all errors. #set -e # Check that the author of this commit has the rights to perform # the commit on the files and directories being modified. #"$REPOS"/hooks/commit-access-control.pl "$REPOS" $TXN \ //把这一行和下面的一行注释掉。 # "$REPOS"/hooks/commit-access-control.cfg # All checks passed, so allow the commit. exit 0
4.在hooks 文件下直接给pre-commit 增加加可执行权限chmod +x pre-commit
5.测试结果(注解低于四个字符或者null提示报错)
阅读全文
0 0
- svn强制注释配置
- 强制提交注释--SVN
- (转)SVN强制注释
- svn强制提交注释
- SVN提交,强制注释
- svn配置强制添加注释(windows版)
- SVN强制用户添加注释
- svn服务里强制注释
- svn强制要求提交注释
- svn提交强制写注释
- svn提交时强制注释
- SVN提交强制加入注释
- SVN提交代码强制注释
- svn文件提交时强制写注释
- 关于SVN提交强制加入注释
- 强制svn checkin时必须写注释
- svn强制注释for linux和Windows
- svn提交时强制添加注释
- LintCode-----15.全排列
- uploadify异步文件上传插件的用法
- 链表基本操作及面试题
- Android Studio HelloWorld
- HDU
- svn强制注释配置
- 《UNIX网络编程 卷2》 笔记: 简介
- CodeForces 664 C.International Olympiad(构造)
- 进程与线程
- JAVA中的权限修饰符
- 四大隔离机制
- lintcode 有效数字
- 华山论剑之jvm03 JVM 垃圾回收介绍
- ROS机器人研讨会课程资料