开发者

latest Mercurial and IIS on Windows 2003

开发者 https://www.devze.com 2023-04-09 05:25 出处:网络
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

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'


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号