/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2017-08-26 19:06:32 UTC
  • mto: This revision was merged to the branch mainline in revision 6773.
  • Revision ID: jelmer@jelmer.uk-20170826190632-nmiqnyff6s4htneh
Use get_global_state>

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
# it is important to store the reference you get, rather than looking it up
193
193
# repeatedly; that way your code will behave properly in the breezy test suite
194
194
# and from programs that do use multiple library contexts.
195
 
global_state = None
 
195
_global_state = None
196
196
 
197
197
 
198
198
def initialize(setup_ui=True, stdin=None, stdout=None, stderr=None):
235
235
    return state
236
236
 
237
237
 
 
238
def get_global_state():
 
239
    if _global_state is None:
 
240
        return initialize()
 
241
    return _global_state
 
242
 
 
243
 
238
244
def test_suite():
239
245
    import tests
240
246
    return tests.test_suite()