301
302
'rev-1_1_1_1_1_1_1 | sixth\n',
305
def test_annotate_unicode_author(self):
306
tree1 = self.make_branch_and_tree('tree1')
308
self.build_tree_contents([('tree1/a', 'adi\xc3\xb3s')])
309
tree1.add(['a'], ['a-id'])
310
tree1.commit('a', rev_id='rev-1',
311
committer=u'Pepe P\xe9rez <pperez@ejemplo.com>',
312
timestamp=1166046000.00, timezone=0)
314
self.build_tree_contents([('tree1/b', 'bye')])
315
tree1.add(['b'], ['b-id'])
316
tree1.commit('b', rev_id='rev-2',
317
committer=u'p\xe9rez',
318
timestamp=1166046000.00, timezone=0)
320
# the test passes if the annotate_file() calls below do not raise an
323
to_file = codecs.EncodedFile(StringIO(), 'utf-8')
324
annotate.annotate_file(tree1.branch, 'rev-1', 'a-id', to_file=to_file)
326
to_file = codecs.getwriter('ascii')(StringIO())
327
to_file.encoding = 'ascii' # codecs does not set it
328
annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
305
331
class TestReannotate(tests.TestCase):