在hooks目录新建文件:post-commit,注意开头一行不要错。
#!/bin/sh
REPOS="$1"
REV="$2"
WEB_PATH="/www/oldef/src"
TEST_PATH="/www/oldef/test"
export LANG=zh_CN.UTF-8
CURDATE=`date`
#echo "Code Deployed By at $CURDATE" >> /www/svn/code_deploy_svn_log
/usr/bin/svn update --username pkd --password pankd /www/oldef/src >> /www/svn/code_deploy_svn_log
#ls /www/oldef/src >> /www/svn/code_deploy_svn_log