/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-06 02:54:14 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4255.
  • Revision ID: jelmer@samba.org-20090406025414-65tpjwcmjp5wa5oj
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
        self.assertEqual('add file1 and file2', logentry.rev.message)
199
199
        self.checkDelta(logentry.delta, added=['file1', 'file2'])
200
200
 
201
 
    def test_merges_nonsupporting_formatter(self):
202
 
        """Tests that show_log will raise if the formatter doesn't
203
 
        support merge revisions."""
204
 
        wt = self.make_branch_and_memory_tree('.')
205
 
        wt.lock_write()
206
 
        self.addCleanup(wt.unlock)
207
 
        wt.add('')
208
 
        wt.commit('rev-1', rev_id='rev-1',
209
 
                  timestamp=1132586655, timezone=36000,
210
 
                  committer='Joe Foo <joe@foo.com>')
211
 
        wt.commit('rev-merged', rev_id='rev-2a',
212
 
                  timestamp=1132586700, timezone=36000,
213
 
                  committer='Joe Foo <joe@foo.com>')
214
 
        wt.set_parent_ids(['rev-1', 'rev-2a'])
215
 
        wt.branch.set_last_revision_info(1, 'rev-1')
216
 
        wt.commit('rev-2', rev_id='rev-2b',
217
 
                  timestamp=1132586800, timezone=36000,
218
 
                  committer='Joe Foo <joe@foo.com>')
219
 
        logfile = self.make_utf8_encoded_stringio()
220
 
        formatter = log.ShortLogFormatter(to_file=logfile)
221
 
        wtb = wt.branch
222
 
        lf = LogCatcher()
223
 
        revspec = revisionspec.RevisionSpec.from_string('1.1.1')
224
 
        rev = revspec.in_history(wtb)
225
 
        self.assertRaises(errors.BzrCommandError, log.show_log, wtb, lf,
226
 
                          start_revision=rev, end_revision=rev)
227
 
 
228
201
 
229
202
def make_commits_with_trailing_newlines(wt):
230
203
    """Helper method for LogFormatter tests"""
328
301
    1 Joe Foo\t2005-11-22
329
302
      rev-1
330
303
 
 
304
Use --levels 0 (or -n0) to see merged revisions.
331
305
""",
332
306
                             logfile.getvalue())
333
307
 
366
340
    2 Joe Foo\t2005-11-22 [merge]
367
341
      rev-2b
368
342
 
 
343
Use --levels 0 (or -n0) to see merged revisions.
369
344
""",
370
345
                             logfile.getvalue())
371
346
 
384
359
    1 Joe Foo\t2005-11-22
385
360
      rev-1
386
361
 
 
362
Use --levels 0 (or -n0) to see merged revisions.
387
363
""",
388
364
                             logfile.getvalue())
389
365
 
1344
1320
                direction, # direction
1345
1321
                file_id, # specific_fileid
1346
1322
                True, # generate_merge_revisions
1347
 
                True, # allow_single_merge_revision
1348
1323
                )
1349
1324
            return revs
1350
1325