A utility to obtain information on version control systems working trees.
vcsinfo [options] subcommand [dir]
-
subcommand:
- branch: display branch
- datetime: display date and time of the latest commit (in UTC)
- log: display history
- ls: display versioned files
- rev: display revision
-
dir: directory to inspect (default: .)
-
options:
- --help: show help message
- --version: show version
$ vcsinfo branch #=> master
$ vcsinfo datetime #=> 2000-12-31T23:59:59Z
$ vcsinfo log > ChangeLog
$ vcsinfo ls > MANIFEST
$ vcsinfo rev #=> abc123, abc123M, etc.
No installation required. Just copy it to anywhere you like.
$ cp vcsinfo.rb vcsinfo
$ chmod +x vcsinfo
- Git, Mercurial, Bazaar, and Subversion.
- vcsinfo.rb: Ruby version
- vcsinfo.sh: shell script version
Copyright 2012 Hisashi Morita.
Public domain.