~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

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')
323
322
    1 Joe Foo\t2005-11-22
324
323
      rev-1
325
324
 
326
 
Use --include-merges or -n0 to see merged revisions.
 
325
Use --include-merged or -n0 to see merged revisions.
327
326
""",
328
327
            wt.branch, log.ShortLogFormatter,
329
328
            formatter_kwargs=dict(show_advice=True))
1335
1334
        self.assertFormatterResult("""\
1336
1335
------------------------------------------------------------
1337
1336
revno: 2
1338
 
fixes bug(s): test://bug/id test://bug/2
 
1337
fixes bugs: test://bug/id test://bug/2
1339
1338
author: Joe Bar <joe@bar.com>
1340
1339
committer: Joe Foo <joe@foo.com>
1341
1340
branch nick: work
1346
1345
  message
1347
1346
------------------------------------------------------------
1348
1347
revno: 1
1349
 
fixes bug(s): test://bug/id
 
1348
fixes bug: test://bug/id
1350
1349
committer: Joe Foo <joe@foo.com>
1351
1350
branch nick: work
1352
1351
timestamp: Tue 2005-11-22 00:00:00 +0000
1359
1358
        tree = self.make_commits_with_bugs()
1360
1359
        self.assertFormatterResult("""\
1361
1360
    2 Joe Bar\t2005-11-22
1362
 
      fixes bug(s): test://bug/id test://bug/2
 
1361
      fixes bugs: test://bug/id test://bug/2
1363
1362
      multiline
1364
1363
      log
1365
1364
      message
1366
1365
 
1367
1366
    1 Joe Foo\t2005-11-22
1368
 
      fixes bug(s): test://bug/id
 
1367
      fixes bug: test://bug/id
1369
1368
      simple log message
1370
1369
 
1371
1370
""",
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