Browse Source

remote-hg: fix commit messages

git fast-import expects an extra newline after the commit message data,
but we are adding it only on hg-git compat mode, which is why the
bidirectionality tests pass.

We should add it unconditionally.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Felipe Contreras 12 years ago committed by Junio C Hamano
parent
commit
845241d544
  1. 3
      contrib/remote-helpers/git-remote-hg

3
contrib/remote-helpers/git-remote-hg

@ -326,6 +326,8 @@ def export_ref(repo, name, kind, head): @@ -326,6 +326,8 @@ def export_ref(repo, name, kind, head):
else:
modified, removed = get_filechanges(repo, c, parents[0])

desc += '\n'

if mode == 'hg':
extra_msg = ''

@ -349,7 +351,6 @@ def export_ref(repo, name, kind, head): @@ -349,7 +351,6 @@ def export_ref(repo, name, kind, head):
else:
extra_msg += "extra : %s : %s\n" % (key, urllib.quote(value))

desc += '\n'
if extra_msg:
desc += '\n--HG--\n' + extra_msg


Loading…
Cancel
Save