1985
1985
test_suite_factory = benchmarks.test_suite
1986
1986
if verbose is None:
1988
benchfile = open(".perf_history", "at")
1989
1990
test_suite_factory = None
1990
1991
if verbose is None:
1991
1992
verbose = False
1992
result = selftest(verbose=verbose,
1994
stop_on_failure=one,
1995
keep_output=keep_output,
1996
transport=transport,
1997
test_suite_factory=test_suite_factory,
1998
lsprof_timed=lsprof_timed)
1995
result = selftest(verbose=verbose,
1997
stop_on_failure=one,
1998
keep_output=keep_output,
1999
transport=transport,
2000
test_suite_factory=test_suite_factory,
2001
lsprof_timed=lsprof_timed,
2002
bench_history=benchfile)
2004
if benchfile is not None:
2000
2007
info('tests passed')
2005
2012
ui.ui_factory = save_ui
2008
def _get_bzr_branch():
2009
"""If bzr is run from a branch, return Branch or None"""
2010
from os.path import dirname
2013
branch = Branch.open(dirname(osutils.abspath(dirname(__file__))))
2015
except errors.BzrError:
2021
print "Bazaar (bzr) %s" % bzrlib.__version__
2022
# is bzrlib itself in a branch?
2023
branch = _get_bzr_branch()
2025
rh = branch.revision_history()
2027
print " bzr checkout, revision %d" % (revno,)
2028
print " nick: %s" % (branch.nick,)
2030
print " revid: %s" % (rh[-1],)
2031
print "Using python interpreter:", sys.executable
2033
print "Using python standard library:", os.path.dirname(site.__file__)
2034
print "Using bzrlib:",
2035
if len(bzrlib.__path__) > 1:
2036
# print repr, which is a good enough way of making it clear it's
2037
# more than one element (eg ['/foo/bar', '/foo/bzr'])
2038
print repr(bzrlib.__path__)
2040
print bzrlib.__path__[0]
2043
print bzrlib.__copyright__
2044
print "http://bazaar-vcs.org/"
2046
print "bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and"
2047
print "you may use, modify and redistribute it under the terms of the GNU"
2048
print "General Public License version 2 or later."
2051
2015
class cmd_version(Command):
2052
2016
"""Show version of bzr."""
2054
2018
@display_command
2020
from bzrlib.version import show_version