annotate tests/test-tags.py @ 71:20ffb6486412

tests: put some characters in HGRCPATH so Windows actually sees the variable
author Idan Kamara <idankk86@gmail.com>
date Mon, 26 Sep 2011 22:25:36 +0300
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)])