[MERGE] save generating revision_history on every push/pull

Robert Collins robertc at robertcollins.net
Thu Jul 19 00:16:52 BST 2007


This avoids generating revision history unless we are actually going to
use it on push and pull.

=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py  2007-07-13 05:09:43 +0000
+++ bzrlib/builtins.py  2007-07-18 23:15:57 +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()



-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070719/0d138ce9/attachment.pgp 


More information about the bazaar mailing list