~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-15 08:18:03 UTC
  • mfrom: (4961.1.4 320035-progress-quiet)
  • Revision ID: pqm@pqm.ubuntu.com-20100115081803-228osuav8adlz7z4
(mbp) --quiet now turns off progress bars

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
 
110
110
    def __init__(self):
111
111
        self._task_stack = []
 
112
        self._quiet = False
 
113
 
 
114
    def be_quiet(self, state):
 
115
        """Tell the UI to be more quiet, or not.
 
116
 
 
117
        Typically this suppresses progress bars; the application may also look
 
118
        at ui_factory.is_quiet().
 
119
        """
 
120
        self._quiet = state
112
121
 
113
122
    def get_password(self, prompt='', **kwargs):
114
123
        """Prompt the user for a password.
125
134
        """
126
135
        raise NotImplementedError(self.get_password)
127
136
 
 
137
    def is_quiet(self):
 
138
        return self._quiet
 
139
 
128
140
    def make_output_stream(self, encoding=None, encoding_type=None):
129
141
        """Get a stream for sending out bulk text data.
130
142