本文介绍了在Windows Server 2008上设置Mercurial时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个Mercurial SC服务器,并一直按照此处的说明进行操作:http://stackoverflow.com/questions/818571/how-to-setup-mercurial-and-hgwebdir-on-iis

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.

推荐答案

在很长的一行中的追溯表明,在您的PYTHON_PATH中找不到汞.尝试按照 HgWebDirStopByStep 页上的步骤5.1进行操作,对hgwebdir.cgi进行编辑. >

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")

当然,将要插入的path元素调整为引用您的Mercurial库文件所在的位置.

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

这篇关于在Windows Server 2008上设置Mercurial时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:47
查看更多