Rev 2627: (robert collins) Reduce the number of all-history lookups done by push and pull. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Jul 19 02:18:48 BST 2007


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

------------------------------------------------------------
revno: 2627
revision-id: pqm at pqm.ubuntu.com-20070719011840-ewngzmxi6tct4vs3
parent: pqm at pqm.ubuntu.com-20070719002624-zgt7cyq39hwp4p36
parent: robertc at robertcollins.net-20070719001750-6h1finyqxcc2rv8y
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-07-19 02:18:40 +0100
message:
  (robert collins) Reduce the number of all-history lookups done by push and pull.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
    ------------------------------------------------------------
    revno: 2625.2.1
    merged: robertc at robertcollins.net-20070719001750-6h1finyqxcc2rv8y
    parent: pqm at pqm.ubuntu.com-20070717180333-5smmeduk2q3sbzvw
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: integration
    timestamp: Thu 2007-07-19 10:17:50 +1000
    message:
      * ``bzr pull`` and ``bzr push`` no longer do a complete walk of the 
        branch revision history for ui display unless -v is supplied.
        (Robert Collins)
=== modified file 'NEWS'
--- a/NEWS	2007-07-18 23:19:46 +0000
+++ b/NEWS	2007-07-19 01:18:40 +0000
@@ -30,6 +30,10 @@
       succeed even if pyrex is not available.
       (John Arbash Meinel)
 
+    * ``bzr pull`` and ``bzr push`` no longer do a complete walk of the 
+      branch revision history for ui display unless -v is supplied.
+      (Robert Collins)
+
   LIBRARY API BREAKS:
 
     * Deprecated dictionary ``bzrlib.option.SHORT_OPTIONS`` removed.

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-07-13 05:09:43 +0000
+++ b/bzrlib/builtins.py	2007-07-19 00:17:50 +0000
@@ -633,7 +633,8 @@
                 raise errors.BzrCommandError(
                     'bzr pull --revision takes one value.')
 
-        old_rh = branch_to.revision_history()
+        if verbose:
+            old_rh = branch_to.revision_history()
         if tree_to is not None:
             result = tree_to.pull(branch_from, overwrite, revision_id,
                 delta._ChangeReporter(unversioned_filter=tree_to.is_ignored))
@@ -735,7 +736,8 @@
                 # Found a branch, so we must have found a repository
                 repository_to = br_to.repository
         push_result = None
-        old_rh = []
+        if verbose:
+            old_rh = []
         if dir_to is None:
             # The destination doesn't exist; create it.
             # XXX: Refactor the create_prefix/no_create_prefix code into a
@@ -791,7 +793,8 @@
             # we don't need to successfully push because of possible divergence.
             if br_from.get_push_location() is None or remember:
                 br_from.set_push_location(br_to.base)
-            old_rh = br_to.revision_history()
+            if verbose:
+                old_rh = br_to.revision_history()
             try:
                 try:
                     tree_to = dir_to.open_workingtree()




More information about the bazaar-commits mailing list