~parthm/bzr/164450-push-pull-tags

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from bzrlib.symbol_versioning import (
36
36
    deprecated_function,
37
37
    deprecated_in,
 
38
    deprecated_method,
38
39
    )
39
40
 
40
41
 
158
159
                own_fraction = 0.0
159
160
            return self._parent_task._overall_completion_fraction(own_fraction)
160
161
 
 
162
    @deprecated_method(deprecated_in((2, 1, 0)))
161
163
    def note(self, fmt_string, *args):
162
 
        """Record a note without disrupting the progress bar."""
163
 
        # XXX: shouldn't be here; put it in mutter or the ui instead
 
164
        """Record a note without disrupting the progress bar.
 
165
        
 
166
        Deprecated: use ui_factory.note() instead or bzrlib.trace.  Note that
 
167
        ui_factory.note takes just one string as the argument, not a format
 
168
        string and arguments.
 
169
        """
164
170
        if args:
165
171
            self.ui_factory.note(fmt_string % args)
166
172
        else:
167
173
            self.ui_factory.note(fmt_string)
168
174
 
169
175
    def clear(self):
170
 
        # XXX: shouldn't be here; put it in mutter or the ui instead
 
176
        # TODO: deprecate this method; the model object shouldn't be concerned
 
177
        # with whether it's shown or not.  Most callers use this because they
 
178
        # want to write some different non-progress output to the screen, but
 
179
        # they should probably instead use a stream that's synchronized with
 
180
        # the progress output.  It may be there is a model-level use for
 
181
        # saying "this task's not active at the moment" but I don't see it. --
 
182
        # mbp 20090623
171
183
        if self.progress_view:
172
184
            self.progress_view.clear()
173
185
        else: