comparison tests/test-branches.py @ 12:c2a9b716cd80

client: rewrite branches(), return a list of (branchname, rev, node)
author Idan Kamara <idankk86@gmail.com>
date Wed, 10 Aug 2011 00:24:01 +0300
parents
children f1af31960414
comparison
equal deleted inserted replaced
11:0549d00a617d 12:c2a9b716cd80
1 import common, hglib
2
3 class test_branches(common.basetest):
4 def test_empty(self):
5 self.assertEquals(self.client.branches(), [])
6
7 def test_basic(self):
8 self.append('a', 'a')
9 rev0 = self.client.commit('first', addremove=True)
10 self.client.branch('foo')
11 self.append('a', 'a')
12 rev1 = self.client.commit('second')
13 branches = self.client.branches()
14
15 expected = []
16 for r in (rev1, rev0):
17 expected.append((r.branch, int(r.rev), r.node[:12]))
18
19 self.assertEquals(branches, expected)
20
21 def test_active_closed(self):
22 pass