~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-19 16:23:53 UTC
  • mto: (6437.3.15 2.5)
  • mto: This revision was merged to the branch mainline in revision 6444.
  • Revision ID: jelmer@samba.org-20120119162353-c35bpl893up8k434
Fix remaining tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
649
649
        bundle = self.get_valid_bundle('null:', 'a@cset-0-4')
650
650
 
651
651
        # Modified files
652
 
        with open('b1/sub/dir/WithCaps.txt', 'ab') as f: f.write('\nAdding some text\n')
653
 
        with open('b1/sub/dir/ pre space', 'ab') as f: f.write(
 
652
        open('b1/sub/dir/WithCaps.txt', 'ab').write('\nAdding some text\n')
 
653
        open('b1/sub/dir/ pre space', 'ab').write(
654
654
             '\r\nAdding some\r\nDOS format lines\r\n')
655
 
        with open('b1/sub/dir/nolastnewline.txt', 'ab') as f: f.write('\n')
 
655
        open('b1/sub/dir/nolastnewline.txt', 'ab').write('\n')
656
656
        self.tree1.rename_one('sub/dir/ pre space',
657
657
                              'sub/ start space')
658
658
        self.tree1.commit('Modified files', rev_id='a@cset-0-5')
807
807
        self.tree1 = self.make_branch_and_tree('b1')
808
808
        self.b1 = self.tree1.branch
809
809
 
810
 
        with open('b1/one', 'wb') as f: f.write('one\n')
 
810
        open('b1/one', 'wb').write('one\n')
811
811
        self.tree1.add('one')
812
812
        self.tree1.commit('add file', rev_id='a@cset-0-1')
813
 
        with open('b1/one', 'wb') as f: f.write('two\n')
 
813
        open('b1/one', 'wb').write('two\n')
814
814
        self.tree1.commit('modify', rev_id='a@cset-0-2')
815
 
        with open('b1/one', 'wb') as f: f.write('three\n')
 
815
        open('b1/one', 'wb').write('three\n')
816
816
        self.tree1.commit('modify', rev_id='a@cset-0-3')
817
817
        bundle_file = StringIO()
818
818
        rev_ids = write_bundle(self.tree1.branch.repository, 'a@cset-0-3',
897
897
        bundle = self.get_valid_bundle('null:', 'white-1')
898
898
 
899
899
        # Modified
900
 
        with open('b1/trailing space ', 'ab') as f: f.write('add some text\n')
 
900
        open('b1/trailing space ', 'ab').write('add some text\n')
901
901
        self.tree1.commit('add text', rev_id='white-2')
902
902
 
903
903
        bundle = self.get_valid_bundle('white-1', 'white-2')