October 31, 2008

Activity extension for mercurial

by orzel
Categories: Admin, Gentoo, KDE, Software
Tags: , ,
Comments: 8 Comments

example : activity of the mercurial "crew" repository

This is something i’ve really been missing for long in mercurial : a way to display the activity of a repository. No, ‘hg churn’ is not the right answer, I want an idea of when the peaks of development happened. So I have written this small extension. It is based on matplotlib, so you’ll need that to be installed. It is tested with mercurial 1.0.2 and the current development version of mercurial (so-called mercurial ‘crew’ repository). 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.

To use is, grab a copy :

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

and add a line in your ~/.hgrc under [extensions] with the full path to the activity.py (example on my computer, please adapt to your actual path:)

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

To use it, just do from inside a repository:

hg activity

The first example shows the activity for the mercurial.crew repository, and here’s another one representing the activity of the the ‘kdebase’ module from kde (I have a local mercurial mirror):

Activity of kdebase in the last month
Activity of kdebase during the last month

Homepage of the project: http://labs.freehackers.org/wiki/hgactivity