8
10
def test_simple(self):
9
11
wt = self.make_branch_and_tree('.')
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')
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')
13
15
wt.commit(message='4', committer='Jano <jano@example.com>',
14
authors=['Vinco <vinco@example.com>'], rev_id=b'4')
15
wt.commit(message='5', committer='Ferko <fero@example.com>', rev_id=b'5')
16
authors=['Vinco <vinco@example.com>'], rev_id='4')
17
wt.commit(message='5', committer='Ferko <fero@example.com>', rev_id='5')
16
18
revs, committers = get_revisions_and_committers(wt.branch.repository,
17
[b'1', b'2', b'3', b'4', b'5'])
19
['1', '2', '3', '4', '5'])
18
20
fero = ('Fero', 'fero@example.com')
19
21
jano = ('Jano', 'jano@example.com')
20
22
vinco = ('Vinco', 'vinco@example.com')
21
23
ferok = ('Ferko', 'fero@example.com')
22
self.assertEqual({fero: fero, jano: jano, vinco: vinco, ferok: fero},
24
self.assertEqual({fero: fero, jano: jano, vinco:vinco, ferok: fero},
25
27
def test_empty_email(self):
26
28
wt = self.make_branch_and_tree('.')
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')
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')
30
32
revs, committers = get_revisions_and_committers(wt.branch.repository,
32
34
self.assertEqual({('Fero', ''): ('Fero', ''),
33
35
('Jano', ''): ('Jano', ''),
36
38
def test_different_case(self):
37
39
wt = self.make_branch_and_tree('.')
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')
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')
41
43
revs, committers = get_revisions_and_committers(wt.branch.repository,
43
45
self.assertEqual({('Fero', ''): ('Fero', ''),
44
46
('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):