summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/git-remote-hg
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-05-24 21:29:32 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-28 07:59:30 -0700
commit34d75e78f407c85f948dc74806a6505cd1f001ec (patch)
treeadafea4d207bc185ecccbbe3721411dfd580a6fc /contrib/remote-helpers/git-remote-hg
parentremote-hg: ensure remote rebasing works (diff)
downloadtgif-34d75e78f407c85f948dc74806a6505cd1f001ec.tar.xz
remote-hg: trivial cleanups
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/git-remote-hg')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index e0e68eff2c..ee60dbf047 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -74,11 +74,11 @@ def hgmode(mode):
m = { '100755': 'x', '120000': 'l' }
return m.get(mode, '')
-def hghex(node):
- return hg.node.hex(node)
+def hghex(n):
+ return node.hex(n)
-def hgbin(node):
- return hg.node.bin(node)
+def hgbin(n):
+ return node.bin(n)
def hgref(ref):
return ref.replace('___', ' ')
@@ -734,12 +734,12 @@ def parse_commit(parser):
if from_mark:
p1 = mark_to_rev(from_mark)
else:
- p1 = '\0' * 20
+ p1 = '0' * 40
if merge_mark:
p2 = mark_to_rev(merge_mark)
else:
- p2 = '\0' * 20
+ p2 = '0' * 40
#
# If files changed from any of the parents, hg wants to know, but in git if
@@ -826,7 +826,7 @@ def write_tag(repo, tag, node, msg, author):
return context.memfilectx(f, content, False, False, None)
p1 = tip.hex()
- p2 = '\0' * 20
+ p2 = '0' * 40
if not author:
author = (None, 0, 0)
user, date, tz = author