/vcsstat.sh

A Bash script to list additions and deletions of repositories

Primary LanguageShellMIT LicenseMIT

vcsstat.sh

A Bash script to list numbers of additions, deletions, and commits of repositories.

[TOC]

Installation

By default, to install to /usr/local, run:

$ make install

Or to /usr:

$ make install PREFIX=/usr

Or to your home:

$ make install PREFIX=$HOME

To uninstall, use uninstall target with PREFIX if supplied during installation.

Usage

vcsstat.sh [options] [''|AUTHOR_NAME [''|HG_DATESPEC [''|GIT_SINCE [''|GIT_UNTIL]]]]

Every argument is basically optional, however you need to use '' to indicate that you are not specifying it.

Options

-c:       Commit calendar mode
-p:       Punchcard mode
-x:       Output additions/deletions/commits in CSV format
-C:       Do not color output
-U:       Do not use Unicode (only for -c and implies -C)
-Z:       Filter out repo with no changes
-m:       Week starts with Mondays

HG_DATESPEC Examples

"2011-08"
"2011-01 to 2011-03" # Jan. to Mar. in 2011
">2011-05"           # Since May.
"-3"                 # Last three days

See man hg for DATE FORMATS section.

GIT_SINCE and GIT_UNTIL Examples

"2011-01-23"
"yesterday"
"2 weeks ago"

See..., uhm I have no idea where to look at. man gitrevisions for date specification, perhaps?

Examples

Listing

vcsstat.sh -Z $USER '>2011' 2011

output

Calendar mode

vcsstat.sh -c $USER '>2011' 2011

calendar with color

Calendar mode without color

vcsstat.sh -c -C $USER '>2011' 2011

calendar without color

Calendar mode without Unicode

vcsstat.sh -c -U $USER '>2011' 2011

calendar without Unicode

Punchcard mode

punchcard

CSV output

vcsstat.sh -x $USER '>2011' 2011

Type,Repository,Additions,Deletions,Commits
Git,KLTT,361,108,12
Git,agileshare,1988,19,9
Hg,yjl,4342,21356,153
Hg,yjlwiki,2885,2503,16
TOTAL,,63650,49760,959

Fun with gitfiti

Graffiti in Git:

graffiti

License

vcsstat.sh is licensed under the MIT License
Copyright (C) 2011, 2013, 2014 by Yu-Jie Lin