~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Aaron Bentley
  • Date: 2007-06-29 18:20:57 UTC
  • mto: (2520.4.120 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070629182057-c39r2mc22atnjlzs
Test installing revisions with subtrees

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from bzrlib.bzrdir import BzrDir
31
31
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
32
32
from bzrlib.bundle.bundle_data import BundleTree
33
 
from bzrlib.bundle.serializer import write_bundle, read_bundle, v4
 
33
from bzrlib.bundle.serializer import write_bundle, read_bundle, v09, v4
34
34
from bzrlib.bundle.serializer.v08 import BundleSerializerV08
35
35
from bzrlib.bundle.serializer.v09 import BundleSerializerV09
36
36
from bzrlib.bundle.serializer.v4 import BundleSerializerV4
1035
1035
        result = bundle.get_merge_request(tree.branch.repository)
1036
1036
        self.assertEqual((None, 'rev1', 'inapplicable'), result)
1037
1037
 
 
1038
    def test_with_subtree(self):
 
1039
        tree = self.make_branch_and_tree('tree',
 
1040
                                         format='dirstate-with-subtree')
 
1041
        self.b1 = tree.branch
 
1042
        subtree = self.make_branch_and_tree('tree/subtree',
 
1043
                                            format='dirstate-with-subtree')
 
1044
        tree.add('subtree')
 
1045
        tree.commit('hello', rev_id='rev1')
 
1046
        try:
 
1047
            bundle = read_bundle(self.create_bundle_text(None, 'rev1')[0])
 
1048
        except errors.IncompatibleBundleFormat:
 
1049
            raise TestSkipped("Format 0.8 doesn't work with knit3")
 
1050
        if isinstance(bundle, v09.BundleInfo09):
 
1051
            raise TestSkipped("Format 0.9 doesn't work with subtrees")
 
1052
        repo = self.make_repository('repo', format='knit')
 
1053
        self.assertRaises(errors.IncompatibleRevision,
 
1054
                          bundle.install_revisions, repo)
 
1055
        repo2 = self.make_repository('repo2', format='dirstate-with-subtree')
 
1056
        bundle.install_revisions(repo2)
 
1057
 
1038
1058
 
1039
1059
class V08BundleTester(BundleTester, TestCaseWithTransport):
1040
1060