/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 breezy/plugins/git/tests/test_blackbox.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-15 10:20:16 UTC
  • mfrom: (6967 work)
  • mto: (6973.5.1 python3-c)
  • mto: This revision was merged to the branch mainline in revision 6984.
  • Revision ID: jelmer@jelmer.uk-20180515102016-tnlhsl574pfpplin
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
        self.maxDiff = None
275
275
        self.assertMultiLineEqual(out, '')
276
276
        self.assertTrue(err.endswith, '3 objects\n')
 
277
 
 
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")])
 
282
        r.stage("foo")
 
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])
 
287
 
 
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'
 
297
                'message:\n'
 
298
                '  message\n')