Error setting up Mercurial on Windows Server 2008

那年仲夏 提交于 2019-12-18 05:02:55

问题


I want to set up a Mercurial SC server and have been following the instructions found here: http//stackoverflow.com/questions/818571/how-to-setup-mercurial-and-hgwebdir-on-iis

I have checked all my settings multiple times and cannot seem to get passed this error after completing the configuration. Any advice would be helpful. Thank you.

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. 

回答1:


The traceback in the very long line says that mercurial isn't found in your PYTHON_PATH. Try making the hgwebdir.cgi edit as seen in step 5.1 from the HgWebDirStopByStep page.

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

Where, of course, the path element that's being inserted is adjusted to reference wherever your mercurial library files are.



来源:https://stackoverflow.com/questions/2123798/error-setting-up-mercurial-on-windows-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!