Required installation files:
- Xampp-win32-1.8.3-4-vc11-installer.exe
- Python-2.7.7.amd64.msi
- Tortoisehg-3.0.1-x64.msi
- Mercurial-3.0.1.win-amd64-py2.7.exe
- Mercurial-3.0.1-x64.msi
- Server-jre-8u5-windows-x64.tar.gz
1. Use TORTOISEHG to build a repository: Under D: Create Hg folder, make D:\HG, right click, select Tortoisehg | Create Repository here.
2. Create a folder under C:\xampp\htdocs, Hgweb
3. Create the hgweb.cgi file in C:\xampp\htdocs\hgweb, as follows (the latest content can be found http://www.selenic.com/hg/file/tip/hgweb.cgi ):
- Change the first line to point to the Python.exe position
#! C:/python26/python.exe
- Remove the comment from line tenth
IMPORTCGITB; Cgitb.enable ()
- The comment for line six: # Path to repo or Hgweb config to serve (see ' HG help Hgweb '), means that the config variable can point to the repository or to a configuration file. Start with a simple point, point to the warehouse, and change line seventh to
Config= "D:/HG"
- Install Mercurial-3.0.1.win-amd64-py2.7.exe, display installed in C:\Program files\lib\site-packages, will
Importsys; Sys.path.insert (0, "C:/xampp/mlib")
Switch
Importsys; Sys.path.insert (0, "c:/python26/lib/site-packages")
- Modify the Apache configuration file http.conf, add a line at the end
SCRIPTALIAS/HG "c:/xampp/htdocs/hgweb/hgweb.cgi"
- However, you can access only one library, you want to access multiple libraries, you need to use the Hgweb.config file, hgweb.cgi config variable is assigned to Hgweb.config
<span style= "White-space:pre" ></span>config= "Hgweb.config"
- The contents of the Hgweb.config file are
- Create a user password file with Htpasswd.exe. Htpasswd.exe can be found in the Apache Bin directory, using methods mainly
- HTPASSWD-C file name username//parameter-C Create password file, input will prompt you to enter the password
- HTPASSWD file name username//Update password if user name is the same
For instance, I'm going to build two users now.
Htpasswd-c hguser Fatkun.comhtpasswdhguser AAAA
You will get a hguser file and copy it to the Conf directory.
- At the end of the httpd.conf configuration, add
In addition to extracting server-jre-8u5-windows-x64.tar.gz files, plus java_home, path and other environment variables xampp in the Tomcat will not start, you need to the registry Hkey_local_ Machine\software\javasoft\javaRuntime environment\ Add
Javahome REG_SZ C:\JAVA
Reference files:
in Windows using Apache Build Mercurial WEB Version Control Services
Mercurial (HG) version Control service user name verification
Apache Build Mercurial (HG) version control services and permissions control
JDK and JRE in the Java Configuration environment