mercurial - 通过VisualSVN服务器托管Mercurial HG

标签 mercurial hosting cgi visualsvn

我尝试使用Scriptalias托管Mercurial HG存储库。

ScriptAlias/hg/“htdocs/hgwebdir.cgi”

如果我转到Chrome,它将显示cgi文件的内容。在IE中,它会渲染,但是不会显示图像和链接。无论哪种情况,都不会显示我要显示的存储库。

有没有人设法使它与VisualSVN一起使用?如果我具有Windows身份验证和https,也可以使用吗?

最佳答案

这是使用mod_wsgi(快速!),组合的存储库目录的另一种设置,您可以从VisualSVN Server GUI管理Mercurial存储库级别的访问。

下载mod_wsgi.so for Apache 2.2 Win32并放置在“C:\Program Files\VisualSVN Server\bin”中。

将hgwebdir.wsgi从您的Mercurial安装目录(contrib目录)复制到“C:\Program Files\VisualSVN Server\”。它看起来应该像这样:

import sys
sys.path.insert(0, "C:\Program Files\Mercurial\library")
from mercurial.hgweb.hgwebdir_mod import hgwebdir
application = hgwebdir('hgweb.config')

创建配置文件“C:\Program Files\VisualSVN Server\hgweb.config”。
[paths]
/ = c:/Repositories/*

将以下内容粘贴到“C:\Program Files\VisualSVN Server\conf\httpd-custom.conf”中。您应该根据httpd.conf的部分调整Auth *值。
LoadModule wsgi_module bin/mod_wsgi.so
WSGIScriptAlias /hg "hgwebdir.wsgi"

<Location /hg/>
    AuthName "Mercurial Repositories"
    AuthType VisualSVN
    AuthzVisualSVNAccessFile "C:/Repositories/authz-windows"
    AuthnVisualSVNBasic on
    AuthnVisualSVNIntegrated off
    AuthnVisualSVNUPN Off

    SVNParentPath "C:/Repositories/"

    require valid-user
</Location>

创建一个Mercurial存储库:
hg init C:\Repositories\hgtest

现在,您应该能够通过浏览器访问/hg,并通过VisualSVN Server工具管理存储库级别的授权。

关于mercurial - 通过VisualSVN服务器托管Mercurial HG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2428870/

相关文章:

powershell - 为什么 Mercurial 忽略我在 Powershell 中提供的 repo 路径?

colors - mercurial 颜色扩展的有效颜色是什么?

node.js - 错误 : Invalid cache option true found. 应为 "memory"

python - 我需要一个 super 简单的 CGI Python 照片上传

perl - 如何在 Perl 和 FCGI 中设置 POST_MAX 限制

Python + CGI脚本无法访问环境变量

Mercurial 和 NTFS 备用数据流

version-control - 如何防止 Mercurial 补丁被拉出?

iOS In App 购买托管内容下载

apache - 多个域到一个虚拟主机 |通配符主机(共享主机)?