Version 4 (modified by Martin Vejnár, 8 years ago) (diff)


Integrate a directory of Mercurial repositories


Allows one to add a whole directory of Mercurial repositories to Trac. Also adds the optional ability to create and delete repositories.

The plugin requires Trac-0.12 (which supports multiple repositories).

Bugs/Feature Requests

Existing bugs and feature requests for HgDirManagerPlugin are here.

If you have any issues, create a new ticket.

Download and Install

You will have to download and install TracMercurial first.

Once that's done, checkout the sources for the HgDirManager plugin from the repository. Use the setup script to create an egg, which you can then copy to the plugin directory in your Trac environment.

hg clone
cd trac-hgdirmanager
python ./ bdist_egg


Add the following to your trac.ini.

base_path = /path/to/hg/repos
recurse = False
url_prefix = http://base/url/where/repos/are/mapped

You'll then see all Mercurial repos in base_path in the Trac's source browser.

Users that have REPO_CREATE privilege can create new repositories in that path by navigating to /newhgrepo page (you can add a link to your WikiStart page for example).

You can give users the REPO_DELETE privilege, which will allow them to delete empty repositories (navigate to /deletehgrepo/name-of-repo).

In the unlikely case you want to give your users the ability to irreversibly delete non-empty repositories, give them both REPO_DELETE and REPO_DELETE_NONEMPTY privileges.


Author: avakar
Maintainer: avakar