Rev 52: Add a general progress indicator for other parts of copy. in http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/trunk

John Arbash Meinel john at arbash-meinel.com
Fri Feb 27 03:58:44 GMT 2009


At http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/trunk

------------------------------------------------------------
revno: 52
revision-id: john at arbash-meinel.com-20090227035733-h1gmn3ymofoxc7zm
parent: john at arbash-meinel.com-20090227035442-4sk2vcl343hg9afv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Thu 2009-02-26 21:57:33 -0600
message:
  Add a general progress indicator for other parts of copy.
-------------- next part --------------
=== modified file 'repofmt.py'
--- a/repofmt.py	2009-02-27 03:54:42 +0000
+++ b/repofmt.py	2009-02-27 03:57:33 +0000
@@ -418,7 +418,12 @@
                                 stream = self._get_chk_stream(source_vf, keys,
                                     id_roots, p_id_roots, pb=child_pb)
                         if stream is None:
-                            stream = source_vf.get_record_stream(keys, 'gc-optimal', True)
+                            def pb_stream():
+                                substream = source_vf.get_record_stream(keys, 'gc-optimal', True)
+                                for idx, record in enumerate(substream):
+                                    child_pb.update(vf_name, idx, len(keys))
+                                    yield record
+                            stream = pb_stream()
                         target_vf.insert_record_stream(stream)
                     finally:
                         child_pb.finished()



More information about the bazaar-commits mailing list