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

  • Committer: Breezy landing bot
  • Author(s): Vincent Ladeuil
  • Date: 2019-11-19 20:32:00 UTC
  • mfrom: (7413.1.2 trunk)
  • Revision ID: breezy.the.bot@gmail.com-20191119203200-fy55qqighr2xkr8r
Merge lp:brz/3.0 after 3.0.2 release.

Merged from https://code.launchpad.net/~vila/brz/trunk/+merge/375724

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
        self.assertNotContainsRe(error, 'Committed revision 2.')
217
217
        self.assertContainsRe(error, 'Committed revid .*.')
218
218
 
 
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)
 
231
        builder.finish()
 
232
 
 
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)
 
240
 
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