/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/tests/test_bundle.py

  • Committer: Aaron Bentley
  • Date: 2006-09-22 01:05:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2048.
  • Revision ID: aaron.bentley@utoronto.ca-20060922010530-632a5f35fb488eb2
Ensure that new-model revisions aren't installed into old-model repos

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
        b = self.make_branch('.', format=format)
322
322
        serializer.write(b.repository, [], {}, StringIO())
323
323
 
 
324
    def test_mismatched_model(self):
 
325
        """Try copying a bundle from knit2 to knit1"""
 
326
        format = bzrdir.BzrDirMetaFormat1()
 
327
        format.repository_format = repository.RepositoryFormatKnit2()
 
328
        source = self.make_branch_and_tree('source', format=format)
 
329
        source.commit('one', rev_id='one-id')
 
330
        source.commit('two', rev_id='two-id')
 
331
        text = StringIO()
 
332
        write_bundle(source.branch.repository, 'two-id', None, text, 
 
333
                     format='0.9')
 
334
        text.seek(0)
 
335
 
 
336
        format = bzrdir.BzrDirMetaFormat1()
 
337
        format.repository_format = repository.RepositoryFormatKnit1()
 
338
        target = self.make_branch('target', format=format)
 
339
        self.assertRaises(errors.IncompatibleRevision, install_bundle, 
 
340
                          target.repository, read_bundle(text))
 
341
 
324
342
 
325
343
class V08BundleTester(TestCaseWithTransport):
326
344