Windows 2003 上的最新 Mercurial 和 IIS

发布于 2024-12-07 04:04:31 字数 1320 浏览 0 评论 0原文

我没有让它工作:(

到目前为止我所做的:

安装:

-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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

潦草背影 2024-12-14 04:04:31

有许多关于在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文