/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/weave_fmt/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2020-01-25 14:07:41 UTC
  • mto: This revision was merged to the branch mainline in revision 7462.
  • Revision ID: jelmer@jelmer.uk-20200125140741-f47wzeyf4rbrl7fx
Add a 'lines' storage kind.

Show diffs side-by-side

added added

removed removed

Lines of Context:
628
628
            if record.storage_kind == 'absent':
629
629
                raise errors.RevisionNotPresent([record.key[0]], self)
630
630
            # adapt to non-tuple interface
631
 
            if record.storage_kind == 'fulltext':
 
631
            if record.storage_kind in ('fulltext', 'chunks', 'lines'):
632
632
                self.add_lines(record.key, None,
633
 
                               osutils.split_lines(record.get_bytes_as('fulltext')))
 
633
                               record.get_bytes_as('lines'))
634
634
            else:
635
 
                adapter_key = record.storage_kind, 'fulltext'
 
635
                adapter_key = record.storage_kind, 'lines'
636
636
                try:
637
637
                    adapter = adapters[adapter_key]
638
638
                except KeyError:
639
639
                    adapter_factory = adapter_registry.get(adapter_key)
640
640
                    adapter = adapter_factory(self)
641
641
                    adapters[adapter_key] = adapter
642
 
                lines = osutils.split_lines(adapter.get_bytes(
643
 
                    record, record.get_bytes_as(record.storage_kind)))
 
642
                lines = adapter.get_bytes(
 
643
                    record, record.get_bytes_as(record.storage_kind))
644
644
                try:
645
645
                    self.add_lines(record.key, None, lines)
646
646
                except errors.RevisionAlreadyPresent: