~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Martin Pool
  • Date: 2007-02-06 08:16:13 UTC
  • mto: This revision was merged to the branch mainline in revision 2283.
  • Revision ID: mbp@sourcefrog.net-20070206081613-dxop566k13bll6j0
Move KnitFormat2 into repofmt

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from bzrlib.errors import (BzrError, TestamentMismatch, NotABundle, BadBundle, 
39
39
                           NoSuchFile,)
40
40
from bzrlib.merge import Merge3Merger
 
41
from bzrlib.repofmt import knitrepo
41
42
from bzrlib.osutils import has_symlinks, sha_file
42
43
from bzrlib.tests import (TestCaseInTempDir, TestCaseWithTransport,
43
44
                          TestCase, TestSkipped)
313
314
 
314
315
    def test_mismatched_bundle(self):
315
316
        format = bzrdir.BzrDirMetaFormat1()
316
 
        format.repository_format = repository.RepositoryFormatKnit2()
 
317
        format.repository_format = knitrepo.RepositoryFormatKnit2()
317
318
        serializer = BundleSerializerV08('0.8')
318
319
        b = self.make_branch('.', format=format)
319
320
        self.assertRaises(errors.IncompatibleBundleFormat, serializer.write, 
322
323
    def test_matched_bundle(self):
323
324
        """Don't raise IncompatibleBundleFormat for knit2 and bundle0.9"""
324
325
        format = bzrdir.BzrDirMetaFormat1()
325
 
        format.repository_format = repository.RepositoryFormatKnit2()
 
326
        format.repository_format = knitrepo.RepositoryFormatKnit2()
326
327
        serializer = BundleSerializerV09('0.9')
327
328
        b = self.make_branch('.', format=format)
328
329
        serializer.write(b.repository, [], {}, StringIO())
330
331
    def test_mismatched_model(self):
331
332
        """Try copying a bundle from knit2 to knit1"""
332
333
        format = bzrdir.BzrDirMetaFormat1()
333
 
        format.repository_format = repository.RepositoryFormatKnit2()
 
334
        format.repository_format = knitrepo.RepositoryFormatKnit2()
334
335
        source = self.make_branch_and_tree('source', format=format)
335
336
        source.commit('one', rev_id='one-id')
336
337
        source.commit('two', rev_id='two-id')
890
891
 
891
892
    def bzrdir_format(self):
892
893
        format = bzrdir.BzrDirMetaFormat1()
893
 
        format.repository_format = repository.RepositoryFormatKnit2()
 
894
        format.repository_format = knitrepo.RepositoryFormatKnit2()
894
895
        return format
895
896
 
896
897