Rev 4496: Make use of the passed in progress bar. in http://bazaar.launchpad.net/~jameinel/bzr/1.17-rework-annotate

John Arbash Meinel john at arbash-meinel.com
Tue Jun 23 21:10:57 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.17-rework-annotate

------------------------------------------------------------
revno: 4496
revision-id: john at arbash-meinel.com-20090623201053-ogmlt7yhxmpmnibl
parent: john at arbash-meinel.com-20090623195852-y7qc5ps9yprfytzi
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.17-rework-annotate
timestamp: Tue 2009-06-23 15:10:53 -0500
message:
  Make use of the passed in progress bar.
-------------- next part --------------
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2009-06-23 19:58:52 +0000
+++ b/bzrlib/knit.py	2009-06-23 20:10:53 +0000
@@ -3426,7 +3426,10 @@
         while True:
             try:
                 records = self._get_build_graph(key)
-                for key, text, num_lines in self._extract_texts(records):
+                for idx, (key, text, num_lines) in enumerate(
+                                                self._extract_texts(records)):
+                    if pb is not None:
+                        pb.update('annotating', idx, len(records))
                     yield key, text, num_lines
                 return
             except errors.RetryWithNewPacks, e:



More information about the bazaar-commits mailing list