~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Martin Pool
  • Date: 2009-12-09 07:58:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4890.
  • Revision ID: mbp@sourcefrog.net-20091209075806-a3nnd8dcnpdfrppn
Text progress view is now only a spinner not a bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
        self._total_byte_count = 0
253
253
        self._bytes_since_update = 0
254
254
        self._fraction = 0
 
255
        # force the progress bar to be off, as at the moment it doesn't 
 
256
        # correspond reliably to overall command progress
 
257
        self.enable_bar = False
255
258
 
256
259
    def _show_line(self, s):
257
260
        # sys.stderr.write("progress %r\n" % s)
267
270
 
268
271
    def _render_bar(self):
269
272
        # return a string for the progress bar itself
270
 
        if (self._last_task is None) or self._last_task.show_bar:
 
273
        if self.enable_bar and (
 
274
            (self._last_task is None) or self._last_task.show_bar):
271
275
            # If there's no task object, we show space for the bar anyhow.
272
276
            # That's because most invocations of bzr will end showing progress
273
277
            # at some point, though perhaps only after doing some initial IO.