~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Robert Collins
  • Date: 2010-06-26 01:07:16 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100626010716-jowzrldm4ntsaki2
Make bzrlib startup use a trace context manager.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
# Keep track of when bzrlib was first imported, so that we can give rough
37
37
# timestamps relative to program start in the log file kept by bzrlib.trace.
 
38
# XXX: GLOBAL
38
39
_start_time = time.time()
39
40
 
40
41
import sys
172
173
        ui_factory = bzrlib.ui.make_ui_for_terminal(stdin, stdout, stderr)
173
174
    else:
174
175
        ui_factory = None
175
 
    return bzrlib.library_state.BzrLibraryState(ui=ui_factory)
 
176
    tracer = bzrlib.trace.DefaultConfig()
 
177
    return bzrlib.library_state.BzrLibraryState(ui=ui_factory, trace=tracer)
176
178
 
177
179
 
178
180
def test_suite():