Rev 5849: (jameinel) Update WT.pull to use fast Repository iter_changes when in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed May 11 14:10:38 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5849 [merge]
revision-id: pqm at pqm.ubuntu.com-20110511141035-u1udrv8dvm6wv8jl
parent: pqm at pqm.ubuntu.com-20110511024831-tm38ubce8znnq351
parent: john at arbash-meinel.com-20110511114552-ewvahrx40jsh0pkk
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-05-11 14:10:35 +0000
message:
  (jameinel) Update WT.pull to use fast Repository iter_changes when
   .fast_deltas is true. (bug #780677) (John A Meinel)
modified:
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
  doc/en/whats-new/whats-new-in-2.4.txt whatsnewin2.4.txt-20110114044330-nipk1og7j729fy89-1
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2011-05-10 09:30:33 +0000
+++ b/bzrlib/workingtree.py	2011-05-11 11:45:52 +0000
@@ -1032,6 +1032,11 @@
             new_revision_info = self.branch.last_revision_info()
             if new_revision_info != old_revision_info:
                 repository = self.branch.repository
+                if repository._format.fast_deltas:
+                    parent_ids = self.get_parent_ids()
+                    if parent_ids:
+                        basis_id = parent_ids[0]
+                        basis_tree = repository.revision_tree(basis_id)
                 basis_tree.lock_read()
                 try:
                     new_basis_tree = self.branch.basis_tree()

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-05-10 09:34:35 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-05-10 18:49:54 +0000
@@ -30,6 +30,14 @@
   more efficiently.  For a simple branch it reduces the number of
   round-trips by about 20%.  (Andrew Bennetts)
 
+* ``bzr pull`` now properly triggers the fast
+  ``CHKInventory.iter_changes`` rather than the slow generic
+  inter-Inventory changes. It used to use a ``DirStateRevisionTree`` as
+  one of the source trees, which is faster when we have to read the whole
+  inventory anyway, but much slower when we can get just the delta out of
+  the repository. On a 70k record tree, this changes ``bzr pull`` from 28s
+  down to 17s. (John Arbash Meinel, #780677)
+
 * Slightly reduced memory consumption when fetching into a 2a repository
   by reusing existing caching a little better.  (Andrew Bennetts)
 

=== modified file 'doc/en/whats-new/whats-new-in-2.4.txt'
--- a/doc/en/whats-new/whats-new-in-2.4.txt	2011-05-10 09:34:35 +0000
+++ b/doc/en/whats-new/whats-new-in-2.4.txt	2011-05-10 18:49:54 +0000
@@ -63,11 +63,12 @@
 trees. A possibly incomplete list is as follows for running commands on a
 70k file tree::
 
-    bzr-2.3 bzr-2.4 action
-    3m39s   1m03s   bzr co --lightweight
-      38s      6s   bzr revert
-    4m47s     27s   bzr merge
-    4m58s     32s   bzr up
+    bzr-2.3.1 bzr-2.3.2 bzr-2.4 action
+    3m39s                 1m03s   bzr co --lightweight
+      38s                    6s   bzr revert
+    4m47s                   27s   bzr merge
+    4m45s           29s     17s   bzr pull
+    4m58s                   32s   bzr up
     
 
 Faster stacked branches




More information about the bazaar-commits mailing list