{"thread":{"id":"33532","subject":"[PATCH] remote-hg: fix commit messages","startedAt":"2013-04-18T06:06:31Z","lastAt":"2013-04-18T17:43:18Z","messageCount":3,"participants":["Felipe Contreras","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"214678","messageId":"1366265191-20815-1-git-send-email-felipe.contreras@gmail.com","threadId":"33532","inReplyTo":null,"subject":"[PATCH] remote-hg: fix commit messages","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-18T06:06:31Z","receivedAt":"2013-04-18T06:06:31Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"git fast-import expects an extra newline after the commit message data,\nbut we are adding it only on hg-git compat mode, which is why the\nbidirectionality tests pass.\n\nWe should add it unconditionally.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/remote-helpers/git-remote-hg | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg\nindex a5f0013..5481331 100755\n--- a/contrib/remote-helpers/git-remote-hg\n+++ b/contrib/remote-helpers/git-remote-hg\n@@ -362,6 +362,8 @@ def export_ref(repo, name, kind, head):\n         else:\n             modified, removed = get_filechanges(repo, c, parents[0])\n \n+        desc += '\\n'\n+\n         if mode == 'hg':\n             extra_msg = ''\n \n@@ -385,7 +387,6 @@ def export_ref(repo, name, kind, head):\n                 else:\n                     extra_msg += \"extra : %s : %s\\n\" % (key, urllib.quote(value))\n \n-            desc += '\\n'\n             if extra_msg:\n                 desc += '\\n--HG--\\n' + extra_msg\n \n-- \n1.8.2.1.679.g509521a\n"},{"id":"214679","messageId":"CAMP44s1MRYnJ8cQGk03Y8qg-7yMZcC=umetv=RaEDE+i=g0ZEA@mail.gmail.com","threadId":"33532","inReplyTo":"1366265191-20815-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] remote-hg: fix commit messages","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-04-18T06:15:15Z","receivedAt":"2013-04-18T06:15:15Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Thu, Apr 18, 2013 at 1:06 AM, Felipe Contreras\n<felipe.contreras@gmail.com> wrote:\n> git fast-import expects an extra newline after the commit message data,\n> but we are adding it only on hg-git compat mode, which is why the\n> bidirectionality tests pass.\n>\n> We should add it unconditionally.\n\nThis doesn't depend on any other patches, and I think it might be\nworth to put it in 'maint', it's not like a *huge* deal, but it would\nbe nice if a mercurial repo cloned with v1.8.2.2 and one cloned with\nv1.8.3 end up with the same commit ids. It would have been nicer if\nv1.8.1 had this already, but hey, it's new, and it's in contrib.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"214745","messageId":"7vhaj368g9.fsf@alter.siamese.dyndns.org","threadId":"33532","inReplyTo":"1366265191-20815-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] remote-hg: fix commit messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-18T17:43:18Z","receivedAt":"2013-04-18T17:43:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> git fast-import expects an extra newline after the commit message data,\n> but we are adding it only on hg-git compat mode, which is why the\n> bidirectionality tests pass.\n>\n> We should add it unconditionally.\n>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n\nWithout knowing that hg-git compat mode is what is used in bidi test\n(the only mode that supports bidi), \"which is why\" was ungrokkable.\n\nThis is a trivial change without downside risk so I do not mind\napplying it to 'maint', as you say it is an appropriate there.\n\n>  contrib/remote-helpers/git-remote-hg | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg\n> index a5f0013..5481331 100755\n> --- a/contrib/remote-helpers/git-remote-hg\n> +++ b/contrib/remote-helpers/git-remote-hg\n> @@ -362,6 +362,8 @@ def export_ref(repo, name, kind, head):\n>          else:\n>              modified, removed = get_filechanges(repo, c, parents[0])\n>  \n> +        desc += '\\n'\n> +\n>          if mode == 'hg':\n>              extra_msg = ''\n>  \n> @@ -385,7 +387,6 @@ def export_ref(repo, name, kind, head):\n>                  else:\n>                      extra_msg += \"extra : %s : %s\\n\" % (key, urllib.quote(value))\n>  \n> -            desc += '\\n'\n>              if extra_msg:\n>                  desc += '\\n--HG--\\n' + extra_msg\n"}]}