我没有得到它的工作:(
到目前为止我做了什么:
安装:
-tortoisehg-2.1.3-HG-1.9.2-x86.msi
-python-2.7.2.msi
-mercurial-1.9.2-x86.msi
我的PATH变量包含:D:\ Program Files \ TortoiseHg \; D:\ Python27;
创建D:\ MercurialWeb \并在IIS中设置它以运行测试python cgi脚本。
将tortoiseHg中的templates目录复制到该web目录并提取库zip。
我的hgweb.cgi看起来像这样:
#!/usr/bin/env python
#
# An example hgweb CGI script, edit as necessary
# See also http://mercurial.selenic.com/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, "/path/to/python/lib")
# Uncomment to send python tracebacks to the browser if an error occurs:
import cgitb; cgitb.enable()
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)
hgweb.config
[paths]
MySourceCode = D:\MercurialRepos\**
[web]
style = monoblue
但如果我打开网站,我会得到这个:
<type 'exceptions.ImportError'>: No module named mercurial
args = ('No module named mercurial',)
message = 'No module named mercurial'
答案 0 :(得分:0)
关于在Windows Server上设置Mercurial有很多不同的博客,其中大多数都指定了特定的Mercurial版本(我见过的最高版本是1.7)。 看看此博客是否有帮助:http://hyperionchaos.net/blog