annotate tests/test-tags.py @ 111:63b92316623e

Added tag 0.9 for changeset c635e6e7054f
author Matt Mackall <mpm@selenic.com>
date Wed, 01 May 2013 17:53:11 -0500
parents 77ebb51f5f36
children 4359cabcb0cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2 import hglib
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_tags(common.basetest):
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 def test_basic(self):
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 self.append('a', 'a')
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7 rev, node = self.client.commit('first', addremove=True)
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 self.client.tag('my tag')
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 self.client.tag('local tag', rev=rev, local=True)
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 # filecache that was introduced in 2.0 makes us see the local tag, for
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 # now we have to reconnect
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 if self.client.version < (2, 0, 0):
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14 self.client = hglib.open()
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16 tags = self.client.tags()
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17 self.assertEquals(tags, [('tip', 1, self.client.tip().node[:12], False),
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
18 ('my tag', 0, node[:12], False),
77ebb51f5f36 client: add tags command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
19 ('local tag', 0, node[:12], True)])