This is an extension for the mercurial source control management, which creates an image file displaying the activity of a repository. The activity is a rough estimates of when has the developement happened ?

Currently, hgactivity uses the number of commits to display such an activity. We expect to add an option to use the number of modified/removed/added lines instead.

As an example, here is the activity for the different commiters (only the top 5 are displayed in the legend) on the mercurial repository itself :

And another one with the global activity for the repository:

You can find a lot of others on the gallery

Where to get it ?

Grag the last official release from the files tab at the top of the page

If you want to use the very latest source (less tested, but quite probably safe enough to use), you can either clone it using:

hg clone http://sources.freehackers.org/hg.cgi/Hgactivity/

or grab a tarball (zip, bz2, tar.gz, ...) of the latest source at the top of the mercurial page : http://sources.freehackers.org/hg.cgi/Hgactivity/

Installation

Be sure to have matplotlib installed, check your distribution tools for this.
Then you need to extract the source somewhere (in my setup i use ~/hg/hgactivity/) and to tell mercurial about it, by adding a line like this one to ~/.hgrc:

activity=/home/orzel/hg/hgactivity/activity.py

(use your actual path to the file, of course)

Usage

Go to some mercurial repository, and type hg activity, example:

orzel@berlioz orzel/hg/hgactivity% hg activity
There are 11 changesets
Created the file 'activity.png'

Then, you may want to use your shell's alias system. For example I have an alias 'activity' that does:

hg activity --splitauthors --maxauthors 5 --width 1500 --height 900 && xv activity.png

Compatibility

It is always tested with the latest mercurial version (currently 1.4). It probably works with most 1.x versions.
I’m a big fan of this kind of information, and I’m sure to use this extension regularly, so you can count on it being maintained.

mercurial.global.png (50.9 KB) Thomas Capricelli, 06/15/2009 01:59 am

mercurial.png (125 KB) Thomas Capricelli, 06/15/2009 02:01 am

Also available in: HTML TXT