Aller au contenu | Aller au menu | Rechercher

Blog | Budget | Gallery | Ssh | Sys Info |

Mercurial HeadQuarter

About Mercurial HeadQuarter

Mercurial HeadQuarter is a web service to manage Mercurial repositories. It allows to:


Initial view

Repository list

Repository creation

Repository property edition

General configuration

User management


Source packages

Debian packages


To install Mercurial HeadQuarter, one need a functional Apache configuration with a decent PHP module enable and also a working Mercurial command.

There's two ways to install Mercurial and Mercurial HeadQuarter on a system which depend on your ability to modify Apache configuration.

Install with Apache configuration modifications

Install a Mercurial web service

One first need to change the ownership of the whole Mercurial tree to the Apache user (www-data on Debian system). Usually, this tree is located into /var/lib/hg, and this can be done with a simple shell command:

 chown -R www-data /var/lib/hg

Then, files hgweb.cgi and hgweb.config from directory hgweb need to be placed into Mercurial tree base, using such command:

 cp hgweb/hgweb.* /var/lib/hg

At last, Apache configuration file need to include apache-hg.conf and the authentication section need to be adapted.

Actually, it assumes that accounts are stored into the file /etc/mercurial/password and htpasswd is required to add a user:

 hgpasswd /etc/mercurial/password new_user password

LDAP authentication is also detailed in comments but it must be adapted to the local company LDAP server.

If the Mercurial tree base is not /var/lib/hg, the file hgweb.config and also the Apache configuration file needs to be adapted.

Install Mercurial HeadQuarter

To install Mercurial HeadQuarter, one need to copy, favicon.ico, func.php, index.html, script.js, and style.css to an Apache reachable directory (such as /usr/local/share/hghq) and modify the Apache configuration file to include apache-hghq.conf.

A makefile also can help to install properly files and documentation into local directories.

If the install location is not /usr/local/share/hghq, the Apache configuration file needs to be adapted.

Configuration Mercurial HeadQuarter

The configuration is set by

Install without any Apache configuration modification

In a readable and writable Apache director, one needs to copy, favicon.ico, func.php, index.html, script.js, and style.css. Then, open a web browser and go to the index.html, a tab named "config" will help you to configure a Mercurial web service:

A minimal apache configuration file shows which permission are needed assuming that hghq is installed in /usr/share/hghq and that mercurial root is /var/lib/hg. Default authentification is ensure by file and admin passsword is 'admin'.


  1. By default, all users can read a project but none can write on it
  2. Usually, one need to read and to write on a project, so one need to do same settings on allow_read and allow_push (respectively deny_read and deny_push).


HgHq 1.6 (Wed, 5 Sep 2012 23:40:07 +0200)

HgHq 1.4 (Tue, 26 Jun 2012 14:14:08 +0200)

HgHq 1.2 (Thu, 21 Jun 2012 17:58:48 +0200)

HgHq 1.0 (Fri Jun 15 17:23:36 2012 +0200)

Page créee/modifié le 5 septembre 2012.

Envoyez tout commentaire à Laurent Mazet

Ce site fonctionne avec des logiciels libres tels que Debian GNU/Linux, Apache, MySQL et PHP

Valid XHTML 1.1 Valid CSS!