svn杂记

chmod +x hooks/pre-commit

svn强制要求填写注释

./hooks/pre-commit

REPOS="$1"
TXN="$2"

SVNLOOK=/usr/bin/svnlook

LOGMSG=`$SVNLOOK log -t $TXN $REPOS | wc -m`
if [ "$LOGMSG" -lt 48 ]
then
	echo "\n至少输入4个汉字" >&2
	exit 1
fi
exit 0

svn自动加版本号

enable-auto-props = yes
[auto-props]
*.php = svn:keywords=Date Author Id Revision HeadURL
*.css = svn:keywords=Date Author Id Revision HeadURL
*.html = svn:keywords=Date Author Id Revision HeadURL
*.js = svn:keywords=Date Author Id Revision HeadURL

svn同步到web目录

svn co file:///var/www/svn/sandbox /var/www/html/
#./hooks/pre-commit
svn up /var/www/html/

标签: none

仅有一条评论

  1. 尼玛,叫你搞同步,你来搞教程了。。。

添加新评论