【问题标题】:Error setting up Mercurial on Windows Server 2008在 Windows Server 2008 上设置 Mercurial 时出错
【发布时间】:2011-01-08 14:09:38
【问题描述】:

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

我已多次检查所有设置,完成配置后似乎无法通过此错误。 任何建议都会有所帮助。谢谢。

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 mercurial windows-server-2008


    【解决方案1】:

    很长的一行中的回溯表明在您的 PYTHON_PATH 中找不到 mercurial。尝试从HgWebDirStopByStep 页面进行 hgwebdir.cgi 编辑,如步骤 5.1 所示。

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

    当然,插入的路径元素会调整为引用您的 mercurial 库文件所在的位置。

    【讨论】:

    • 我安装了 mercurrail 1.4.2 并且可以从我的命令行运行它。我在 IIS 中注册了 cgi 和虚拟目录,并完全按照说明进行操作……还有其他建议吗?
    • 我调整了答案,包括将 mercurial 库文件的路径显式添加到 .cgi。
    猜你喜欢
    • 2011-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-24
    • 2010-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多