annotate tests/test-outgoing-incoming.py @ 26:b4e5c8745ef3

client: add missing options to outgoing
author Idan Kamara <idankk86@gmail.com>
date Thu, 11 Aug 2011 22:58:38 +0300
parents f1af31960414
children 46908f4b87d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2 import hglib
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_outgoing_incoming(common.basetest):
26
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
5 def test_no_path(self):
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
6 self.assertRaises(hglib.error.CommandError, self.client.incoming)
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
7
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
8 def test_empty(self):
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
9 self.client.clone(dest='other')
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
10 self.other = hglib.open('other')
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
11
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
12 self.assertEquals(self.other.incoming(), [])
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
13 self.assertEquals(self.other.outgoing(), [])
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
14
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 def test_basic(self):
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16 self.append('a', 'a')
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17 self.client.commit('first', addremove=True)
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
18 self.append('a', 'a')
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
19 self.client.commit('second')
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
20
26
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
21 self.client.clone(dest='other')
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
22 other = hglib.open('other')
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
23
26
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
24 self.assertEquals(self.client.log(), other.log())
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
25 self.assertEquals(self.client.outgoing(path='other'), other.incoming())
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
26
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
27 self.append('a', 'a')
15
f1af31960414 client: change return value of commit() to (rev, node)
Idan Kamara <idankk86@gmail.com>
parents: 7
diff changeset
28 rev, node = self.client.commit('third')
26
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
29 out = self.client.outgoing(path='other')
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
30
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
31 self.assertEquals(len(out), 1)
15
f1af31960414 client: change return value of commit() to (rev, node)
Idan Kamara <idankk86@gmail.com>
parents: 7
diff changeset
32 self.assertEquals(out[0].node, node)
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
33
26
b4e5c8745ef3 client: add missing options to outgoing
Idan Kamara <idankk86@gmail.com>
parents: 15
diff changeset
34 self.assertEquals(out, other.incoming())