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