From 926ff1b4cc817546252afc49067983e16632fdd3 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 22 Apr 2013 16:55:16 -0500 Subject: [PATCH] remote-hg: write tags in the appropriate branch Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- git-remote-hg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-remote-hg b/git-remote-hg index f5e4ba7..f685990 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -725,7 +725,9 @@ def parse_tag(parser): parsed_tags[name] = (tagger, data) def write_tag(repo, tag, node, msg, author): - tip = repo['tip'] + branch = repo[node].branch() + tip = branch_tip(repo, branch) + tip = repo[tip] def getfilectx(repo, memctx, f): try: @@ -744,7 +746,7 @@ def write_tag(repo, tag, node, msg, author): ctx = context.memctx(repo, (p1, p2), msg, ['.hgtags'], getfilectx, - user, (date, tz), {}) + user, (date, tz), {'branch' : branch}) tmp = encoding.encoding encoding.encoding = 'utf-8'