Configure the mercurial under Windows2012

Source: Internet
Author: User
Tags mercurial

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 ()  
    • Note for line sixth: # Path to repo or Hgweb config to serve (see ' HG help Hgweb '), which 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;

    1. Modify the Apache configuration file http.conf, add a line at the end
SCRIPTALIAS/HG "c:/xampp/htdocs/hgweb/hgweb.cgi"  

    1. 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
    1. The contents of the Hgweb.config file are
[collections]   d:/hg= d:/hg     [web]  allow_push= false   Allow_pull= false   allow_read= false   Push_ssl= false   style = Gitweb
    1. 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.

    1. Htpasswd-c hguser fatkun.com  htpasswd hguser AAAA

You will get a hguser file and copy it to the Conf directory.

    1. At the end of the httpd.conf configuration, add
<Location/hg>       AuthType Basic       "mercurialrepositories"       authuserfile"d:/javasofttool/xampplite/apache/ Conf/hguser "       Require valid-user   </Location>   

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:

Build mercurial web versioning service using Apache in Windows

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.