~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-04-04 01:22:11 UTC
  • mfrom: (2393.1.1 bzr.docs)
  • mto: This revision was merged to the branch mainline in revision 2397.
  • Revision ID: mbp@sourcefrog.net-20070404012211-sq269me6bai9m6xk
merge trunk and doc fix from elliot

Show diffs side-by-side

added added

removed removed

Lines of Context:
764
764
        bundle_file = StringIO()
765
765
        rev_ids = write_bundle(self.tree1.branch.repository, 'a@cset-0-3',
766
766
                               'a@cset-0-1', bundle_file, format=self.format)
767
 
        self.assertNotContainsRe(bundle_file.getvalue(), 'two')
 
767
        self.assertNotContainsRe(bundle_file.getvalue(), '\btwo\b')
768
768
        self.assertContainsRe(bundle_file.getvalue(), 'one')
769
769
        self.assertContainsRe(bundle_file.getvalue(), 'three')
770
770
 
884
884
        tree = bundle.revision_tree(self.b1.repository, 'revid1')
885
885
        self.assertEqual('revid1', tree.inventory.root.revision)
886
886
 
 
887
    def test_install_revisions(self):
 
888
        self.tree1 = self.make_branch_and_tree('b1')
 
889
        self.b1 = self.tree1.branch
 
890
        self.tree1.commit('message', rev_id='rev2a')
 
891
        bundle = self.get_valid_bundle(None, 'rev2a')
 
892
        branch2 = self.make_branch('b2')
 
893
        self.assertFalse(branch2.repository.has_revision('rev2a'))
 
894
        target_revision = bundle.install_revisions(branch2.repository)
 
895
        self.assertTrue(branch2.repository.has_revision('rev2a'))
 
896
        self.assertEqual('rev2a', target_revision)
 
897
 
887
898
 
888
899
class V09BundleKnit2Tester(V08BundleTester):
889
900