comparison tests/test-summary.py @ 164:568bca4ff58e

tests: update test-summary for mercurial 3.5 changeset 1ef96a3b8b89 added some phases information to 'hg summary'. Reported at https://bugs.debian.org/797287
author Julien Cristau <julien.cristau@logilab.fr>
date Mon, 31 Aug 2015 09:52:34 +0200
parents c1b966866ed7
children dbb21a4c0eb9
comparison
equal deleted inserted replaced
163:8bc9c076cbb6 164:568bca4ff58e
17 17
18 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], 18 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))],
19 b('branch') : b('default'), 19 b('branch') : b('default'),
20 b('commit') : True, 20 b('commit') : True,
21 b('update') : 0} 21 b('update') : 0}
22 if self.client.version >= (3, 5):
23 d[b('phases')] = '1 draft'
22 24
23 self.assertEquals(self.client.summary(), d) 25 self.assertEquals(self.client.summary(), d)
24 26
25 def test_commit_dirty(self): 27 def test_commit_dirty(self):
26 self.append('a', 'a') 28 self.append('a', 'a')
29 31
30 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], 32 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))],
31 b('branch') : b('default'), 33 b('branch') : b('default'),
32 b('commit') : False, 34 b('commit') : False,
33 b('update') : 0} 35 b('update') : 0}
36 if self.client.version >= (3, 5):
37 d[b('phases')] = '1 draft'
34 38
35 self.assertEquals(self.client.summary(), d) 39 self.assertEquals(self.client.summary(), d)
36 40
37 def test_update(self): 41 def test_update(self):
38 self.append('a', 'a') 42 self.append('a', 'a')
43 47
44 d = {b('parent') : [(0, node[:12], None, b('first'))], 48 d = {b('parent') : [(0, node[:12], None, b('first'))],
45 b('branch') : b('default'), 49 b('branch') : b('default'),
46 b('commit') : True, 50 b('commit') : True,
47 b('update') : 1} 51 b('update') : 1}
52 if self.client.version >= (3, 5):
53 d[b('phases')] = '2 draft'
48 54
49 self.assertEquals(self.client.summary(), d) 55 self.assertEquals(self.client.summary(), d)
50 56
51 def test_remote(self): 57 def test_remote(self):
52 self.append('a', 'a') 58 self.append('a', 'a')
88 if self.client.version < (2, 0, 0): 94 if self.client.version < (2, 0, 0):
89 tags = b('tip bmother') 95 tags = b('tip bmother')
90 else: 96 else:
91 tags = b('tip') 97 tags = b('tip')
92 d[b('parent')] = [(1, node[:12], tags, b('second in other'))] 98 d[b('parent')] = [(1, node[:12], tags, b('second in other'))]
99 if self.client.version >= (3, 5):
100 d[b('phases')] = '1 draft'
93 101
94 self.assertEquals(other.summary(remote=True), d) 102 self.assertEquals(other.summary(remote=True), d)
95 103
96 def test_two_parents(self): 104 def test_two_parents(self):
97 self.append('a', 'a') 105 self.append('a', 'a')
109 d = {b('parent') : [(2, node2[:12], b('tip'), b('third')), 117 d = {b('parent') : [(2, node2[:12], b('tip'), b('third')),
110 (1, node1[:12], None, b('second'))], 118 (1, node1[:12], None, b('second'))],
111 b('branch') : b('default'), 119 b('branch') : b('default'),
112 b('commit') : False, 120 b('commit') : False,
113 b('update') : 0} 121 b('update') : 0}
122 if self.client.version >= (3, 5):
123 d[b('phases')] = '3 draft'
114 124
115 self.assertEquals(self.client.summary(), d) 125 self.assertEquals(self.client.summary(), d)