1993
1993
ui.ui_factory = save_ui
1996
def _get_bzr_branch():
1997
"""If bzr is run from a branch, return Branch or None"""
1998
from os.path import dirname
2001
branch = Branch.open(dirname(osutils.abspath(dirname(__file__))))
2003
except errors.BzrError:
2009
print "Bazaar (bzr) %s" % bzrlib.__version__
2010
# is bzrlib itself in a branch?
2011
branch = _get_bzr_branch()
2013
rh = branch.revision_history()
2015
print " bzr checkout, revision %d" % (revno,)
2016
print " nick: %s" % (branch.nick,)
2018
print " revid: %s" % (rh[-1],)
2019
print "Using python interpreter:", sys.executable
2021
print "Using python standard library:", os.path.dirname(site.__file__)
2022
print "Using bzrlib:",
2023
if len(bzrlib.__path__) > 1:
2024
# print repr, which is a good enough way of making it clear it's
2025
# more than one element (eg ['/foo/bar', '/foo/bzr'])
2026
print repr(bzrlib.__path__)
2028
print bzrlib.__path__[0]
2031
print bzrlib.__copyright__
2032
print "http://bazaar-vcs.org/"
2034
print "bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and"
2035
print "you may use, modify and redistribute it under the terms of the GNU"
2036
print "General Public License version 2 or later."
2039
1996
class cmd_version(Command):
2040
1997
"""Show version of bzr."""
2042
1999
@display_command
2001
from bzrlib.version import show_version