import libbe.command.util
import libbe.util.id
import libbe.version
-import libbe._version
class Show (libbe.command.Command):
' <version>',
' <tag>%s</tag>' % libbe.version.version()]
for tag in ['branch-nick', 'revno', 'revision-id']:
- value = libbe._version.version_info[tag.replace('-', '_')]
+ value = libbe.version.version_info[tag.replace('-', '_')]
lines.append(' <%s>%s</%s>' % (tag, value, tag))
lines.append(' </version>')
return lines
import copy
-import libbe._version as _version
import libbe.storage
+try:
+ from ._version import version_info
+except ImportError, e:
+ import logging
+ logging.warn('unable to import libbe._version: %s' % e)
+ version_info = {
+ 'revision': 'unknown',
+ 'date': 'unknown',
+ 'committer': 'unknown',
+ }
# Manually set a version string (optional, defaults to bzr revision id)
#_VERSION = "1.2.3"
if "_VERSION" in globals():
string = _VERSION
else:
- string = _version.version_info['revision']
+ string = version_info['revision']
if verbose == True:
- info = copy.copy(_version.version_info)
+ info = copy.copy(version_info)
info['storage'] = libbe.storage.STORAGE_VERSION
string += ("\n"
"revision: %(revision)s\n"