/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Robert Collins
  • Date: 2008-02-13 03:30:01 UTC
  • mfrom: (3221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3224.
  • Revision ID: robertc@robertcollins.net-20080213033001-rw70ul0zb02ph856
Merge to fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
486
486
    def note(self, *args, **kwargs):
487
487
        self.parent.note(*args, **kwargs)
488
488
 
489
 
 
 
489
 
 
490
class InstrumentedProgress(TTYProgressBar):
 
491
    """TTYProgress variant that tracks outcomes"""
 
492
 
 
493
    def __init__(self, *args, **kwargs):
 
494
        self.always_throttled = True
 
495
        self.never_throttle = False
 
496
        TTYProgressBar.__init__(self, *args, **kwargs)
 
497
 
 
498
    def throttle(self, old_message):
 
499
        if self.never_throttle:
 
500
            result =  False
 
501
        else:
 
502
            result = TTYProgressBar.throttle(self, old_message)
 
503
        if result is False:
 
504
            self.always_throttled = False
 
505
 
 
506
 
490
507
def str_tdelta(delt):
491
508
    if delt is None:
492
509
        return "-:--:--"