~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-22 05:11:49 UTC
  • mfrom: (4912.1.4 progress)
  • Revision ID: pqm@pqm.ubuntu.com-20091222051149-713jby9bi05y05gr
(mbp) show transport activity even when there's no pb

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
            markers = int(round(float(cols) * completion_fraction)) - 1
302
302
            bar_str = '[' + ('#' * markers + spin_str).ljust(cols) + '] '
303
303
            return bar_str
304
 
        elif self._last_task.show_spinner:
 
304
        elif (self._last_task is None) or self._last_task.show_spinner:
305
305
            # The last task wanted just a spinner, no bar
306
306
            spin_str =  r'/-\|'[self._spin_pos % 4]
307
307
            self._spin_pos += 1
372
372
        # XXX: Probably there should be a transport activity model, and that
373
373
        # too should be seen by the progress view, rather than being poked in
374
374
        # here.
375
 
        if not self._have_output:
376
 
            # As a workaround for <https://launchpad.net/bugs/321935> we only
377
 
            # show transport activity when there's already a progress bar
378
 
            # shown, which time the application code is expected to know to
379
 
            # clear off the progress bar when it's going to send some other
380
 
            # output.  Eventually it would be nice to have that automatically
381
 
            # synchronized.
 
375
        if 'no_activity' in debug.debug_flags:
 
376
            # Can be used as a workaround if
 
377
            # <https://launchpad.net/bugs/321935> reappears and transport
 
378
            # activity is cluttering other output.  However, thanks to
 
379
            # TextUIOutputStream this shouldn't be a problem any more.
382
380
            return
383
381
        self._total_byte_count += byte_count
384
382
        self._bytes_since_update += byte_count