[PATCH 0/4] Speed improvement in fetch/clone

Goffredo Baroncelli kreijack at alice.it
Thu Jan 19 18:57:14 GMT 2006


This patch should solve all the problems....

=== modified file 'bzrlib/store/weave.py'
--- bzrlib/store/weave.py
+++ bzrlib/store/weave.py
@@ -25,6 +25,7 @@
 from cStringIO import StringIO
 import urllib

+import bzrlib
 from bzrlib.weavefile import read_weave, write_weave_v5
 from bzrlib.weave import Weave
 from bzrlib.store import TransportStore, hash_prefix
@@ -162,8 +163,15 @@
         w.add_identical(old_rev_id, new_rev_id, parent_idxs)
         self.put_weave(file_id, w, transaction)

-    def copy_multi(self, from_store, file_ids):
+    def copy_multi(self, from_store, file_ids, pb=None):
         assert isinstance(from_store, WeaveStore)
+        if pb is None:
+            pb = bzrlib.ui.ui_factory.progress_bar()
+        count = 0
         for f in file_ids:
+            count += 1
             mutter("copy weave {%s} into %s", f, self)
             self._put(f, from_store._get(f))
+            pb.update('copy', count, len(file_ids))
+        pb.clear( )
+



-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack-AT-inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060119/84a08824/attachment.pgp 


More information about the bazaar mailing list