/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: 2007-06-26 18:39:35 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070626183935-jxfsq72rkej7ptoz
Test conversion across models

Show diffs side-by-side

added added

removed removed

Lines of Context:
997
997
        bundle.install_revisions(repo)
998
998
        inv_text = repo.get_inventory_xml('rev2')
999
999
        self.assertNotContainsRe(inv_text, 'format="5"')
 
1000
        self.assertContainsRe(inv_text, 'format="7"')
 
1001
 
 
1002
    def test_across_models(self):
 
1003
        tree = self.make_simple_tree('knit')
 
1004
        tree.commit('hello', rev_id='rev1')
 
1005
        tree.commit('hello', rev_id='rev2')
 
1006
        bundle = read_bundle(self.create_bundle_text(None, 'rev2')[0])
 
1007
        repo = self.make_repository('repo', format='dirstate-with-subtree')
 
1008
        bundle.install_revisions(repo)
 
1009
        inv = repo.get_inventory('rev2')
 
1010
        self.assertEqual('rev2', inv.root.revision)
 
1011
        root_vf = repo.weave_store.get_weave(inv.root.file_id,
 
1012
                                             repo.get_transaction())
 
1013
        self.assertEqual(root_vf.versions(), ['rev1', 'rev2'])
 
1014
 
 
1015
    def test_across_models_incompatible(self):
 
1016
        tree = self.make_simple_tree('dirstate-with-subtree')
 
1017
        tree.commit('hello', rev_id='rev1')
 
1018
        tree.commit('hello', rev_id='rev2')
 
1019
        try:
 
1020
            bundle = read_bundle(self.create_bundle_text(None, 'rev1')[0])
 
1021
        except errors.IncompatibleBundleFormat:
 
1022
            raise TestSkipped("Format 0.8 doesn't work with knit3")
 
1023
        repo = self.make_repository('repo', format='knit')
 
1024
        bundle.install_revisions(repo)
 
1025
 
 
1026
        bundle = read_bundle(self.create_bundle_text(None, 'rev2')[0])
 
1027
        self.assertRaises(errors.IncompatibleRevision,
 
1028
                          bundle.install_revisions, repo)
1000
1029
 
1001
1030
 
1002
1031
class V08BundleTester(BundleTester, TestCaseWithTransport):