2011-09-28 36 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