Rev 5849: uncommit is now down to 2.7s, document it fixing bug #780544 in http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941

John Arbash Meinel john at arbash-meinel.com
Tue May 10 18:19:03 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.4-set-parent-trees-delta-282941

------------------------------------------------------------
revno: 5849
revision-id: john at arbash-meinel.com-20110510181855-58syz4caduchdpsl
parent: john at arbash-meinel.com-20110510180853-yo31d6ipw4csxa8d
fixes bug(s): https://launchpad.net/bugs/780544
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-set-parent-trees-delta-282941
timestamp: Tue 2011-05-10 20:18:55 +0200
message:
  uncommit is now down to 2.7s, document it fixing bug #780544
-------------- next part --------------
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py	2011-05-10 18:08:53 +0000
+++ b/bzrlib/workingtree_4.py	2011-05-10 18:18:55 +0000
@@ -1154,10 +1154,8 @@
             basis_id = self.get_parent_ids()[0]
             basis_tree = self.branch.repository.revision_tree(basis_id)
             delta = rev_tree.inventory._make_delta(basis_tree.inventory)
-            trace.note('updating via delta')
             dirstate.update_basis_by_delta(delta, rev_id)
         else:
-            import pdb; pdb.set_trace()
             dirstate.set_parent_trees(real_trees, ghosts=ghosts)
         self._make_dirty(reset_inventory=False)
 

=== 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:18:55 +0000
@@ -40,6 +40,10 @@
   option "``bzr.workingtree.worth_saving_limit``".
   (Ian Clatworthy, John Arbash Meinel, #380202)
 
+* Speed up ``bzr uncommit``. Instead of resetting the dirstate from
+  scratch, use ``update_basis_by_delta``, computing the delta from the
+  repsository. (John Arbash Meinel, #780544)
+
 Bug Fixes
 *********
 

=== 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:18:55 +0000
@@ -65,9 +65,11 @@
 
     bzr-2.3 bzr-2.4 action
     3m39s   1m03s   bzr co --lightweight
-      38s      6s   bzr revert
+      38s      3s   bzr revert
     4m47s     27s   bzr merge
     4m58s     32s   bzr up
+    9m33s     29s   bzr uncommit (including a merge)
+    4m44s      3s   bzr uncommit (simple commit)
     
 
 Faster stacked branches



More information about the bazaar-commits mailing list