10
8
def test_simple(self):
11
9
wt = self.make_branch_and_tree('.')
12
wt.commit(message='1', committer='Fero <fero@example.com>', rev_id='1')
13
wt.commit(message='2', committer='Fero <fero@example.com>', rev_id='2')
14
wt.commit(message='3', committer='Jano <jano@example.com>', rev_id='3')
10
wt.commit(message='1', committer='Fero <fero@example.com>', rev_id=b'1')
11
wt.commit(message='2', committer='Fero <fero@example.com>', rev_id=b'2')
12
wt.commit(message='3', committer='Jano <jano@example.com>', rev_id=b'3')
15
13
wt.commit(message='4', committer='Jano <jano@example.com>',
16
authors=['Vinco <vinco@example.com>'], rev_id='4')
17
wt.commit(message='5', committer='Ferko <fero@example.com>', rev_id='5')
14
authors=['Vinco <vinco@example.com>'], rev_id=b'4')
15
wt.commit(message='5', committer='Ferko <fero@example.com>', rev_id=b'5')
18
16
revs, committers = get_revisions_and_committers(wt.branch.repository,
19
['1', '2', '3', '4', '5'])
17
[b'1', b'2', b'3', b'4', b'5'])
20
18
fero = ('Fero', 'fero@example.com')
21
19
jano = ('Jano', 'jano@example.com')
22
20
vinco = ('Vinco', 'vinco@example.com')
23
21
ferok = ('Ferko', 'fero@example.com')
24
self.assertEqual({fero: fero, jano: jano, vinco:vinco, ferok: fero},
22
self.assertEqual({fero: fero, jano: jano, vinco: vinco, ferok: fero},
27
25
def test_empty_email(self):
28
26
wt = self.make_branch_and_tree('.')
29
wt.commit(message='1', committer='Fero', rev_id='1')
30
wt.commit(message='2', committer='Fero', rev_id='2')
31
wt.commit(message='3', committer='Jano', rev_id='3')
27
wt.commit(message='1', committer='Fero', rev_id=b'1')
28
wt.commit(message='2', committer='Fero', rev_id=b'2')
29
wt.commit(message='3', committer='Jano', rev_id=b'3')
32
30
revs, committers = get_revisions_and_committers(wt.branch.repository,
34
32
self.assertEqual({('Fero', ''): ('Fero', ''),
35
33
('Jano', ''): ('Jano', ''),
38
36
def test_different_case(self):
39
37
wt = self.make_branch_and_tree('.')
40
wt.commit(message='1', committer='Fero', rev_id='1')
41
wt.commit(message='2', committer='Fero', rev_id='2')
42
wt.commit(message='3', committer='FERO', rev_id='3')
38
wt.commit(message='1', committer='Fero', rev_id=b'1')
39
wt.commit(message='2', committer='Fero', rev_id=b'2')
40
wt.commit(message='3', committer='FERO', rev_id=b'3')
43
41
revs, committers = get_revisions_and_committers(wt.branch.repository,
45
43
self.assertEqual({('Fero', ''): ('Fero', ''),
46
44
('FERO', ''): ('Fero', ''),
46
self.assertEquals([b'1', b'2', b'3'], sorted(
47
[r.revision_id for r in revs]))
50
50
class TestCollapseByPerson(TestCase):