Rev 4159: faster send on deep histories (Ian Clatworthy) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Mar 18 01:34:38 GMT 2009


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

------------------------------------------------------------
revno: 4159
revision-id: pqm at pqm.ubuntu.com-20090318013435-d4g73c7rzqidhct1
parent: pqm at pqm.ubuntu.com-20090317230937-pwr84cnqjoyzybex
parent: ian.clatworthy at canonical.com-20090318004827-grdw4z5i9n7ho0de
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-03-18 01:34:35 +0000
message:
  faster send on deep histories (Ian Clatworthy)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
    ------------------------------------------------------------
    revno: 4158.1.1
    revision-id: ian.clatworthy at canonical.com-20090318004827-grdw4z5i9n7ho0de
    parent: pqm at pqm.ubuntu.com-20090317230937-pwr84cnqjoyzybex
    parent: ian.clatworthy at canonical.com-20090318004706-rsazqt1i70dzjk94
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: ianc-integration
    timestamp: Wed 2009-03-18 10:48:27 +1000
    message:
      faster send on deep histories (Ian Clatworthy)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
    ------------------------------------------------------------
    revno: 4154.1.3
    revision-id: ian.clatworthy at canonical.com-20090318004706-rsazqt1i70dzjk94
    parent: ian.clatworthy at canonical.com-20090317223543-jyn6vziz0upcxj6p
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.faster-send
    timestamp: Wed 2009-03-18 10:47:06 +1000
    message:
      strip ghosts so test_bundle_with_ghosts works again
    modified:
      bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
    ------------------------------------------------------------
    revno: 4154.1.2
    revision-id: ian.clatworthy at canonical.com-20090317223543-jyn6vziz0upcxj6p
    parent: ian.clatworthy at canonical.com-20090317050613-f6m8xioptcsowkw3
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.faster-send
    timestamp: Wed 2009-03-18 08:35:43 +1000
    message:
      feedback from jam's review - use find_unique_ancestors()
    modified:
      bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
    ------------------------------------------------------------
    revno: 4154.1.1
    revision-id: ian.clatworthy at canonical.com-20090317050613-f6m8xioptcsowkw3
    parent: pqm at pqm.ubuntu.com-20090317023551-f1jm1klbuy1eg4hv
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.faster-send
    timestamp: Tue 2009-03-17 15:06:13 +1000
    message:
      make send use graph.find_difference() instead of walking all of history twice
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
=== modified file 'NEWS'
--- a/NEWS	2009-03-17 22:22:57 +0000
+++ b/NEWS	2009-03-18 00:48:27 +0000
@@ -41,6 +41,9 @@
       version controlled files match the ignore pattern. (Neil
       Martinsen-Burrell, #248895)
 
+    * ``bzr send`` is faster on repositories with deep histories.
+      (Ian Clatworthy)
+
     * Progress bars now show the rate of network activity for
       ``bzr+ssh://`` and ``bzr://`` connections.  (Andrew Bennetts)
 

=== modified file 'bzrlib/bundle/serializer/v4.py'
--- a/bzrlib/bundle/serializer/v4.py	2009-01-17 01:30:58 +0000
+++ b/bzrlib/bundle/serializer/v4.py	2009-03-18 00:47:06 +0000
@@ -270,14 +270,14 @@
         self.repository = repository
         bundle = BundleWriter(fileobj)
         self.bundle = bundle
-        self.base_ancestry = set(repository.get_ancestry(base,
-                                                         topo_sorted=False))
         if revision_ids is not None:
             self.revision_ids = revision_ids
         else:
-            revision_ids = set(repository.get_ancestry(target,
-                                                       topo_sorted=False))
-            self.revision_ids = revision_ids.difference(self.base_ancestry)
+            graph = repository.get_graph()
+            revision_ids = graph.find_unique_ancestors(target, [base])
+            # Strip ghosts
+            parents = graph.get_parent_map(revision_ids)
+            self.revision_ids = [r for r in revision_ids if r in parents]
         self.revision_keys = set([(revid,) for revid in self.revision_ids])
 
     def do_write(self):




More information about the bazaar-commits mailing list