在Windows Machine中安装Mercurial Server-教程已过时 [英] Setup Mercurial Server in Windows Machine - Tutorials are outdated

查看:115
本文介绍了在Windows Machine中安装Mercurial Server-教程已过时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我指的是 HgWebDirStepByStep ,并尝试在Windows计算机中进行设置( Windows 7).

I am refering to HgWebDirStepByStep, and trying to setup it in Windows machine (Windows 7).

  1. 我无法再从,但是在最新的Mercurial安装中没有找到任何文件夹.我只能看到上面有一个zip文件.
  1. I can no longer download hgwebdir.cgi from http://www.mercurial-scm.org/repo/hg-stable/raw-file/tip/hgwebdir.cgi. The link is dead.
  2. I was told to modify hgwebdir.cgi content to sys.path.insert(0, "c:/dev/Mercurial/lib"), but I didn't found any folder in my latest Mercurial installation. I can only see there is a zip file on it.

似乎教程中的信息已经过时了.对我在Windows机器上设置Mercurial服务器有什么好的指导吗?由于服务器中已经有一个Apache,因此我想使用Apache而不是IIS.

Seems the information on the tutorial is pretty outdated. Any good guides for me to setup Mercurial server in Windows machine? As there is already an Apache in the server, I would like to make use of the Apache instead of IIS.

推荐答案

通过从各个角落收集信息位和字节,我想总结一下使用具有身份验证功能的Apache设置Mercurial Server的步骤.

By collecting information bits and bytes from every corners, I would like to summary the steps to setup mercurial server using Apache, with authentication feature.

我安装 mercurial -1.9.1.win-amd64-py2.6.exe

将以下内容添加到 C:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf

# Some comment so that you can find these settings later
ScriptAliasMatch ^/hg(.*) "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/hg/hgwebdir.cgi$1"
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/hg">
  Options ExecCGI FollowSymLinks
  AuthType Basic
  AuthName "AuthName for Mercurial"
  AuthUserFile "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/hg/passwd.txt"
  <Limit GET POST>
      require valid-user
  </Limit>
</Directory>


创建以下4个文件


Create the following 4 files

C:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ htdocs \ hg \ hgwebdir.cgi (从

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\hg\hgwebdir.cgi (Download from http://makinggames.ca/wp-content/uploads/2010/05/hgwebdir.txt and rename it to hgwebdir.cgi)

C:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ htdocs \ hg \ hgweb.config .

[paths]
dummy1 = d:/mercurial-repo/dummy1
dummy2 = d:/mercurial-repo/dummy2

c:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ htdocs \ hg \ passwd.txt (请参阅本指南 c:\ Program Files(x86)\ Apache Software Foundation \ Apache2.2 \ htdocs \ hg.htaccess (只需将文件留空)

在...中初始化存储库

Initialize repositories in

D:\mercurial-repo\dummy0
D:\mercurial-repo\dummy1

可以使用TortoiseHg,通过在文件夹 D:\ mercurial-repo \ dummy0 D:\ mercurial-repo \ dummy1上单击鼠标右键,在此处应用在此处创建存储库"来完成此操作.

This can be done using TortoiseHg, by applying "Create Repository Here", through right click on folder D:\mercurial-repo\dummy0 and D:\mercurial-repo\dummy1

通过http://your-server:81/hg/

这篇关于在Windows Machine中安装Mercurial Server-教程已过时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆