comparison tests/test_template_keywords.py @ 1180:cdad3b3e4a09

Merge with stable.
author Augie Fackler <raf@durin42.com>
date Fri, 02 May 2014 10:04:10 -0400
parents 8caf1226adec
children
comparison
equal deleted inserted replaced
1174:a22d4972e01f 1180:cdad3b3e4a09
28 28
29 29
30 class TestLogKeywords(test_util.TestBase): 30 class TestLogKeywords(test_util.TestBase):
31 @test_util.requiresmodule(templatekw) 31 @test_util.requiresmodule(templatekw)
32 def test_svn_keywords(self): 32 def test_svn_keywords(self):
33 defaults = {'date': None, 'rev': None, 'user': None} 33 defaults = {'date': None, 'rev': None, 'user': None, 'graph': True}
34 repo = self._load_fixture_and_fetch('two_revs.svndump') 34 repo = self._load_fixture_and_fetch('two_revs.svndump')
35 35
36 # we want one commit that isn't from Subversion 36 # we want one commit that isn't from Subversion
37 self.commitchanges([('foo', 'foo', 'frobnicate\n')]) 37 self.commitchanges([('foo', 'foo', 'frobnicate\n')])
38 38
39 ui = CapturingUI() 39 ui = CapturingUI()
40 commands.log(ui, repo, template='{rev}:{svnrev} ', **defaults) 40 commands.log(ui, repo, template=(' rev: {rev} svnrev:{svnrev} '
41 self.assertEqual(ui._output, '0:2 1:3 2: ') 41 'svnpath:{svnpath} svnuuid:{svnuuid}\n'),
42 ui = CapturingUI() 42 **defaults)
43 commands.log(ui, repo, template='{rev}:{svnpath} ', **defaults) 43 print ui._output
44 self.assertEqual(ui._output, '0:/trunk 1:/trunk 2: ') 44 self.assertEqual(ui._output.strip(), '''
45 ui = CapturingUI() 45 rev: 2 svnrev: svnpath: svnuuid:
46 commands.log(ui, repo, template='{rev}:{svnuuid} ', **defaults) 46 @
47 self.assertEqual(ui._output, 47 |
48 ('0:df2126f7-00ab-4d49-b42c-7e981dde0bcf ' 48 rev: 1 svnrev:3 svnpath:/trunk svnuuid:df2126f7-00ab-4d49-b42c-7e981dde0bcf
49 '1:df2126f7-00ab-4d49-b42c-7e981dde0bcf ' 49 o
50 '2: ')) 50 |
51 rev: 0 svnrev:2 svnpath:/trunk svnuuid:df2126f7-00ab-4d49-b42c-7e981dde0bcf
52 o
53 '''.strip())
51 54
52 @test_util.requiresmodule(revset) 55 @test_util.requiresmodule(revset)
53 @test_util.requiresmodule(templatekw) 56 @test_util.requiresmodule(templatekw)
54 def test_svn_revsets(self): 57 def test_svn_revsets(self):
55 repo = self._load_fixture_and_fetch('two_revs.svndump') 58 repo = self._load_fixture_and_fetch('two_revs.svndump')