Skip to content

Commit

Permalink
remote-bzr: fix prefix of tags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Apr 15, 2013
1 parent aec3f77 commit afad200
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contrib/remote-helpers/git-remote-bzr
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def export_files(tree, files):
return final

def export_branch(branch, name):
global prefix, dirname
global prefix

ref = '%s/heads/%s' % (prefix, name)
tip = marks.get_tip(name)
Expand Down Expand Up @@ -335,8 +335,10 @@ def export_branch(branch, name):
marks.set_tip(name, revid)

def export_tag(repo, name):
global tags
print "reset refs/tags/%s" % name
global tags, prefix

ref = '%s/tags/%s' % (prefix, name)
print "reset %s" % ref
print "from :%u" % rev_to_mark(tags[name])
print

Expand Down Expand Up @@ -649,6 +651,7 @@ def do_capabilities(parser):
print "import"
print "export"
print "refspec refs/heads/*:%s/heads/*" % prefix
print "refspec refs/tags/*:%s/tags/*" % prefix

path = os.path.join(dirname, 'marks-git')

Expand Down

0 comments on commit afad200

Please sign in to comment.