~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Robert Collins
  • Date: 2009-02-27 01:02:40 UTC
  • mto: This revision was merged to the branch mainline in revision 4060.
  • Revision ID: robertc@robertcollins.net-20090227010240-35dzaxn8bah0razi
Move the fetch control attributes from Repository to RepositoryFormat.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        """Weaves need topological data insertion."""
168
168
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
169
169
        repo = weaverepo.RepositoryFormat6().initialize(control)
170
 
        self.assertEqual('topological', repo._fetch_order)
 
170
        self.assertEqual('topological', repo._format._fetch_order)
171
171
 
172
172
    def test_attribute__fetch_uses_deltas(self):
173
173
        """Weaves do not reuse deltas."""
174
174
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
175
175
        repo = weaverepo.RepositoryFormat6().initialize(control)
176
 
        self.assertEqual(False, repo._fetch_uses_deltas)
 
176
        self.assertEqual(False, repo._format._fetch_uses_deltas)
177
177
 
178
178
    def test_attribute__fetch_reconcile(self):
179
179
        """Weave repositories need a reconcile after fetch."""
180
180
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
181
181
        repo = weaverepo.RepositoryFormat6().initialize(control)
182
 
        self.assertEqual(True, repo._fetch_reconcile)
 
182
        self.assertEqual(True, repo._format._fetch_reconcile)
183
183
 
184
184
    def test_no_ancestry_weave(self):
185
185
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
202
202
        """Weaves need topological data insertion."""
203
203
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
204
204
        repo = weaverepo.RepositoryFormat7().initialize(control)
205
 
        self.assertEqual('topological', repo._fetch_order)
 
205
        self.assertEqual('topological', repo._format._fetch_order)
206
206
 
207
207
    def test_attribute__fetch_uses_deltas(self):
208
208
        """Weaves do not reuse deltas."""
209
209
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
210
210
        repo = weaverepo.RepositoryFormat7().initialize(control)
211
 
        self.assertEqual(False, repo._fetch_uses_deltas)
 
211
        self.assertEqual(False, repo._format._fetch_uses_deltas)
212
212
 
213
213
    def test_attribute__fetch_reconcile(self):
214
214
        """Weave repositories need a reconcile after fetch."""
215
215
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
216
216
        repo = weaverepo.RepositoryFormat7().initialize(control)
217
 
        self.assertEqual(True, repo._fetch_reconcile)
 
217
        self.assertEqual(True, repo._format._fetch_reconcile)
218
218
 
219
219
    def test_disk_layout(self):
220
220
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
348
348
        """Knits need topological data insertion."""
349
349
        repo = self.make_repository('.',
350
350
                format=bzrdir.format_registry.get('knit')())
351
 
        self.assertEqual('topological', repo._fetch_order)
 
351
        self.assertEqual('topological', repo._format._fetch_order)
352
352
 
353
353
    def test_attribute__fetch_uses_deltas(self):
354
354
        """Knits reuse deltas."""
355
355
        repo = self.make_repository('.',
356
356
                format=bzrdir.format_registry.get('knit')())
357
 
        self.assertEqual(True, repo._fetch_uses_deltas)
 
357
        self.assertEqual(True, repo._format._fetch_uses_deltas)
358
358
 
359
359
    def test_disk_layout(self):
360
360
        control = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
619
619
        format = bzrdir.BzrDirMetaFormat1()
620
620
        format.repository_format = knitrepo.RepositoryFormatKnit3()
621
621
        repo = self.make_repository('.', format=format)
622
 
        self.assertEqual('topological', repo._fetch_order)
 
622
        self.assertEqual('topological', repo._format._fetch_order)
623
623
 
624
624
    def test_attribute__fetch_uses_deltas(self):
625
625
        """Knits reuse deltas."""
626
626
        format = bzrdir.BzrDirMetaFormat1()
627
627
        format.repository_format = knitrepo.RepositoryFormatKnit3()
628
628
        repo = self.make_repository('.', format=format)
629
 
        self.assertEqual(True, repo._fetch_uses_deltas)
 
629
        self.assertEqual(True, repo._format._fetch_uses_deltas)
630
630
 
631
631
    def test_convert(self):
632
632
        """Ensure the upgrade adds weaves for roots"""