35
35
IGNORE_FILENAME = ".bzrignore"
38
__copyright__ = "Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd."
38
__copyright__ = "Copyright 2005-2010 Canonical Ltd."
40
40
# same format as sys.version_info: "A tuple containing the five components of
41
41
# the version number: major, minor, micro, releaselevel, and serial. All
47
47
version_info = (2, 2, 0, 'dev', 1)
49
# API compatibility version: bzrlib is currently API compatible with 1.15.
49
# API compatibility version
50
50
api_minimum_version = (2, 1, 0)
116
116
def test_suite():
118
118
return tests.test_suite()
123
stdin=None, stdout=None, stderr=None):
124
"""Set up everything needed for normal use of bzrlib.
126
Most applications that embed bzrlib, including bzr itself, should call
127
this function to initialize various subsystems.
129
More options may be added in future so callers should use named arguments.
131
:param setup_ui: If true (default) use a terminal UI; otherwise
132
something else must be put into `bzrlib.ui.ui_factory`.
133
:param stdin, stdout, stderr: If provided, use these for terminal IO;
134
otherwise use the files in `sys`.
136
# TODO: mention this in a guide to embedding bzrlib
138
# NB: This function tweaks so much global state it's hard to test it in
139
# isolation within the same interpreter. It's not reached on normal
140
# in-process run_bzr calls. If it's broken, we expect that
141
# TestRunBzrSubprocess may fail.
146
bzrlib.trace.enable_default_logging()
147
atexit.register(bzrlib.trace._flush_stdout_stderr)
148
atexit.register(bzrlib.trace._flush_trace)
159
bzrlib.ui.ui_factory = bzrlib.ui.make_ui_for_terminal(
160
stdin, stdout, stderr)
162
if bzrlib.version_info[3] == 'final':
163
from bzrlib.symbol_versioning import suppress_deprecation_warnings
164
suppress_deprecation_warnings(override=True)
166
import bzrlib.osutils
167
atexit.register(osutils.report_extension_load_failures)