2009-10-28 106 views
2

我已經在Windows上設置了我的Subversion/trac環境(現在Win7,以前曾在Vista上試用過),並且所有工作都完美無缺。但是我無法讓我的提交後工作。 這裏的(使用的VisualSVN和Trac在Apache上運行)的設置:TortoiseSVN永遠不會運行post-commit.bat

C:\用戶\馬丁\庫\ test_svn \鉤:

後commit.bat:

call %~dp0\trac-post-commit-hook.cmd %1 %2 

TRAC-的post-commit-hook.cmd:

@ECHO OFF 
:: 
:: Trac post-commit-hook script for Windows 
:: 
:: Contributed by markus, modified by cboos. 

:: Usage: 
:: 
:: 1) Insert the following line in your post-commit.bat script 
:: 
:: call %~dp0\trac-post-commit-hook.cmd %1 %2 
:: 
:: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV 


:: ---------------------------------------------------------- 
:: Modify paths here: 

:: -- this one *must* be set 
SET TRAC_ENV=C:\Users\Martin\Trac\test_svn 

:: -- set if Python is not in the system path 
SET PYTHON_PATH= 

:: -- set to the folder containing trac/ if installed in a non-standard location 
SET TRAC_PATH= 
:: ---------------------------------------------------------- 

:: Do not execute hook if trac environment does not exist 
IF NOT EXIST %TRAC_ENV% GOTO :EOF 

set PATH=%PYTHON_PATH%;%PATH% 
set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH% 

SET REV=%2 

Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%" 

TRAC - 後提交鉤:

http://trac.edgewall.org/browser/branches/0.11-stable/contrib/trac-post-commit-hook

抓起我曾經在一個cmd窗口測試腳本和他們工作的所有道路。但是在TortoiseSVN提交中,沒有任何反應,這讓我相信Tortoise從不運行post-commit.bat。

我也測試了一個簡單的預先提交,並且工作。 奇怪的是,它已經工作過,但我想我使用了早期版本的VisualSVN。

有沒有人知道這裏發生了什麼?

非常感謝! /Martin

回答

2

提交後掛鉤是運行服務器端。如果鉤子正確實現,它應該適用於任何Subversion客戶端。你會想看看SVN書中的this chapter

後續行動:您可以查看this博客條目。

+0

那麼你建議的是它是一個權限問題?我已檢查所有權限,但所有權限均爲SYSTEM,本地用戶和管理員擁有完全控制權限。 感謝您花時間在此! – mistalaba 2009-11-13 05:59:41

+0

您可以使用TortoiseSVN(現在)完成客戶端掛鉤腳本。 – blizpasta 2011-03-01 08:10:39