Mercurial > python-hglib
comparison tests/test-tags.py @ 43:77ebb51f5f36
client: add tags command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 15 Aug 2011 22:46:45 +0300 |
parents | |
children | 4359cabcb0cc |
comparison
equal
deleted
inserted
replaced
42:b6b75c71ac58 | 43:77ebb51f5f36 |
---|---|
1 import common | |
2 import hglib | |
3 | |
4 class test_tags(common.basetest): | |
5 def test_basic(self): | |
6 self.append('a', 'a') | |
7 rev, node = self.client.commit('first', addremove=True) | |
8 self.client.tag('my tag') | |
9 self.client.tag('local tag', rev=rev, local=True) | |
10 | |
11 # filecache that was introduced in 2.0 makes us see the local tag, for | |
12 # now we have to reconnect | |
13 if self.client.version < (2, 0, 0): | |
14 self.client = hglib.open() | |
15 | |
16 tags = self.client.tags() | |
17 self.assertEquals(tags, [('tip', 1, self.client.tip().node[:12], False), | |
18 ('my tag', 0, node[:12], False), | |
19 ('local tag', 0, node[:12], True)]) |