summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index bd93f82857..4a1c637c08 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -722,7 +722,7 @@ def parse_tag(parser):
data = parser.get_data()
parser.next()
- # nothing to do
+ parsed_tags[name] = (tagger, data)
def do_export(parser):
global parsed_refs, bmarks, peer
@@ -758,9 +758,11 @@ def do_export(parser):
continue
elif ref.startswith('refs/tags/'):
tag = ref[len('refs/tags/'):]
+ author, msg = parsed_tags.get(tag, (None, None))
if mode == 'git':
- msg = 'Added tag %s for changeset %s' % (tag, hghex(node[:6]));
- parser.repo.tag([tag], node, msg, False, None, {})
+ if not msg:
+ msg = 'Added tag %s for changeset %s' % (tag, hghex(node[:6]));
+ parser.repo.tag([tag], node, msg, False, author[0], {})
else:
parser.repo.tag([tag], node, None, True, None, {})
print "ok %s" % ref
@@ -815,6 +817,7 @@ def main(args):
global marks, blob_marks, parsed_refs
global peer, mode, bad_mail, bad_name
global track_branches, force_push, is_tmp
+ global parsed_tags
alias = args[1]
url = args[2]
@@ -857,6 +860,7 @@ def main(args):
blob_marks = {}
parsed_refs = {}
marks = None
+ parsed_tags = {}
repo = get_repo(url, alias)
prefix = 'refs/hg/%s' % alias