~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-01 08:02:42 UTC
  • mfrom: (5390.3.3 faster-revert-593560)
  • Revision ID: pqm@pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
(spiv) Avoid repeatedly calling self.target.all_file_ids() in
 InterTree.iter_changes. (Andrew Bennetts)

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
 
161
174
 
162
175
class TestLogExcludeCommonAncestry(TestLogWithLogCatcher):
163
176
 
368
381
 
369
382
    def test_log_bad_message_re(self):
370
383
        """Bad --message argument gives a sensible message
371
 
        
 
384
 
372
385
        See https://bugs.launchpad.net/bzr/+bug/251352
373
386
        """
374
387
        self.make_minimal_branch()
375
388
        out, err = self.run_bzr(['log', '-m', '*'], retcode=3)
376
 
        self.assertEqual("bzr: ERROR: Invalid regular expression"
377
 
            " in log message filter"
378
 
            ": '*'"
379
 
            ": nothing to repeat\n", err)
380
 
        self.assertEqual('', out)
 
389
        self.assertContainsRe(err, "ERROR.*Invalid pattern.*nothing to repeat")
 
390
        self.assertNotContainsRe(err, "Unprintable exception")
 
391
        self.assertEqual(out, '')
381
392
 
382
393
    def test_log_unsupported_timezone(self):
383
394
        self.make_linear_branch()