~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/library_state.py

  • Committer: Vincent Ladeuil
  • Date: 2011-09-27 11:48:50 UTC
  • mto: This revision was merged to the branch mainline in revision 6173.
  • Revision ID: v.ladeuil+lp@free.fr-20110927114850-338r2mns0138klv0
Global options respect their hidden attribute

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import sys
24
24
 
25
25
import bzrlib
26
 
from bzrlib.lazy_import import lazy_import
27
 
lazy_import(globals(), """
28
 
from bzrlib import config
29
 
""")
30
26
 
31
27
 
32
28
class BzrLibraryState(object):
65
61
        """
66
62
        self._ui = ui
67
63
        self._trace = trace
68
 
        # There is no overrides by default, they are set later when the command
69
 
        # arguments are parsed.
70
 
        self.cmdline_overrides = config.CommandLineSection()
71
64
        self.started = False
72
65
 
73
66
    def __enter__(self):
76
69
        return self # This is bound to the 'as' clause in a with statement.
77
70
 
78
71
    def _start(self):
79
 
        """Do all initialization."""
 
72
        """Do all initialization.
 
73
        """        
80
74
        # NB: This function tweaks so much global state it's hard to test it in
81
75
        # isolation within the same interpreter.  It's not reached on normal
82
76
        # in-process run_bzr calls.  If it's broken, we expect that