216
216
self.assertNotContainsRe(error, 'Committed revision 2.')
217
217
self.assertContainsRe(error, 'Committed revid .*.')
219
def test_log_file(self):
220
# Smoke test for "bzr log" in a git repository.
221
repo = GitRepo.init(self.test_dir)
222
builder = tests.GitBranchBuilder()
223
builder.set_file('a', b'text for a\n', False)
224
r1 = builder.commit(b'Joe Foo <joe@foo.com>', u'First')
225
builder.set_file('a', b'text 3a for a\n', False)
226
r2a = builder.commit(b'Joe Foo <joe@foo.com>', u'Second a', base=r1)
227
builder.set_file('a', b'text 3b for a\n', False)
228
r2b = builder.commit(b'Joe Foo <joe@foo.com>', u'Second b', base=r1)
229
builder.set_file('a', b'text 4 for a\n', False)
230
builder.commit(b'Joe Foo <joe@foo.com>', u'Third', merge=[r2a], base=r2b)
233
# Check that bzr log does not fail and includes the revision.
234
output, error = self.run_bzr(['log', '-n2', 'a'])
235
self.assertEqual(error, '')
236
self.assertIn('Second a', output)
237
self.assertIn('Second b', output)
238
self.assertIn('First', output)
239
self.assertIn('Third', output)
219
241
def test_tags(self):
220
242
git_repo, commit_sha1 = self.simple_commit()
221
243
git_repo.refs[b"refs/tags/foo"] = commit_sha1