45
|
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))
|