/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 11:31:40 UTC
  • mfrom: (7143.12.3 annotated-tags)
  • Revision ID: breezy.the.bot@gmail.com-20181116113140-618u04763u0dyxnh
Fix fetching of revisions that are referenced by annotated tags.

Merged from https://code.launchpad.net/~jelmer/brz/annotated-tags/+merge/358536

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
                {'blah': default_mapping.revision_id_foreign_to_bzr(c2)},
252
252
                local_branch.tags.get_tag_dict())
253
253
 
 
254
    def test_sprout_with_annotated_tag_unreferenced(self):
 
255
        c1 = self.remote_real.do_commit(
 
256
                message=b'message',
 
257
                committer=b'committer <committer@example.com>',
 
258
                author=b'author <author@example.com>')
 
259
        c2 = self.remote_real.do_commit(
 
260
                message=b'another commit',
 
261
                committer=b'committer <committer@example.com>',
 
262
                author=b'author <author@example.com>')
 
263
        porcelain.tag_create(
 
264
                self.remote_real,
 
265
                tag=b"blah",
 
266
                author=b'author <author@example.com>',
 
267
                objectish=c1,
 
268
                tag_time=int(time.time()),
 
269
                tag_timezone=0,
 
270
                annotated=True,
 
271
                message=b"Annotated tag")
 
272
 
 
273
        remote = ControlDir.open(self.remote_url)
 
274
        self.make_controldir('local', format=self._to_format)
 
275
        local = remote.sprout(
 
276
                'local',
 
277
                revision_id=default_mapping.revision_id_foreign_to_bzr(c1))
 
278
        local_branch = local.open_branch()
 
279
        self.assertEqual(
 
280
                default_mapping.revision_id_foreign_to_bzr(c1),
 
281
                local_branch.last_revision())
 
282
        self.assertEqual(
 
283
                {'blah': default_mapping.revision_id_foreign_to_bzr(c1)},
 
284
                local_branch.tags.get_tag_dict())
 
285
 
254
286
 
255
287
class FetchFromRemoteToBzrTests(FetchFromRemoteTestBase,TestCaseWithTransport):
256
288