-*- markdown -*-

# Mercurial for Gource

Producing repository log into the custom format
expected by [Gource](

Gource is a software version control visualization program.

## Method 1

Use, which stands alone.




- HG-ARGS are passed on to mercurial 'hg log' unmodified.
- OUTPUT_FILE is the output file for the custom log
- if OUTPUT_FILE is not provided, or '-', output to stdout
- '-' is required if using HG-ARGS to stdout

example usage with Gource (assuming that Gource is installed):

    ./ project.log && gource project.log


    ./ | gource --log-format custom -

but gource doesn't loop at the end when reading from stdin

    ./ -R ~/myrepo - | gource --log-format custom -

where -R is the mercurial option to set the repositiory root

This script should work for any mercurial repository (version number?),
The necessary style features appear to have introduced by mercurial 1.0

## Method 2

Add two lines to your .hgrc

    hgintdate = ~/path/to/

    gource = log --style /absolute/path/to/ -r 0:tip

You can then do

    hg gource > project.log
    hg gource | gource --log-format custom -

Additional options to log can be passed to the `hg gource` command.

### Variant A

Copy to your Mercurial templates directory as map-cmdline.gource, so you use `--style gource`

### Variant B

Remove `|intdate` (no need to install extension) from and just use sed

    hg gource | sed -E -e "s/\.[0-9+-]+//" | gource --log-format custom -