diff options
author | W. Trevor King <wking@drexel.edu> | 2009-09-15 09:32:40 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-09-15 09:32:40 -0400 |
commit | 0510a9773d213732892dd6a0a8644a252d95f4b5 (patch) | |
tree | abfb7d11f4ac7b0725dd48bdb576cd878a4ff8e6 /be | |
parent | bac6ce2bc8b33850479b0dac7d646cdc988e5060 (diff) | |
download | bugseverywhere-0510a9773d213732892dd6a0a8644a252d95f4b5.tar.gz |
Added libbe.version, wrapping the auto-generated libbe._version.
Two major benefits:
1) Programatic access to the BE version. Previously the
version-string logic was internal to the commandline interface ./be,
which left the other interfaces hanging.
2) Simple to override auto-generated revision id version with any
string you like (by setting libbe.version._VERSION, if that's the way
you want to run things or the way your packaging system requires.
Note that other modules should never read libbe.version._VERSION,
since it may not be defined. Instead they should use the output of
libbe.version.version().
Diffstat (limited to 'be')
-rwxr-xr-x | be | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,7 +21,7 @@ import os import sys -from libbe import cmdutil, _version +from libbe import cmdutil, version __doc__ = cmdutil.help() @@ -51,7 +51,7 @@ except cmdutil.GetCompletions, e: sys.exit(0) if options.version == True: - print _version.version_info["revision_id"] + print version.version() sys.exit(0) if options.dir != None: os.chdir(options.dir) |