Mercurial > python-hglib
view tests/test-resolve.py @ 122:e05b0cf920bb
client: implement the 'in' keyword for a client object
Check if a revision number or a changeset hex matches a changeset in the client
repository. The internal tries to create a ctx object. Returns False If the ctx
creation fails.
This patch also adds the corresponding tests.
author | Paul Tonelli <paul.tonelli@logilab.fr> |
---|---|
date | Wed, 30 Apr 2014 16:44:59 +0200 |
parents | 939d1d763bb1 |
children | 1b47146a4a2c |
line wrap: on
line source
import common, hglib class test_resolve(common.basetest): def setUp(self): common.basetest.setUp(self) self.append('a', 'a') self.append('b', 'b') rev, self.node0 = self.client.commit('first', addremove=True) self.append('a', 'a') self.append('b', 'b') rev, self.node1 = self.client.commit('second') def test_basic(self): self.client.update(self.node0) self.append('a', 'b') self.append('b', 'a') rev, self.node3 = self.client.commit('third') self.assertRaises(hglib.error.CommandError, self.client.merge, self.node1) self.assertRaises(hglib.error.CommandError, self.client.resolve, all=True) self.assertEquals([('U', 'a'), ('U', 'b')], self.client.resolve(listfiles=True)) self.client.resolve('a', mark=True) self.assertEquals([('R', 'a'), ('U', 'b')], self.client.resolve(listfiles=True))