Mercurial > python-hglib
view tests/test-manifest.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 | e89dd99638ce |
children | 4359cabcb0cc |
line wrap: on
line source
import common, hglib, os, stat class test_manifest(common.basetest): def test_basic(self): self.append('a', 'a') files = ['a'] manifest = [('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597', '644', False, False, 'a')] if os.name == 'posix': self.append('b', 'b') os.chmod('b', os.stat('b')[0] | stat.S_IEXEC) os.symlink('b', 'c') files.extend(['b', 'c']) manifest.extend([('62452855512f5b81522aa3895892760bb8da9f3f', '755', True, False, 'b'), ('62452855512f5b81522aa3895892760bb8da9f3f', '644', False, True, 'c')]) self.client.commit('first', addremove=True) self.assertEquals(list(self.client.manifest(all=True)), files) self.assertEquals(list(self.client.manifest()), manifest)