338
338
annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
339
339
self.assertContainsRe('2 p.rez | bye\n', to_file.getvalue())
341
def test_annotate_author_or_committer(self):
342
tree1 = self.make_branch_and_tree('tree1')
344
self.build_tree_contents([('tree1/a', 'hello')])
345
tree1.add(['a'], ['a-id'])
346
tree1.commit('a', rev_id='rev-1',
347
committer='Committer <committer@example.com>',
348
timestamp=1166046000.00, timezone=0)
350
self.build_tree_contents([('tree1/b', 'bye')])
351
tree1.add(['b'], ['b-id'])
352
tree1.commit('b', rev_id='rev-2',
353
committer='Committer <committer@example.com>',
354
author='Author <author@example.com>',
355
timestamp=1166046000.00, timezone=0)
358
annotate.annotate_file(tree1.branch, 'rev-1', 'a-id', to_file=to_file)
359
self.assertEqual('1 committ | hello\n', to_file.getvalue())
362
annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
363
self.assertEqual('2 author@ | bye\n', to_file.getvalue())
342
366
class TestReannotate(tests.TestCase):