756
758
expected_chk_roots)
757
759
missing_chk_roots = expected_chk_roots.difference(present_chk_roots)
758
760
if missing_chk_roots:
759
problems.append("missing referenced chk root keys: %s"
762
"missing referenced chk root keys: %s."
763
"Run 'bzr reconcile --canonicalize-chks' on the affected "
760
765
% (sorted(missing_chk_roots),))
761
766
# Don't bother checking any further.
953
958
basis_tree = self.revision_tree(basis_revision_id)
954
959
basis_tree.lock_read()
955
basis_inv = basis_tree.inventory
960
basis_inv = basis_tree.root_inventory
957
962
result = basis_inv.create_by_apply_delta(delta, new_revision_id,
958
963
propagate_caches=propagate_caches)
978
983
if record.storage_kind != 'absent':
979
984
texts[record.key] = record.get_bytes_as('fulltext')
981
raise errors.NoSuchRevision(self, record.key)
986
texts[record.key] = None
983
yield inventory.CHKInventory.deserialise(self.chk_bytes, texts[key], key)
990
yield (None, key[-1])
992
yield (inventory.CHKInventory.deserialise(
993
self.chk_bytes, bytes, key), key[-1])
985
def _iter_inventory_xmls(self, revision_ids, ordering):
995
def _get_inventory_xml(self, revision_id):
996
"""Get serialized inventory as a string."""
986
997
# Without a native 'xml' inventory, this method doesn't make sense.
987
998
# However older working trees, and older bundles want it - so we supply
988
999
# it allowing _get_inventory_xml to work. Bundles currently use the
989
1000
# serializer directly; this also isn't ideal, but there isn't an xml
990
# iteration interface offered at all for repositories. We could make
991
# _iter_inventory_xmls be part of the contract, even if kept private.
992
inv_to_str = self._serializer.write_inventory_to_string
993
for inv in self.iter_inventories(revision_ids, ordering=ordering):
994
yield inv_to_str(inv), inv.revision_id
1001
# iteration interface offered at all for repositories.
1002
return self._serializer.write_inventory_to_string(
1003
self.get_inventory(revision_id))
996
1005
def _find_present_inventory_keys(self, revision_keys):
997
1006
parent_map = self.inventories.get_parent_map(revision_keys)
1377
1386
pack_compresses = True
1379
1388
def _get_matching_bzrdir(self):
1380
return bzrdir.format_registry.make_bzrdir('2a')
1389
return controldir.format_registry.make_bzrdir('2a')
1382
1391
def _ignore_setting_bzrdir(self, format):
1385
1394
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
1387
def get_format_string(self):
1397
def get_format_string(cls):
1388
1398
return ('Bazaar repository format 2a (needs bzr 1.16 or later)\n')
1390
1400
def get_format_description(self):
1401
1411
def _get_matching_bzrdir(self):
1402
return bzrdir.format_registry.make_bzrdir('development-subtree')
1412
return controldir.format_registry.make_bzrdir('development-subtree')
1404
1414
def _ignore_setting_bzrdir(self, format):
1407
1417
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
1409
def get_format_string(self):
1420
def get_format_string(cls):
1410
1421
return ('Bazaar development format 8\n')
1412
1423
def get_format_description(self):