2010-01-23 27 views
5

我想設置一個Mercurial SC服務器並一直遵循以下指示信息:http // stackoverflow.com/questions/818571/how-to-setup-mercurial-and- hgwebdir-on-iis在Windows Server 2008上設置Mercurial時出錯

我已多次檢查了所有設置,並且在完成配置後似乎無法通過此錯誤。 任何建議都會有幫助。謝謝。

Server Error in Application "DEFAULT WEB SITE/HG"Internet Information Services 7.5 

Error Summary 
HTTP Error 502.2 - Bad Gateway 
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Traceback (most recent call last): File "C:\inetpub\hgcgi\hgwebdir.cgi", line 12, in <module> from mercurial import demandimport; demandimport.enable() ImportError: No module named mercurial ". Detailed Error InformationModule CgiModule 
Notification ExecuteRequestHandler 
Handler Python 2.5 
**Error Code 0x00000001** 
Requested URL http://localhost:80/hg/hgwebdir.cgi 
Physical Path C:\inetpub\hgcgi\hgwebdir.cgi 
Logon Method Anonymous 
Logon User Anonymous 
Most likely causes: 
The CGI process was shut down or terminated unexpectedly before it finished processing the request. 
The CGI process has a flaw and does not return a complete set of HTTP headers. 
Things you can try: 
Check the event logs on the system to see whether the CGI process is shutting down unexpectedly. 
Troubleshoot the CGI application to determine why it is not sending a complete set of HTTP headers. 

回答

6

在很長的行回溯說,Mercurial是不是在你的PYTHON_PATH找到。嘗試進行hgwebdir.cgi編輯,如HgWebDirStopByStep頁面的步驟5.1所示。

# adjust python path if not a system-wide install: 
import sys 
sys.path.insert(0, "c:/dev/Mercurial/lib") 

其中,當然,這是插入路徑元素被調整爲引用您的地方善變的庫文件。

+0

我已經安裝了mercurail 1.4.2並且可以從我的命令行運行它。我有cgi和虛擬目錄在IIS中註冊,並遵循指示徹底......任何其他建議? – amadib

+0

我調整了答案,包括明確地將汞文庫文件的路徑添加到.cgi。 –

+0

謝謝。它修正了:) – amadib

相關問題