Mercurial > python-hglib
comparison tests/test-resolve.py @ 63:939d1d763bb1
client: add resolve command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 22:52:59 +0300 |
parents | |
children | 1b47146a4a2c |
comparison
equal
deleted
inserted
replaced
62:d1f57f162274 | 63:939d1d763bb1 |
---|---|
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 | |
21 self.assertRaises(hglib.error.CommandError, self.client.merge, self.node1) | |
22 self.assertRaises(hglib.error.CommandError, self.client.resolve, all=True) | |
23 | |
24 self.assertEquals([('U', 'a'), ('U', 'b')], | |
25 self.client.resolve(listfiles=True)) | |
26 | |
27 self.client.resolve('a', mark=True) | |
28 self.assertEquals([('R', 'a'), ('U', 'b')], | |
29 self.client.resolve(listfiles=True)) |