Rev 4563: Update from Martin's review feedback. in http://bazaar.launchpad.net/~jameinel/bzr/1.18-2a-bundle-performance
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 4 14:50:36 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.18-2a-bundle-performance
------------------------------------------------------------
revno: 4563
revision-id: john at arbash-meinel.com-20090804135008-u86i3o3nwkp1axh6
parent: john at arbash-meinel.com-20090730203044-4nj22r3fw1y4d4zg
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.18-2a-bundle-performance
timestamp: Tue 2009-08-04 08:50:08 -0500
message:
Update from Martin's review feedback.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2009-07-27 18:03:19 +0000
+++ b/NEWS 2009-08-04 13:50:08 +0000
@@ -33,7 +33,10 @@
* ``bzr mv`` no longer takes out branch locks, which allows it to work
when the branch is readonly. (Robert Collins, #216541)
-* ``bzr send`` now generates valid bundles with ``--2a`` formats.
+* ``bzr send`` now generates valid bundles with ``--2a`` formats. However,
+ do to internal changes necessary to support this, older clients will
+ fail when trying to insert them. For newer clients, the bundle can be
+ used to apply the changes to any rich-root compatible format.
(John Arbash Meinel, #393349)
* Fixed spurious "Source branch does not support stacking" warning when
=== modified file 'bzrlib/bundle/serializer/v4.py'
--- a/bzrlib/bundle/serializer/v4.py 2009-07-28 20:21:47 +0000
+++ b/bzrlib/bundle/serializer/v4.py 2009-08-04 13:50:08 +0000
@@ -321,18 +321,32 @@
inv_vf, self.revision_keys)]
revision_order = topological_order
if self.target is not None and self.target in self.revision_ids:
- # Make sure the target is always the last entry
+ # Make sure the target revision is always the last entry
revision_order = list(topological_order)
revision_order.remove(self.target)
revision_order.append(self.target)
if self.repository._serializer.support_altered_by_hack:
+ # Repositories that support_altered_by_hack means that
+ # inventories.make_mpdiffs() contains all the data about the tree
+ # shape. Formats without support_altered_by_hack require
+ # chk_bytes/etc, so we use a different code path.
self._add_mp_records_keys('inventory', inv_vf,
[(revid,) for revid in topological_order])
else:
+ # Inventories should always be added in pure-topological order, so
+ # that we can apply the mpdiff for the child to the parent texts.
self._add_inventory_mpdiffs_from_serializer(topological_order)
self._add_revision_texts(revision_order)
def _add_inventory_mpdiffs_from_serializer(self, revision_order):
+ """Generate mpdiffs by serializing inventories.
+
+ The current repository only has part of the tree shape information in
+ the 'inventories' vf. So we use serializer.write_inventory_to_string to
+ get a 'full' representation of the tree shape, and then generate
+ mpdiffs on that data stream. This stream can then be reconstructed on
+ the other side.
+ """
inventory_key_order = [(r,) for r in revision_order]
parent_map = self.repository.inventories.get_parent_map(
inventory_key_order)
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2009-07-22 19:00:01 +0000
+++ b/bzrlib/repository.py 2009-08-04 13:50:08 +0000
@@ -2190,7 +2190,6 @@
"""
if ((None in revision_ids)
or (_mod_revision.NULL_REVISION in revision_ids)):
- import pdb; pdb.set_trace()
raise ValueError('cannot get null revision inventory')
return self._iter_inventories(revision_ids)
More information about the bazaar-commits
mailing list