annotate tests/test-heads.py @ 65:91ffa1de398c

document all commands in client.py
author Idan Kamara <idankk86@gmail.com>
date Tue, 23 Aug 2011 21:57:11 +0300
parents 2657fd6fef04
children 4359cabcb0cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
57
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3 class test_heads(common.basetest):
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 def test_empty(self):
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 self.assertEquals(self.client.heads(), [])
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7 def test_basic(self):
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 self.append('a', 'a')
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 rev, node0 = self.client.commit('first', addremove=True)
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10 self.assertEquals(self.client.heads(), [self.client.tip()])
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 self.client.branch('foo')
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 self.append('a', 'a')
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14 rev, node1 = self.client.commit('second')
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15
2657fd6fef04 client: add heads command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16 self.assertEquals(self.client.heads(node0, topological=True), [])