diff tests/test-manifest.py @ 64:a7d98dc798c5

client: add manifest command
author Idan Kamara <idankk86@gmail.com>
date Tue, 23 Aug 2011 21:41:17 +0300
parents
children e89dd99638ce
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-manifest.py	Tue Aug 23 21:41:17 2011 +0300
@@ -0,0 +1,18 @@
+import common, hglib, os, stat
+
+class test_manifest(common.basetest):
+    def test_basic(self):
+        self.append('a', 'a')
+        self.append('b', 'b')
+        os.chmod('b', os.stat('b')[0] | stat.S_IEXEC)
+        os.symlink('b', 'c')
+        self.client.commit('first', addremove=True)
+
+        self.assertEquals(list(self.client.manifest(all=True)), ['a', 'b', 'c'])
+
+        manifest = \
+          [('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597', '644', False, False, 'a'),
+           ('62452855512f5b81522aa3895892760bb8da9f3f', '755', True, False, 'b'),
+           ('62452855512f5b81522aa3895892760bb8da9f3f', '644', False, True, 'c')]
+
+        self.assertEquals(list(self.client.manifest()), manifest)