63
|
1 import common, hglib
|
|
2
|
|
3 class test_resolve(common.basetest):
|
|
4 def setUp(self):
|
|
5 common.basetest.setUp(self)
|
|
6
|
|
7 self.append('a', 'a')
|
|
8 self.append('b', 'b')
|
|
9 rev, self.node0 = self.client.commit('first', addremove=True)
|
|
10
|
|
11 self.append('a', 'a')
|
|
12 self.append('b', 'b')
|
|
13 rev, self.node1 = self.client.commit('second')
|
|
14
|
|
15 def test_basic(self):
|
|
16 self.client.update(self.node0)
|
|
17 self.append('a', 'b')
|
|
18 self.append('b', 'a')
|
|
19 rev, self.node3 = self.client.commit('third')
|
|
20
|
134
|
21 self.assertRaises(hglib.error.CommandError, self.client.merge,
|
|
22 self.node1)
|
|
23 self.assertRaises(hglib.error.CommandError,
|
|
24 self.client.resolve, all=True)
|
63
|
25
|
|
26 self.assertEquals([('U', 'a'), ('U', 'b')],
|
|
27 self.client.resolve(listfiles=True))
|
|
28
|
|
29 self.client.resolve('a', mark=True)
|
|
30 self.assertEquals([('R', 'a'), ('U', 'b')],
|
|
31 self.client.resolve(listfiles=True))
|