First, be sure to double check hg activity --help, that's the main source of documentation


You may want to use your shell's alias system. For example I have the following aliases on my system.environment.

activity        hg activity --mode=gui

Integration with mercurial web interface

Thanks to one of our users Ton (#605), here is a quick howto for displaying the activity graph in the great web interface provided by mercurial.

This is for a typical installation using apache running hgwebdir.cgi, which references hgweb.config. You might need few adjustments if your configuration differs.

Add the following to the hgweb.config:

changegroup.activity = hg activity --filename /usr/share/mercurial/templates/static/activity/${PWD##*/}.png

Whenever one or more changesets are pushed to the repository, this hook is triggered.
It will then create an activity graph at /usr/share/mercurial/templates/static/activity/{reponame}.png

Template adjusting

Inside the template/static directory, add a folder 'activity' and gave your apache user (www-data, apache, apache2.. this depends on your distribution) read/write access to this folder.
Then, you need to load this image from one of the template page. For example, you can add it to the 'graph' page of the monoblue template by modifying monoblue/graph.tmpl this way:

<h2 class="no-link no-border">activity</h2>
<img src="{staticurl}activity/{repo}.png"/>

before the <h2 class="no-link no-border">graph</h2> line.

Updated by Thomas Capricelli over 4 years ago ยท 5 revisions