This extension is not distributed with Mercurial.

This extension requires Mercurial 1.1 or newer.

Author: Brodie Rao

License: MIT



This extension allows central configuration of multiple repositories using a shared configuration file. Settings can then be applied to specific repositories or sets of repositories.


Configure your .hgrc to enable the extension by adding following lines:

reposettings = /path/to/

or place in your hgext directory and add the following lines:

reposettings =


Using this extension you can filter which global settings are applied to each repo or groups of repos and which ones are applied globally.

For example, you could tweak one of the global mercurial settings files (i.e. $HOME/.hgrc or /etc/mercurial/hgrc) like this:

base = /srv/hg

[ui path/to/repo]
contact = John Doe <>
description = Widget factory

[web path/to/repo path/to/another/repo]
allow_read = joe, jane

The path specified will match any repositories at or below that directory. Paths are parsed with a Unix shell-like syntax (using shlex), allowing escaped characters and quoted values.

Sections marked with "(global)" will have their settings added to repository-specific sections. So for example, given the following:

allow_read = admin

[web (global)]
allow_push = admin

[web path/to/repo]
allow_read = jack
allow_push = jack

The effective settings become:

[web path/to/repo]
allow_read = jack
allow_push = admin, jack

Note: This extension doesn't use hgwebdir's configuration file. If you're trying to apply settings to an hgwebdir instance, set HOME in the runner script and put your settings in $HOME/.hgrc.


ReposettingsExtension (last edited 2012-04-24 21:15:45 by ks3095497)