comparison 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
comparison
equal deleted inserted replaced
25:85ae94b98324 26:b4e5c8745ef3
1 import common 1 import common
2 import hglib 2 import hglib
3 3
4 class test_outgoing_incoming(common.basetest): 4 class test_outgoing_incoming(common.basetest):
5 def test_no_path(self):
6 self.assertRaises(hglib.error.CommandError, self.client.incoming)
7
8 def test_empty(self):
9 self.client.clone(dest='other')
10 self.other = hglib.open('other')
11
12 self.assertEquals(self.other.incoming(), [])
13 self.assertEquals(self.other.outgoing(), [])
14
5 def test_basic(self): 15 def test_basic(self):
6 self.append('a', 'a') 16 self.append('a', 'a')
7 self.client.commit('first', addremove=True) 17 self.client.commit('first', addremove=True)
8 self.append('a', 'a') 18 self.append('a', 'a')
9 self.client.commit('second') 19 self.client.commit('second')
10 20
11 self.client.clone(dest='bar') 21 self.client.clone(dest='other')
12 bar = hglib.open('bar') 22 other = hglib.open('other')
13 23
14 self.assertEquals(self.client.log(), bar.log()) 24 self.assertEquals(self.client.log(), other.log())
15 self.assertEquals(self.client.outgoing(path='bar'), bar.incoming()) 25 self.assertEquals(self.client.outgoing(path='other'), other.incoming())
16 26
17 self.append('a', 'a') 27 self.append('a', 'a')
18 rev, node = self.client.commit('third') 28 rev, node = self.client.commit('third')
19 out = self.client.outgoing(path='bar') 29 out = self.client.outgoing(path='other')
20 30
21 self.assertEquals(len(out), 1) 31 self.assertEquals(len(out), 1)
22 self.assertEquals(out[0].node, node) 32 self.assertEquals(out[0].node, node)
23 33
24 self.assertEquals(out, bar.incoming()) 34 self.assertEquals(out, other.incoming())