/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_remote.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 19:38:57 UTC
  • mfrom: (7143.16.21 even-more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116193857-bs5oma2655sp55qu
Fix another dozen flake8 errors.

Merged from https://code.launchpad.net/~jelmer/brz/even-more-cleanups/+merge/358931

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
 
153
153
    def test_set_last_revision_info(self):
154
154
        c1 = self.remote_real.do_commit(
155
 
                message=b'message 1',
156
 
                committer=b'committer <committer@example.com>',
157
 
                author=b'author <author@example.com>',
158
 
                ref=b'refs/heads/newbranch')
 
155
            message=b'message 1',
 
156
            committer=b'committer <committer@example.com>',
 
157
            author=b'author <author@example.com>',
 
158
            ref=b'refs/heads/newbranch')
159
159
        c2 = self.remote_real.do_commit(
160
 
                message=b'message 2',
161
 
                committer=b'committer <committer@example.com>',
162
 
                author=b'author <author@example.com>',
163
 
                ref=b'refs/heads/newbranch')
 
160
            message=b'message 2',
 
161
            committer=b'committer <committer@example.com>',
 
162
            author=b'author <author@example.com>',
 
163
            ref=b'refs/heads/newbranch')
164
164
 
165
165
        remote = ControlDir.open(self.remote_url)
166
166
        newbranch = remote.open_branch('newbranch')
252
252
            default_mapping.revision_id_foreign_to_bzr(c1),
253
253
            local_branch.last_revision())
254
254
        self.assertEqual(
255
 
                {'blah': default_mapping.revision_id_foreign_to_bzr(c2)},
256
 
                local_branch.tags.get_tag_dict())
 
255
            {'blah': default_mapping.revision_id_foreign_to_bzr(c2)},
 
256
            local_branch.tags.get_tag_dict())
257
257
 
258
258
    def test_sprout_with_annotated_tag_unreferenced(self):
259
259
        c1 = self.remote_real.do_commit(
260
 
                message=b'message',
261
 
                committer=b'committer <committer@example.com>',
262
 
                author=b'author <author@example.com>')
 
260
            message=b'message',
 
261
            committer=b'committer <committer@example.com>',
 
262
            author=b'author <author@example.com>')
263
263
        c2 = self.remote_real.do_commit(
264
 
                message=b'another commit',
265
 
                committer=b'committer <committer@example.com>',
266
 
                author=b'author <author@example.com>')
 
264
            message=b'another commit',
 
265
            committer=b'committer <committer@example.com>',
 
266
            author=b'author <author@example.com>')
267
267
        porcelain.tag_create(
268
 
                self.remote_real,
269
 
                tag=b"blah",
270
 
                author=b'author <author@example.com>',
271
 
                objectish=c1,
272
 
                tag_time=int(time.time()),
273
 
                tag_timezone=0,
274
 
                annotated=True,
275
 
                message=b"Annotated tag")
 
268
            self.remote_real,
 
269
            tag=b"blah",
 
270
            author=b'author <author@example.com>',
 
271
            objectish=c1,
 
272
            tag_time=int(time.time()),
 
273
            tag_timezone=0,
 
274
            annotated=True,
 
275
            message=b"Annotated tag")
276
276
 
277
277
        remote = ControlDir.open(self.remote_url)
278
278
        self.make_controldir('local', format=self._to_format)
279
279
        local = remote.sprout(
280
 
                'local',
281
 
                revision_id=default_mapping.revision_id_foreign_to_bzr(c1))
 
280
            'local',
 
281
            revision_id=default_mapping.revision_id_foreign_to_bzr(c1))
282
282
        local_branch = local.open_branch()
283
283
        self.assertEqual(
284
 
                default_mapping.revision_id_foreign_to_bzr(c1),
285
 
                local_branch.last_revision())
 
284
            default_mapping.revision_id_foreign_to_bzr(c1),
 
285
            local_branch.last_revision())
286
286
        self.assertEqual(
287
 
                {'blah': default_mapping.revision_id_foreign_to_bzr(c1)},
288
 
                local_branch.tags.get_tag_dict())
289
 
 
290
 
 
291
 
class FetchFromRemoteToBzrTests(FetchFromRemoteTestBase,TestCaseWithTransport):
 
287
            {'blah': default_mapping.revision_id_foreign_to_bzr(c1)},
 
288
            local_branch.tags.get_tag_dict())
 
289
 
 
290
 
 
291
class FetchFromRemoteToBzrTests(FetchFromRemoteTestBase, TestCaseWithTransport):
292
292
 
293
293
    _to_format = '2a'
294
294
 
557
557
 
558
558
    def test_get_branch_nick(self):
559
559
        c1 = self.remote_real.do_commit(
560
 
                message=b'message',
561
 
                committer=b'committer <committer@example.com>',
562
 
                author=b'author <author@example.com>')
 
560
            message=b'message',
 
561
            committer=b'committer <committer@example.com>',
 
562
            author=b'author <author@example.com>')
563
563
        remote = ControlDir.open(self.remote_url)
564
564
        self.assertEqual('master', remote.open_branch().nick)