~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-10-29 22:17:03 UTC
  • mfrom: (2947.1.7 pack-progress)
  • Revision ID: pqm@pqm.ubuntu.com-20071029221703-zy7q7a0ehfvpybtn
(robertc) Add a progress bar has been added for knitpack -> knitpack fetching. (Robert Collins, #157789)

Show diffs side-by-side

added added

removed removed

Lines of Context:
461
461
 
462
462
    def update(self, msg, current_cnt=None, total_cnt=None):
463
463
        self.current = current_cnt
464
 
        self.total = total_cnt
 
464
        if total_cnt is not None:
 
465
            self.total = total_cnt
465
466
        self.message = msg
466
467
        self.child_fraction = 0
467
468
        self.tick()
548
549
            self.cur_phase = 0
549
550
        else:
550
551
            self.cur_phase += 1
551
 
        assert self.cur_phase < self.total 
 
552
        assert self.cur_phase < self.total
552
553
        self.pb.update(self.message, self.cur_phase, self.total)
553
554
 
554
555