~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:29:17 UTC
  • mfrom: (2961 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152917-nrsumxpk3dikso2c
Merge bzr.dev

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