~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-14 06:05:30 UTC
  • mfrom: (4880.2.1 progress)
  • Revision ID: pqm@pqm.ubuntu.com-20091214060530-uk93cdya34wzxb0s
(mbp) turn off progress bar; just show a spinner

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
        self._total_byte_count = 0
262
262
        self._bytes_since_update = 0
263
263
        self._fraction = 0
 
264
        # force the progress bar to be off, as at the moment it doesn't 
 
265
        # correspond reliably to overall command progress
 
266
        self.enable_bar = False
264
267
 
265
268
    def _show_line(self, s):
266
269
        # sys.stderr.write("progress %r\n" % s)
276
279
 
277
280
    def _render_bar(self):
278
281
        # return a string for the progress bar itself
279
 
        if (self._last_task is None) or self._last_task.show_bar:
 
282
        if self.enable_bar and (
 
283
            (self._last_task is None) or self._last_task.show_bar):
280
284
            # If there's no task object, we show space for the bar anyhow.
281
285
            # That's because most invocations of bzr will end showing progress
282
286
            # at some point, though perhaps only after doing some initial IO.