Source

hgchart /

Filename Size Date modified Message
29 B
34.3 KB
1.1 KB
1.0 KB
4.5 KB
4.5 KB
463 B
.. -*- rst -*-

Statistics for Mercurial repositories
=====================================

The hgchart script traverses the changeset graph and collects various
statistics.


Usage
-----

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

Example
-------

Run::

  ./hgchart . hgchart.yaml

Dependencies
------------

You need these Python libraries:

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