diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-04-22 16:55:14 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-22 15:25:54 -0700 |
commit | 299789c22c9676f6fed77716c7a177e49940d389 (patch) | |
tree | 84d5fd8f209a57ced9d8b6b1b8b9faba65079abd /contrib/remote-helpers | |
parent | remote-hg: add branch_tip() helper (diff) | |
download | tgif-299789c22c9676f6fed77716c7a177e49940d389.tar.xz |
remote-hg: add support for tag objects
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-x | contrib/remote-helpers/git-remote-hg | 10 |
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 |