From: Chuck Lever Date: Tue, 6 Sep 2005 16:12:29 +0000 (-0400) Subject: Add a "version" command X-Git-Tag: v0.7~41 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/1e0bdf2afb56fd15cfdc34017ba20398a8d2c584 Add a "version" command Flesh out existing version command and expose it. Signed-off-by: Chuck Lever --- diff --git a/stgit/main.py b/stgit/main.py index e62e95b..2350013 100644 --- a/stgit/main.py +++ b/stgit/main.py @@ -91,6 +91,8 @@ def print_help(): print print 'commands:' print ' help print this message' + print ' version display version information' + print cmds = commands.keys() cmds.sort() @@ -116,8 +118,9 @@ def main(): if cmd in ['-h', '--help', 'help']: print_help() sys.exit(0) - if cmd in ['-v', '--version']: + if cmd in ['-v', '--version', 'version']: print 'Stacked GIT %s' % version + print 'Python version %s' % sys.version sys.exit(0) if not cmd in commands: print >> sys.stderr, 'Unknown command: %s' % cmd