Mercurial > python-hglib
comparison tests/test-annotate.py @ 52:18f72b255553
client: add annotate command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 19:46:11 +0300 |
parents | |
children | 1b47146a4a2c |
comparison
equal
deleted
inserted
replaced
51:c52383a550fb | 52:18f72b255553 |
---|---|
1 import common | |
2 | |
3 class test_annotate(common.basetest): | |
4 def test_basic(self): | |
5 self.append('a', 'a\n') | |
6 rev, node0 = self.client.commit('first', addremove=True) | |
7 self.append('a', 'a\n') | |
8 rev, node1 = self.client.commit('second') | |
9 | |
10 self.assertEquals(list(self.client.annotate('a')), [('0', 'a'), ('1', 'a')]) | |
11 self.assertEquals(list(self.client.annotate('a', user=True, file=True, | |
12 number=True, changeset=True, line=True, verbose=True)), | |
13 [('test 0 %s a:1' % node0[:12], 'a'), | |
14 ('test 1 %s a:2' % node1[:12], 'a')]) | |
15 | |
16 def test_files(self): | |
17 self.append('a', 'a\n') | |
18 rev, node0 = self.client.commit('first', addremove=True) | |
19 self.append('b', 'b\n') | |
20 rev, node1 = self.client.commit('second', addremove=True) | |
21 self.assertEquals(list(self.client.annotate(['a', 'b'])), | |
22 [('0', 'a'), ('1', 'b')]) | |
23 | |
24 def test_two_colons(self): | |
25 self.append('a', 'a: b\n') | |
26 self.client.commit('first', addremove=True) | |
27 self.assertEquals(list(self.client.annotate('a')), [('0', 'a: b')]) |