summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-04-22 16:55:16 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-22 15:25:54 -0700
commite1760f8c2c355dffeade3c271c4ae875e2659dae (patch)
treea4b20f925a65881c528b0c02b4d464d56abc60bf /contrib
parentremote-hg: custom method to write tags (diff)
downloadtgif-e1760f8c2c355dffeade3c271c4ae875e2659dae.tar.xz
remote-hg: write tags in the appropriate branch
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index f5e4ba7787..f685990c8c 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/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'