~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-21 04:49:05 UTC
  • mfrom: (2367.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070321044905-ded01a80ab49bdd9
Update NEWS to match bzr 0.15.

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(), '\btwo\b')
 
767
        self.assertNotContainsRe(bundle_file.getvalue(), 'two')
768
768
        self.assertContainsRe(bundle_file.getvalue(), 'one')
769
769
        self.assertContainsRe(bundle_file.getvalue(), 'three')
770
770
 
784
784
            u'William Dod\xe9\n').encode('utf-8'))
785
785
        f.close()
786
786
 
787
 
        self.tree1.add([u'with Dod\xe9'], ['withdod-id'])
788
 
        self.tree1.commit(u'i18n commit from William Dod\xe9',
 
787
        self.tree1.add([u'with Dod\xe9'])
 
788
        self.tree1.commit(u'i18n commit from William Dod\xe9', 
789
789
                          rev_id='i18n-1', committer=u'William Dod\xe9')
790
790
 
791
 
        if sys.platform == 'darwin':
792
 
            # On Mac the '\xe9' gets changed to 'e\u0301'
793
 
            self.assertEqual([u'.bzr', u'with Dode\u0301'],
794
 
                             sorted(os.listdir(u'b1')))
795
 
            delta = self.tree1.changes_from(self.tree1.basis_tree())
796
 
            self.assertEqual([(u'with Dod\xe9', 'withdod-id', 'file')],
797
 
                             delta.removed)
798
 
            self.knownFailure("Mac OSX doesn't preserve unicode"
799
 
                              " combining characters.")
800
 
 
801
791
        # Add
802
792
        bundle = self.get_valid_bundle(None, 'i18n-1')
803
793
 
894
884
        tree = bundle.revision_tree(self.b1.repository, 'revid1')
895
885
        self.assertEqual('revid1', tree.inventory.root.revision)
896
886
 
897
 
    def test_install_revisions(self):
898
 
        self.tree1 = self.make_branch_and_tree('b1')
899
 
        self.b1 = self.tree1.branch
900
 
        self.tree1.commit('message', rev_id='rev2a')
901
 
        bundle = self.get_valid_bundle(None, 'rev2a')
902
 
        branch2 = self.make_branch('b2')
903
 
        self.assertFalse(branch2.repository.has_revision('rev2a'))
904
 
        target_revision = bundle.install_revisions(branch2.repository)
905
 
        self.assertTrue(branch2.repository.has_revision('rev2a'))
906
 
        self.assertEqual('rev2a', target_revision)
907
 
 
908
887
 
909
888
class V09BundleKnit2Tester(V08BundleTester):
910
889