Skip to content

Instantly share code, notes, and snippets.

@snim2
Created August 28, 2011 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snim2/1176813 to your computer and use it in GitHub Desktop.
Save snim2/1176813 to your computer and use it in GitHub Desktop.
Simple BASH script to generate statistics from a Mercurial branch. Uses activity 1.2
#!/bin/bash
#
# Simple script to generate statistics from a Mercurial branch.
#
# Sarah Mount s.mount@wlv.ac.uk
#
MONTH=`date "+%B%Y"`
echo $MONTH
FILENAME_AUTHOR="Activity-$MONTH-Authors.png"
FILENAME_ALL="Activity-$MONTH-Overview.png"
echo Creating $FILENAME_AUTHOR ...
hg activity --datemin `date "+%Y-%m-01"` --datemax `date "+%Y-%m-31"` --maxauthors 100 --skipmerges --splitauthors -o $FILENAME_AUTHOR
echo Creating $FILENAME_ALL ...
hg activity --datemin `date "+%Y-%m-01"` --datemax `date "+%Y-%m-31"` --maxauthors 100 --skipmerges -o $FILENAME_ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment