Setup Mercurial Server in Windows Machine - Tutorials are outdated
Solution 1
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.
I install mercurial-1.9.1.win-amd64-py2.6.exe
Add the following content to 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>
Create the following 4 files
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 with the following content.
[paths]
dummy1 = d:/mercurial-repo/dummy1
dummy2 = d:/mercurial-repo/dummy2
c:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\hg\passwd.txt (Refer to this guide http://sniptools.com/vault/windows-apache-and-htaccess-authentication)
c:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\hg.htaccess (Just leave the file empty)
Initialize repositories in
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
Access the mercurial through http://your-server:81/hg/
Solution 2
You can try HgLab - a source control management system for and Mercurial Server for Windows with push, pull and streaming capabilities, repository browser, Active Directory integration, ACLs and lots of other things.
Solution 3
I have used this article to setup a mercurial server on IIS http://www.eworldui.net/blog/post/2010/04/08/Setting-up-Mercurial-server-in-IIS7-using-a-ISAPI-module.aspx
Lumii
WeNote - Notes, To-do lists, Reminders & Calendar JStock Android JStock - Free Stock Market Software WeFocus - Focus, Pomodoro, Do one thing at a time
Updated on June 04, 2022Comments
-
Lumii about 2 years
I am refering to HgWebDirStepByStep, and trying to setup it in Windows machine (Windows 7).
- 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.
- I was told to modify
hgwebdir.cgi
content tosys.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.
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.
-
Lumii almost 13 yearsSorry. I prefer to have Apache.
-
Warren P almost 11 yearsNifty. It uses HgSharp and IIS and does not even use regular Python. I am a bit suspicious of a Python-free mercurial. Anybody used this?
-
Warren P almost 11 yearsApache is a better choice for Python based software, even on Windows.
-
Dovi almost 11 years@WarrenP HgLab/HgSharp author here. I can say that we've been using HgLab internally for almost a year now and never experienced data loss or corruption of any kind.
-
Warren P almost 11 yearsWow cool. Given how hard it is to set up the Apache+Regular CPython+Mercurial on windows, this is a great idea. :-)