/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 bzrlib/repofmt/groupcompress_repo.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-17 01:48:56 UTC
  • mfrom: (4543 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4545.
  • Revision ID: andrew.bennetts@canonical.com-20090717014856-c8igd2f9abbi3v30
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    osutils,
31
31
    pack,
32
32
    remote,
33
 
    repository,
34
33
    revision as _mod_revision,
35
34
    trace,
36
35
    ui,
39
38
    BTreeGraphIndex,
40
39
    BTreeBuilder,
41
40
    )
42
 
from bzrlib.index import GraphIndex, GraphIndexBuilder
43
41
from bzrlib.groupcompress import (
44
42
    _GCGraphIndex,
45
43
    GroupCompressVersionedFiles,
445
443
        #      is grabbing too many keys...
446
444
        text_keys = source_vf.keys()
447
445
        self._copy_stream(source_vf, target_vf, text_keys,
448
 
                          'text', self._get_progress_stream, 4)
 
446
                          'texts', self._get_progress_stream, 4)
449
447
 
450
448
    def _copy_signature_texts(self):
451
449
        source_vf, target_vf = self._build_vfs('signature', False, False)
622
620
        self.inventories = GroupCompressVersionedFiles(
623
621
            _GCGraphIndex(self._pack_collection.inventory_index.combined_index,
624
622
                add_callback=self._pack_collection.inventory_index.add_callback,
625
 
                parents=True, is_locked=self.is_locked),
 
623
                parents=True, is_locked=self.is_locked,
 
624
                inconsistency_fatal=False),
626
625
            access=self._pack_collection.inventory_index.data_access)
627
626
        self.revisions = GroupCompressVersionedFiles(
628
627
            _GCGraphIndex(self._pack_collection.revision_index.combined_index,
634
633
        self.signatures = GroupCompressVersionedFiles(
635
634
            _GCGraphIndex(self._pack_collection.signature_index.combined_index,
636
635
                add_callback=self._pack_collection.signature_index.add_callback,
637
 
                parents=False, is_locked=self.is_locked),
 
636
                parents=False, is_locked=self.is_locked,
 
637
                inconsistency_fatal=False),
638
638
            access=self._pack_collection.signature_index.data_access,
639
639
            delta=False)
640
640
        self.texts = GroupCompressVersionedFiles(
641
641
            _GCGraphIndex(self._pack_collection.text_index.combined_index,
642
642
                add_callback=self._pack_collection.text_index.add_callback,
643
 
                parents=True, is_locked=self.is_locked),
 
643
                parents=True, is_locked=self.is_locked,
 
644
                inconsistency_fatal=False),
644
645
            access=self._pack_collection.text_index.data_access)
645
646
        # No parents, individual CHK pages don't have specific ancestry
646
647
        self.chk_bytes = GroupCompressVersionedFiles(
647
648
            _GCGraphIndex(self._pack_collection.chk_index.combined_index,
648
649
                add_callback=self._pack_collection.chk_index.add_callback,
649
 
                parents=False, is_locked=self.is_locked),
 
650
                parents=False, is_locked=self.is_locked,
 
651
                inconsistency_fatal=False),
650
652
            access=self._pack_collection.chk_index.data_access)
 
653
        search_key_name = self._format._serializer.search_key_name
 
654
        search_key_func = chk_map.search_key_registry.get(search_key_name)
 
655
        self.chk_bytes._search_key_func = search_key_func
651
656
        # True when the repository object is 'write locked' (as opposed to the
652
657
        # physical lock only taken out around changes to the pack-names list.)
653
658
        # Another way to represent this would be a decorator around the control