~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Vincent Ladeuil
  • Date: 2013-07-27 12:53:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6583.
  • Revision ID: v.ladeuil+lp@free.fr-20130727125328-b5e0mzrfrpmnmy9t
Open trunk again as 2.7b1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
    registry,
25
25
    revision,
26
26
    revisionspec,
27
 
    symbol_versioning,
28
27
    tests,
29
28
    )
30
29
 
251
250
        wt.commit(message='add file1 and file2')
252
251
        self.run_bzr('branch parent child')
253
252
        os.unlink('child/file1')
254
 
        file('child/file2', 'wb').write('hello\n')
 
253
        with file('child/file2', 'wb') as f: f.write('hello\n')
255
254
        self.run_bzr(['commit', '-m', 'remove file1 and modify file2',
256
255
            'child'])
257
256
        os.chdir('parent')
1310
1309
class TestLogWithBugs(TestCaseForLogFormatter, TestLogMixin):
1311
1310
 
1312
1311
    def setUp(self):
1313
 
        TestCaseForLogFormatter.setUp(self)
 
1312
        super(TestLogWithBugs, self).setUp()
1314
1313
        log.properties_handler_registry.register(
1315
1314
            'bugs_properties_handler',
1316
1315
            log._bugs_properties_handler)
1390
1389
class TestLogForAuthors(TestCaseForLogFormatter):
1391
1390
 
1392
1391
    def setUp(self):
1393
 
        TestCaseForLogFormatter.setUp(self)
 
1392
        super(TestLogForAuthors, self).setUp()
1394
1393
        self.wt = self.make_standard_commit('nicky',
1395
1394
            authors=['John Doe <jdoe@example.com>',
1396
1395
                     'Jane Rey <jrey@example.com>'])
1570
1569
    def assertLogRevnos(self, expected_revnos, b, start, end,
1571
1570
                        exclude_common_ancestry, generate_merge_revisions=True):
1572
1571
        # FIXME: the layering in log makes it hard to test intermediate levels,
1573
 
        # I wish adding filters with their parameters were easier...
 
1572
        # I wish adding filters with their parameters was easier...
1574
1573
        # -- vila 20100413
1575
1574
        iter_revs = log._calc_view_revisions(
1576
1575
            b, start, end, direction='reverse',
1636
1635
        log.Logger(b, request).show(log_formatter)
1637
1636
        # should now only have 2 revisions:
1638
1637
        self.assertEquals(len(log_formatter.revisions), 2)
 
1638