2011-09-28 63 views
0

我不明白它的工作:(最新的水银和IIS的Windows 2003

我做了什么至今:

安装:

-tortoisehg-2.1.3-HG-1.9。 2-x86.msi

-python-2.7.2.msi

-mercurial-1.9.2-x86.msi

我的道路Variab le包含:D:\ Program Files \ TortoiseHg \; D:\ Python27;

创建D:\ MercurialWeb \并在IIS中设置它以运行测试python cgi脚本。

将模板目录从tortoiseHg复制到该目录并提取了库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

有许多有关在Windows Server上设置Mercurial的不同博客,其中大多数博客指定了特定的Mercurial版本(最高的我见过我s 1.7)。
看看这个博客是否有帮助:http://hyperionchaos.net/blog

+0

感谢您的帖子。我尝试了这个和其他教程,但最终有一些更多的Python错误。我放弃它,并会坚持我的Ubuntu服务器,它运行良好,并在15分钟内成立;) – kannix