/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
 
104
104
        self.build_tree(['hello'])
105
105
        wt.add('hello')
106
 
        wt.commit('add one file')
 
106
        wt.commit('add one file',
 
107
                  committer=u'\u013d\xf3r\xe9m \xcdp\u0161\xfam '
 
108
                            u'<test@example.com>')
107
109
 
108
 
        lf = StringIO()
 
110
        lf = self.make_utf8_encoded_stringio()
109
111
        # log using regular thing
110
112
        show_log(b, LongLogFormatter(lf))
111
113
        lf.seek(0)
220
222
    def test_trailing_newlines(self):
221
223
        wt = self.make_branch_and_tree('.')
222
224
        b = make_commits_with_trailing_newlines(wt)
223
 
        sio = StringIO()
 
225
        sio = self.make_utf8_encoded_stringio()
224
226
        lf = ShortLogFormatter(to_file=sio)
225
227
        show_log(b, lf)
226
228
        self.assertEquals(sio.getvalue(), """\
301
303
        self.run_bzr('merge ../child')
302
304
        wt.commit('merge branch 1')
303
305
        b = wt.branch
304
 
        sio = StringIO()
 
306
        sio = self.make_utf8_encoded_stringio()
305
307
        lf = LongLogFormatter(to_file=sio)
306
308
        show_log(b, lf, verbose=True)
307
309
        log = self.normalize_log(sio.getvalue())
357
359
        self.run_bzr('merge ../child')
358
360
        wt.commit('merge branch 1')
359
361
        b = wt.branch
360
 
        sio = StringIO()
 
362
        sio = self.make_utf8_encoded_stringio()
361
363
        lf = LongLogFormatter(to_file=sio)
362
364
        show_log(b, lf, verbose=True)
363
365
        log = self.normalize_log(sio.getvalue())
399
401
    def test_trailing_newlines(self):
400
402
        wt = self.make_branch_and_tree('.')
401
403
        b = make_commits_with_trailing_newlines(wt)
402
 
        sio = StringIO()
 
404
        sio = self.make_utf8_encoded_stringio()
403
405
        lf = LongLogFormatter(to_file=sio)
404
406
        show_log(b, lf)
405
407
        self.assertEqualDiff(sio.getvalue(), """\
498
500
            wt.commit('rev-2', rev_id='rev-2b',
499
501
                      timestamp=1132586800, timezone=36000,
500
502
                      committer='Joe Foo <joe@foo.com>')
501
 
            logfile = StringIO()
 
503
            logfile = self.make_utf8_encoded_stringio()
502
504
            formatter = ShortLogFormatter(to_file=logfile)
503
505
            show_log(wt.branch, formatter)
504
506
            logfile.flush()
516
518
    def test_trailing_newlines(self):
517
519
        wt = self.make_branch_and_tree('.')
518
520
        b = make_commits_with_trailing_newlines(wt)
519
 
        sio = StringIO()
 
521
        sio = self.make_utf8_encoded_stringio()
520
522
        lf = LineLogFormatter(to_file=sio)
521
523
        show_log(b, lf)
522
524
        self.assertEqualDiff(sio.getvalue(), """\
785
787
        self.build_tree(['tree_a/foo'])
786
788
        tree.add('foo')
787
789
        tree.commit('bar', rev_id='bar-id')
788
 
        s = StringIO()
 
790
        s = self.make_utf8_encoded_stringio()
789
791
        log.show_changed_revisions(tree.branch, [], ['bar-id'], s)
790
792
        self.assertContainsRe(s.getvalue(), 'bar')
791
793
        self.assertNotContainsRe(s.getvalue(), 'foo')