~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2011-02-14 12:03:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5664.
  • Revision ID: andrew.bennetts@canonical.com-20110214120305-7l7iu1h6f13voeo7
Add release note.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
53
53
# releaselevel of 'dev' for unreleased under-development code.
54
54
 
55
 
version_info = (2, 4, 0, 'dev', 2)
 
55
version_info = (2, 4, 0, 'dev', 1)
56
56
 
57
57
# API compatibility version
58
58
api_minimum_version = (2, 4, 0)
157
157
 
158
158
    More options may be added in future so callers should use named arguments.
159
159
 
160
 
    The object returned by this function can be used as a contex manager
161
 
    through the 'with' statement to automatically shut down when the process
162
 
    is finished with bzrlib.  However (from bzr 2.4) it's not necessary to
163
 
    separately enter the context as well as starting bzr: bzrlib is ready to
164
 
    go when this function returns.
165
 
 
166
160
    :param setup_ui: If true (default) use a terminal UI; otherwise 
167
161
        some other ui_factory must be assigned to `bzrlib.ui.ui_factory` by
168
162
        the caller.
169
163
    :param stdin, stdout, stderr: If provided, use these for terminal IO;
170
164
        otherwise use the files in `sys`.
171
 
    :return: A context manager for the use of bzrlib. The __exit__
 
165
    :return: A context manager for the use of bzrlib. The __enter__ method of
 
166
        this context needs to be called before it takes effect, and the __exit__
172
167
        should be called by the caller before exiting their process or
173
168
        otherwise stopping use of bzrlib. Advanced callers can use
174
169
        BzrLibraryState directly.
183
178
    else:
184
179
        ui_factory = None
185
180
    tracer = trace.DefaultConfig()
186
 
    state = library_state.BzrLibraryState(ui=ui_factory, trace=tracer)
187
 
    # Start automatically in case people don't realize this returns a context.
188
 
    state._start()
189
 
    return state
 
181
    return library_state.BzrLibraryState(ui=ui_factory, trace=tracer)
190
182
 
191
183
 
192
184
def test_suite():