Bug ID: 5836
           Summary: import of a git patch containing 'From' in the commit
                    message confuses Mercurial
           Product: Mercurial
           Version: 4.5
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial

hg import of the following patch:

From 28dd2f2896bff7b861a4272fa343e3f7fa80725c Mon Sep 17 00:00:00 2001
From: Foo Bar <>
Date: Thu, 29 Mar 2018 16:15:15 +0200
Subject: foobar

From the release notes

Foo bar baz

diff --git a/foo b/foo
index 812dfbe320..60498db8e4 100644
--- a/foo
+++ b/foo
@@ -1,1 +1,1 @@

confuses Mercurial.
The end result after applying the patch (hg export) is:

# HG changeset patch
# User Thomas De Schampheleire <>
# Date 1523372729 -7200
#      Tue Apr 10 17:05:29 2018 +0200
# Node ID 37ded973b713448442ef8f5a13ce588d2367bf28
# Parent  4eeb05b4d2752b37383f18560e6535c4df2df9b1
Foo bar baz

diff --git a/foo b/foo
--- a/foo
+++ b/foo
@@ -1,1 +1,1 @@

I.e. the 'From the release notes' line is seemingly interpreted as a 'From'
header of the email and lost in the final commit.
The author of the original commit is lost, and ui.username is used instead.

It looks as if somewhere a check on 'From' should become a check on 'From:'.

You are receiving this mail because:
You are on the CC list for the bug.
Mercurial-devel mailing list

Reply via email to