40
|
1 import common, hglib
|
|
2
|
|
3 class test_pull(common.basetest):
|
|
4 def test_basic(self):
|
|
5 self.append('a', 'a')
|
|
6 self.client.commit('first', addremove=True)
|
|
7
|
|
8 self.client.clone(dest='other')
|
|
9 other = hglib.open('other')
|
|
10
|
|
11 self.append('a', 'a')
|
|
12 self.client.commit('second')
|
|
13
|
|
14 self.assertTrue(other.pull())
|
|
15 self.assertEquals(self.client.log(), other.log())
|
|
16
|
|
17 def test_unresolved(self):
|
|
18 self.append('a', 'a')
|
|
19 self.client.commit('first', addremove=True)
|
|
20
|
|
21 self.client.clone(dest='other')
|
|
22 other = hglib.open('other')
|
|
23
|
|
24 self.append('a', 'a')
|
|
25 self.client.commit('second')
|
|
26
|
|
27 self.append('other/a', 'b')
|
|
28 self.assertFalse(other.pull(update=True))
|
|
29 self.assertTrue(('M', 'a') in other.status())
|