hgchart /

Filename Size Date modified Message
29 B
35.1 KB
1.2 KB
1.0 KB
4.6 KB
4.6 KB
463 B
.. -*- rst -*-

Statistics for Mercurial repositories

The hgchart script traverses the changeset graph and collects various


The hgchart script requires two command line arguments:

* path to a Mercurial repository.

* path to a configuration file. The syntax is YAML and it could look
  like this::

    - title: File size
      collector: Size
      aggregator: running_sum
      xlabel: Revision
      ylabel: Bytes
      output: bytes.png

    - title: Line count
      collector: Lines
      aggregator: running_sum
      xlabel: Revision
      ylabel: Lines
      output: lines.png

    - title: Functions
      collector: Grep
      aggregator: running_sum
      pattern: "^\\s*def .+\\("
      ylabel: Count
      output: functions.png

    - title: Changes per user
      collector: Churn
      aggregator: running_sum
      output: churn.png



  ./hgchart . hgchart.yaml


You need these Python libraries:

:progressbar: http://pypi.python.org/pypi/progressbar/
:PyYAML:      http://pyyaml.org/
:matplotlib:  http://matplotlib.sourceforge.net/