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])
248
def test_interbranch_pull_submodule(self):
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"""\
260
url = https://github.com/phhusson/QuasselC.git
262
mark2 = bb.commit(b"Somebody <somebody@someorg.org>", b"mymsg")
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)
272
self.assertEqual(revid2, newbranch.last_revision())
274
('https://github.com/phhusson/QuasselC.git', 'core'),
275
newbranch.get_reference_info(newbranch.basis_tree().path2id('core')))
277
248
def test_interbranch_pull(self):
278
249
path, (gitsha1, gitsha2) = self.make_tworev_branch()
279
250
oldrepo = Repository.open(path)