[MERGE] Fix pb.tick() after pb.update()

John Arbash Meinel john at arbash-meinel.com
Wed Feb 18 16:04:58 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The brisbane-core branch triggers a small bug in the new progress bars.
Basically, doing:

  pb = ui_factory.nested_progress_bar()
  pb.update('xxx', 0, 3)
  pb.tick()

Would fail. The issue is that the earlier 'update' call sets a
total_count, but the pb.tick() effectively does pb.update(...,
current=None). And the code paths weren't checking if current was None,
only if total was None.

This fixes it to exercise those code paths. It is slightly tricky,
because of the screen-update delays, but I think I've handle that fine.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmcMaoACgkQJdeBCYSNAANf4ACfbKdTDrtmfoAdAdkWJIqeEvP2
b5gAnR7MwyOn4pMav2bhMnohv6piX4h0
=6gAW
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pb_tick.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20090218/5d1c3f30/attachment-0001.diff 


More information about the bazaar mailing list