Windows 2003 上的最新 Mercurial 和 IIS
我没有让它工作:(
到目前为止我所做的:
安装:
-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 复制到该 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'
I don't get it working :(
What I did so far:
installed:
-tortoisehg-2.1.3-hg-1.9.2-x86.msi
-python-2.7.2.msi
-mercurial-1.9.2-x86.msi
My PATH Variable contains: D:\Program Files\TortoiseHg\;D:\Python27;
Created D:\MercurialWeb\ and set it up in IIS to run a test python cgi script.
In copied the templates directory from tortoiseHg to that web dir and extracted the library zip, too.
My hgweb.cgi looks like this:
#!/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
But if I open the Site I get this:
<type 'exceptions.ImportError'>: No module named mercurial
args = ('No module named mercurial',)
message = 'No module named mercurial'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有许多关于在 Windows Server 上设置 Mercurial 的不同博客,其中大多数都指定了特定的 Mercurial 版本(我见过的最高版本是 1.7)。
看看这个博客是否有帮助:http://hyperionchaos.net/blog
There are a number of different blogs about setting up Mercurial on Windows Server, and most of them specify a specific Mercurial version ( the hightest I've seen is 1.7 ).
See if this blog helps : http://hyperionchaos.net/blog