126
126
raise NotImplementedError(self.get_password)
128
def make_output_stream(self, encoding=None, encoding_errors=None):
129
"""Get a stream for sending out bulk text data.
131
This is used for commands that produce bulk text, such as log or diff
132
output, as opposed to user interaction. This should work even for
133
non-interactive user interfaces. Typically this goes to a decorated
134
version of stdout, but in a GUI it might be appropriate to send it to a
135
window displaying the text.
137
:param encoding: Unicode encoding for output; default is the user encoding.
139
:param encoding_errors: How to handle encoding errors:
140
replace/strict/escape. Default is replace, so that the user gets some
143
# XXX: is the caller supposed to close the resulting object?
145
encoding = osutils.get_user_encoding()
146
if encoding_errors is None:
147
encoding_errors = 'replace'
148
return self._make_output_stream_explicit(encoding, encoding_errors)
150
def _make_output_stream_explicit(self, encoding, encoding_errors):
151
raise NotImplementedError("%s doesn't support make_output_stream"
152
% (self.__class__.__name__))
128
154
def nested_progress_bar(self):
129
155
"""Return a nested progress bar.