comparison tests/test-merge.py @ 45:191855a9d813

client: add merge command
author Idan Kamara <idankk86@gmail.com>
date Tue, 16 Aug 2011 23:57:21 +0300
parents
children ebcc5d7dd528
comparison
equal deleted inserted replaced
44:3a661f63107e 45:191855a9d813
1 import common, hglib
2
3 class test_merge(common.basetest):
4 def setUp(self):
5 common.basetest.setUp(self)
6
7 self.append('a', 'a')
8 rev, self.node0 = self.client.commit('first', addremove=True)
9
10 self.append('a', 'a')
11 rev, self.node1 = self.client.commit('change')
12
13 def test_basic(self):
14 self.client.update(self.node0)
15 self.append('b', 'a')
16 rev, node2 = self.client.commit('new file', addremove=True)
17 self.client.merge(self.node1)
18 rev, node = self.client.commit('merge')
19 diff = """diff -r %s -r %s a
20 --- a/a
21 +++ b/a
22 @@ -1,1 +1,1 @@
23 -a
24 \ No newline at end of file
25 +aa
26 \ No newline at end of file
27 """ % (node2[:12], node[:12])
28
29 self.assertEquals(diff, self.client.diff(change=node, nodates=True))