annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common, hglib, os, stat
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3 class test_manifest(common.basetest):
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 def test_basic(self):
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 self.append('a', 'a')
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 self.append('b', 'b')
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7 os.chmod('b', os.stat('b')[0] | stat.S_IEXEC)
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 os.symlink('b', 'c')
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 self.client.commit('first', addremove=True)
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 self.assertEquals(list(self.client.manifest(all=True)), ['a', 'b', 'c'])
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 manifest = \
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14 [('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597', '644', False, False, 'a'),
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 ('62452855512f5b81522aa3895892760bb8da9f3f', '755', True, False, 'b'),
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16 ('62452855512f5b81522aa3895892760bb8da9f3f', '644', False, True, 'c')]
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
18 self.assertEquals(list(self.client.manifest()), manifest)