~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Aaron Bentley
  • Date: 2008-04-24 04:58:42 UTC
  • mfrom: (3377 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3380.
  • Revision ID: aaron@aaronbentley.com-20080424045842-0cajl9v6s4u52kaw
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1061
1061
            deltas=True, parents=True)
1062
1062
        output_knit = knit.KnitVersionedFile('reconcile-texts',
1063
1063
            self._pack_collection.transport,
1064
 
            None,
1065
1064
            index=knit_index,
1066
1065
            access_method=_PackAccess(
1067
1066
                {self.new_pack.text_index:self.new_pack.access_tuple()},
1706
1705
        self.repo._revision_knit = knit.KnitVersionedFile(
1707
1706
            'revisions', self.transport.clone('..'),
1708
1707
            self.repo.control_files._file_mode,
1709
 
            create=False, access_mode=self.repo._access_mode(),
 
1708
            create=False,
1710
1709
            index=knit_index, delta=False, factory=knit.KnitPlainFactory(),
1711
1710
            access_method=self.repo._pack_collection.revision_index.knit_access)
1712
1711
        return self.repo._revision_knit
1724
1723
        self.repo._signature_knit = knit.KnitVersionedFile(
1725
1724
            'signatures', self.transport.clone('..'),
1726
1725
            self.repo.control_files._file_mode,
1727
 
            create=False, access_mode=self.repo._access_mode(),
 
1726
            create=False,
1728
1727
            index=knit_index, delta=False, factory=knit.KnitPlainFactory(),
1729
1728
            access_method=self.repo._pack_collection.signature_index.knit_access)
1730
1729
        return self.repo._signature_knit
1813
1812
        return knit.KnitVersionedFile(
1814
1813
            'inventory', self.transport.clone('..'),
1815
1814
            self.repo.control_files._file_mode,
1816
 
            create=False, access_mode=self.repo._access_mode(),
 
1815
            create=False,
1817
1816
            index=knit_index, delta=True, factory=knit.KnitPlainFactory(),
1818
1817
            access_method=self.repo._pack_collection.inventory_index.knit_access)
1819
1818
 
1849
1848
    def _abort_write_group(self):
1850
1849
        self._pack_collection._abort_write_group()
1851
1850
 
1852
 
    def _access_mode(self):
1853
 
        """Return 'w' or 'r' for depending on whether a write lock is active.
1854
 
        
1855
 
        This method is a helper for the Knit-thunking support objects.
1856
 
        """
1857
 
        if self.is_write_locked():
1858
 
            return 'w'
1859
 
        return 'r'
1860
 
 
1861
1851
    def _find_inconsistent_revision_parents(self):
1862
1852
        """Find revisions with incorrectly cached parents.
1863
1853
 
2121
2111
            repo_transport,
2122
2112
            prefixed=False,
2123
2113
            file_mode=control_files._file_mode,
2124
 
            versionedfile_class=knit.KnitVersionedFile,
 
2114
            versionedfile_class=knit.make_file_knit,
2125
2115
            versionedfile_kwargs={'factory': knit.KnitPlainFactory()},
2126
2116
            )
2127
2117
 
2132
2122
            file_mode=control_files._file_mode,
2133
2123
            prefixed=False,
2134
2124
            precious=True,
2135
 
            versionedfile_class=knit.KnitVersionedFile,
 
2125
            versionedfile_class=knit.make_file_knit,
2136
2126
            versionedfile_kwargs={'delta': False,
2137
2127
                                  'factory': knit.KnitPlainFactory(),
2138
2128
                                 },
2145
2135
        return self._get_versioned_file_store('knits',
2146
2136
                                  transport,
2147
2137
                                  control_files,
2148
 
                                  versionedfile_class=knit.KnitVersionedFile,
 
2138
                                  versionedfile_class=knit.make_file_knit,
2149
2139
                                  versionedfile_kwargs={
2150
2140
                                      'create_parent_dir': True,
2151
2141
                                      'delay_create': True,