~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_annotate.py

  • Committer: Andrew Bennetts
  • Date: 2007-08-30 08:11:54 UTC
  • mfrom: (2766 +trunk)
  • mto: (2535.3.55 repo-refactor)
  • mto: This revision was merged to the branch mainline in revision 2772.
  • Revision ID: andrew.bennetts@canonical.com-20070830081154-16hebp2xwr15x2hc
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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())
340
340
 
 
341
    def test_annotate_author_or_committer(self):
 
342
        tree1 = self.make_branch_and_tree('tree1')
 
343
 
 
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)
 
349
 
 
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)
 
356
 
 
357
        to_file = StringIO()
 
358
        annotate.annotate_file(tree1.branch, 'rev-1', 'a-id', to_file=to_file)
 
359
        self.assertEqual('1   committ | hello\n', to_file.getvalue())
 
360
 
 
361
        to_file = StringIO()
 
362
        annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
 
363
        self.assertEqual('2   author@ | bye\n', to_file.getvalue())
 
364
 
341
365
 
342
366
class TestReannotate(tests.TestCase):
343
367