~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Robert Collins
  • Date: 2006-02-14 05:15:45 UTC
  • mto: (1704.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1706.
  • Revision ID: robertc@robertcollins.net-20060214051545-7567c24a4a29862e
Teach bzr selftest to use a progress bar in non verbose mode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        self.show_count = show_count
84
84
 
85
85
 
86
 
 
87
86
class DummyProgress(_BaseProgressBar):
88
87
    """Progress-bar standin that does nothing.
89
88
 
174
173
        
175
174
 
176
175
    def tick(self):
177
 
        self.update(self.last_msg, self.last_cnt, self.last_total)
 
176
        self.update(None, self.last_cnt, self.last_total)
178
177
                 
179
178
 
180
179
 
181
180
    def update(self, msg, current_cnt=None, total_cnt=None):
182
181
        """Update and redraw progress bar."""
183
182
 
 
183
        if msg is None:
 
184
            msg = self.last_msg
 
185
 
 
186
        if total_cnt is None:
 
187
            total_cnt = self.last_total
 
188
 
184
189
        if current_cnt < 0:
185
190
            current_cnt = 0
186
191