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

  • Committer: Jelmer Vernooij
  • Date: 2019-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
        # Dulwich raises a UserWarning for tags with invalid target
246
246
        self.assertIn(('ref refs/tags/lala points at non-present sha ' + ("aa" * 20), ), [w.args for w in warnings])
247
247
 
248
 
    def test_interbranch_pull_submodule(self):
249
 
        path = "d"
250
 
        os.mkdir(path)
251
 
        os.chdir(path)
252
 
        GitRepo.init('.')
253
 
        bb = tests.GitBranchBuilder()
254
 
        bb.set_file("foobar", b"foo\nbar\n", False)
255
 
        mark1 = bb.commit(b"Somebody <somebody@someorg.org>", b"mymsg")
256
 
        bb.set_submodule("core", b'102ee7206ebc4227bec8ac02450972e6738f4a33')
257
 
        bb.set_file('.gitmodules', b"""\
258
 
[submodule "core"]
259
 
  path = core
260
 
  url = https://github.com/phhusson/QuasselC.git
261
 
""", False)
262
 
        mark2 = bb.commit(b"Somebody <somebody@someorg.org>", b"mymsg")
263
 
        marks = bb.finish()
264
 
        os.chdir("..")
265
 
        gitsha1 = marks[mark1]
266
 
        gitsha2 = marks[mark2]
267
 
        oldrepo = Repository.open(path)
268
 
        revid2 = oldrepo.get_mapping().revision_id_foreign_to_bzr(gitsha2)
269
 
        newbranch = self.make_branch('g')
270
 
        inter_branch = InterBranch.get(Branch.open(path), newbranch)
271
 
        inter_branch.pull()
272
 
        self.assertEqual(revid2, newbranch.last_revision())
273
 
        self.assertEqual(
274
 
            ('https://github.com/phhusson/QuasselC.git', 'core'),
275
 
            newbranch.get_reference_info(newbranch.basis_tree().path2id('core')))
276
 
 
277
248
    def test_interbranch_pull(self):
278
249
        path, (gitsha1, gitsha2) = self.make_tworev_branch()
279
250
        oldrepo = Repository.open(path)