~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/changeset/old_tests.py

  • Committer: Aaron Bentley
  • Date: 2006-05-14 13:57:49 UTC
  • mto: (1185.82.108 w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: aaron.bentley@utoronto.ca-20060514135749-1569e556e5990ac8
Switched tests to use serializer

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
        from cStringIO import StringIO
296
296
        from bzrlib.changeset.gen_changeset import show_changeset
297
297
        from bzrlib.changeset.read_changeset import read_changeset
 
298
        from bzrlib.changeset.serializer import write
298
299
 
299
300
        cset_txt = StringIO()
300
 
        show_changeset(self.b1.repository, base_rev_id, self.b1, rev_id, 
301
 
                       to_file=cset_txt, message=message)
 
301
        write(self.b1.repository, [rev_id], cset_txt)
302
302
        cset_txt.seek(0)
303
 
        self.assertEqual(cset_txt.readline(), '# Bazaar-NG changeset v0.1.0\n')
304
 
        self.assertEqual(cset_txt.readline(), '# \n')
 
303
        self.assertEqual(cset_txt.readline(), '# Bazaar changeset v0.6\n')
 
304
        self.assertEqual(cset_txt.readline(), '#\n')
305
305
 
306
306
        rev = self.b1.repository.get_revision(rev_id)
307
307
        self.assertEqual(cset_txt.readline().decode('utf-8'),
308
 
                u'# committer: %s\n' % rev.committer)
 
308
                u'# revision id: %s\n' % rev.revision_id)
309
309
 
310
310
        open(',,cset', 'wb').write(cset_txt.getvalue())
311
311
        cset_txt.seek(0)