相关疑难解决方法(0)

IIS 7.5上的Mercurial和hgweb - python错误

我试图让Mercurial在IIS 7.5(Win 7 x64)上托管并继续遇到我似乎无法解决的错误.

我在这里关注了Jeremy Skinners教程:IIS7上的Mercurial

而不是hgwebdir,我使用hgweb,因为我正在使用Mercurial 1.7.2

我安装了python并正在工作.我在目录c:\ inetpub\wwwroot\hg中的http:// localhost/hg - >上为Mercurial设置了一个IIS应用程序

我将templates目录放入c:\ inetpub\wwwroot\hg我将library.zip文件解压缩到c:\ inetpub\wwwroot\hg

当我访问该网站时,我收到一个错误 - >文件"C:\ inetpub\wwwroot\hg\hgweb.cgi",第15行,来自mercurial import demandimport; demandimport.enable()ImportError:没有名为mercurial的模块".

在搜索此错误时,我找到了以下答案:https://stackoverflow.com/questions/2123798/

根据接受的答案,我改变了我的hgweb.cgi,看起来像这样:

#!c:/python/python26/python.exe
#
# An example hgweb CGI script, edit as necessary
# See also https://www.mercurial-scm.org/wiki/PublishingRepositories

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"

# Uncomment and adjust if Mercurial is not installed system-wide:
import sys; sys.path.insert(0, "c:\inetpub\wwwroot\hg")

# Uncomment to send python …
Run Code Online (Sandbox Code Playgroud)

python iis mercurial hgweb

9
推荐指数
1
解决办法
7012
查看次数

标签 统计

hgweb ×1

iis ×1

mercurial ×1

python ×1