~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_log.py

  • Committer: Robert Collins
  • Date: 2010-06-28 02:41:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100628024122-g951fzp74f3u6wst
Sanity check that new_trace_file in pop_log_file is valid, and also fix a test that monkey patched get_terminal_encoding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        self.make_linear_branch()
159
159
        self.assertLogRevnos(['-c1'], ['1'])
160
160
 
161
 
    def test_branch_revspec(self):
162
 
        foo = self.make_branch_and_tree('foo')
163
 
        bar = self.make_branch_and_tree('bar')
164
 
        self.build_tree(['foo/foo.txt', 'bar/bar.txt'])
165
 
        foo.add('foo.txt')
166
 
        bar.add('bar.txt')
167
 
        foo.commit(message='foo')
168
 
        bar.commit(message='bar')
169
 
        self.run_bzr('log -r branch:../bar', working_dir='foo')
170
 
        self.assertEqual([bar.branch.get_rev_id(1)],
171
 
                         [r.rev.revision_id
172
 
                          for r in self.get_captured_revisions()])
173
 
 
174
161
 
175
162
class TestLogExcludeCommonAncestry(TestLogWithLogCatcher):
176
163
 
381
368
 
382
369
    def test_log_bad_message_re(self):
383
370
        """Bad --message argument gives a sensible message
384
 
 
 
371
        
385
372
        See https://bugs.launchpad.net/bzr/+bug/251352
386
373
        """
387
374
        self.make_minimal_branch()
388
375
        out, err = self.run_bzr(['log', '-m', '*'], retcode=3)
389
 
        self.assertContainsRe(err, "ERROR.*Invalid pattern.*nothing to repeat")
390
 
        self.assertNotContainsRe(err, "Unprintable exception")
391
 
        self.assertEqual(out, '')
 
376
        self.assertEqual("bzr: ERROR: Invalid regular expression"
 
377
            " in log message filter"
 
378
            ": '*'"
 
379
            ": nothing to repeat\n", err)
 
380
        self.assertEqual('', out)
392
381
 
393
382
    def test_log_unsupported_timezone(self):
394
383
        self.make_linear_branch()