274
274
self.maxDiff = None
275
275
self.assertMultiLineEqual(out, '')
276
276
self.assertTrue(err.endswith, '3 objects\n')
278
def test_log_shallow(self):
279
# Smoke test for "bzr log" in a git repository with shallow depth.
280
r = GitRepo.init('gitr', mkdir=True)
281
self.build_tree_contents([("gitr/foo", "hello from git")])
283
cid = r.do_commit("message", committer="Somebody <user@example.com>",
284
commit_timestamp=1526330165, commit_timezone=0,
285
author_timestamp=1526330165, author_timezone=0,
286
merge_heads=[b'aa' * 20])
288
# Check that bzr log does not fail and includes the revision.
289
output, error = self.run_bzr(['log', 'gitr'], retcode=3)
290
self.assertEqual(error, 'brz: ERROR: Further revision history missing.\n')
291
self.assertEqual(output,
292
'------------------------------------------------------------\n'
293
'revision-id: git-v1:' + cid + '\n'
294
'git commit: ' + cid + '\n'
295
'committer: Somebody <user@example.com>\n'
296
'timestamp: Mon 2018-05-14 20:36:05 +0000\n'