pull/109/head
Mr Chen 6 years ago
parent a492d91421
commit 0e6c2e1be5
  1. 16
      plugins/csvn/hook/commit.tpl
  2. 5
      plugins/csvn/hook/post-commit.tpl
  3. 1
      plugins/csvn/index.py

@ -0,0 +1,16 @@
#!/bin/bash
REPOS="$1"
REV="$2"
TXN_NAME="$3"
WEB_PATH={$PROJECT_DIR}/wwwroot/$REPOS_NAME
SVN_PATH=http://127.0.0.1:{$PORT}/svn/$REPOS
if [ ! -d $WEB_PATH ]; then
svn co $SVN_PATH $WEB_PATH --username={$CSVN_USER} --password={$CSVN_PWD}
fi
cd $WEB_PATH && svn update --username={$CSVN_USER} --password={$CSVN_PWD}

@ -6,7 +6,6 @@ REPOS="$1"
REV="$2"
TXN_NAME="$3"
REPOS_NAME=${REPOS##*/}
WEB_DIR={$PRJOECT_DIR}/wwwroot/$REPOS_NAME
SVN_PATH=http://127.0.0.1:{$PORT}/svn/$REPOS_NAME
sh -x $REPOS/hooks/commit $REPOS_NAME $REV $TXN_NAME 2>$REPOS/sh.log

@ -528,6 +528,7 @@ def projectScriptLoad():
public.writeFile(pro_commit_file, content)
public.execShell('chmod 777 ' + pro_commit_file)
return 'ok'

Loading…
Cancel
Save