~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-22 21:02:21 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070622210221-1k64tr26h5wb00fn
Clean up tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
        rev = self.b1.repository.get_revision(rev_id)
378
378
        self.assertEqual(bundle_txt.readline().decode('utf-8'),
379
379
                         u'# message:\n')
380
 
 
381
 
        open(',,bundle', 'wb').write(bundle_txt.getvalue())
382
380
        bundle_txt.seek(0)
383
381
        return bundle_txt, rev_ids
384
382
 
549
547
        self.tree1.commit('add one', rev_id='a@cset-0-1')
550
548
 
551
549
        bundle = self.get_valid_bundle(None, 'a@cset-0-1')
552
 
        # FIXME: The current write_bundle api no longer supports
553
 
        #        setting a custom summary message
554
 
        #        We should re-introduce the ability, and update
555
 
        #        the tests to make sure it works.
556
 
        # bundle = self.get_valid_bundle(None, 'a@cset-0-1',
557
 
        #         message='With a specialized message')
558
550
 
559
551
        # Make sure we can handle files with spaces, tabs, other
560
552
        # bogus characters
621
613
 
622
614
        # Modified files
623
615
        open('b1/sub/dir/WithCaps.txt', 'ab').write('\nAdding some text\n')
624
 
        open('b1/sub/dir/ pre space', 'ab').write('\r\nAdding some\r\nDOS format lines\r\n')
 
616
        open('b1/sub/dir/ pre space', 'ab').write(
 
617
             '\r\nAdding some\r\nDOS format lines\r\n')
625
618
        open('b1/sub/dir/nolastnewline.txt', 'ab').write('\n')
626
619
        self.tree1.rename_one('sub/dir/ pre space', 
627
620
                              'sub/ start space')
686
679
        
687
680
        # Add
688
681
        tt.new_file('file', tt.root, '\x00\n\x00\r\x01\n\x02\r\xff', 'binary-1')
689
 
        tt.new_file('file2', tt.root, '\x01\n\x02\r\x03\n\x04\r\xff', 'binary-2')
 
682
        tt.new_file('file2', tt.root, '\x01\n\x02\r\x03\n\x04\r\xff',
 
683
            'binary-2')
690
684
        tt.apply()
691
685
        self.tree1.commit('add binary', rev_id='b@cset-0-1')
692
686
        self.get_valid_bundle(None, 'b@cset-0-1')
1190
1184
        self.assertEqual(bundle_txt.readline(), 
1191
1185
                         '# Bazaar revision bundle v%s\n' % self.format)
1192
1186
        self.assertEqual(bundle_txt.readline(), '#\n')
1193
 
 
1194
1187
        rev = self.b1.repository.get_revision(rev_id)
1195
 
 
1196
 
        open(',,bundle', 'wb').write(bundle_txt.getvalue())
1197
1188
        bundle_txt.seek(0)
1198
1189
        return bundle_txt, rev_ids
1199
1190