~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-18 17:16:09 UTC
  • mto: This revision was merged to the branch mainline in revision 4934.
  • Revision ID: john@arbash-meinel.com-20091218171609-gpft7w4hvt1zj827
Get the basic interface tested.

Also expose a small bug in TextProgressView. If we didn't have a
progress bar yet, we wouldn't actually track how much data was
transferred. But we might as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
        # XXX: Probably there should be a transport activity model, and that
380
380
        # too should be seen by the progress view, rather than being poked in
381
381
        # here.
 
382
        self._total_byte_count += byte_count
 
383
        self._bytes_since_update += byte_count
382
384
        if not self._have_output:
383
385
            # As a workaround for <https://launchpad.net/bugs/321935> we only
384
386
            # show transport activity when there's already a progress bar
387
389
            # output.  Eventually it would be nice to have that automatically
388
390
            # synchronized.
389
391
            return
390
 
        self._total_byte_count += byte_count
391
 
        self._bytes_since_update += byte_count
392
392
        now = time.time()
393
393
        if self._total_byte_count < 2000:
394
394
            # a little resistance at first, so it doesn't stay stuck at 0