~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Martin Pool
  • Date: 2009-09-24 04:54:19 UTC
  • mfrom: (4471.2.2 deprecation)
  • mto: This revision was merged to the branch mainline in revision 4715.
  • Revision ID: mbp@sourcefrog.net-20090924045419-a9c162cyftiiggju
merge old deprecation of ProgressTask.note

Show diffs side-by-side

added added

removed removed

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