remote-bzr: fix prefix of tags

In the current transport-helper code, refs without namespaced refspecs don't work correctly, so let's always use them. Some people reported issues with 'git clone --mirror', and this fixes them, as well as possibly others. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 15, 2013 at 16:47 UTC afad20055888937b100798b597d924d087688645
1 file changed +6 -3
contrib/remote-helpers/git-remote-bzr
+6 -3
@@ -249,7 +249,7 @@ def export_files(tree, files):
249 return final
250
251 def export_branch(branch, name):
252 - global prefix, dirname
252 + global prefix
253
254 ref = '%s/heads/%s' % (prefix, name)
255 tip = marks.get_tip(name)
@@ -335,8 +335,10 @@ def export_branch(branch, name):
335 marks.set_tip(name, revid)
336
337 def export_tag(repo, name):
338 - global tags
339 - print "reset refs/tags/%s" % name
338 + global tags, prefix
339 +
340 + ref = '%s/tags/%s' % (prefix, name)
341 + print "reset %s" % ref
342 print "from :%u" % rev_to_mark(tags[name])
343 print
344
@@ -649,6 +651,7 @@ def do_capabilities(parser):
651 print "import"
652 print "export"
653 print "refspec refs/heads/*:%s/heads/*" % prefix
654 + print "refspec refs/tags/*:%s/tags/*" % prefix
655
656 path = os.path.join(dirname, 'marks-git')
657