43
|
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)])
|