[Bug 5836] New: import of a git patch containing 'From' in the commit message confuses Mercurial

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Apr 10 15:13:38 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5836

            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
          Assignee: bugzilla at mercurial-scm.org
          Reporter: patrickdepinguin+mercurial at gmail.com
                CC: mercurial-devel at mercurial-scm.org

hg import of the following patch:

>From 28dd2f2896bff7b861a4272fa343e3f7fa80725c Mon Sep 17 00:00:00 2001
From: Foo Bar <foo at example.com>
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 @@
-foo
+bar


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

# HG changeset patch
# User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
# 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 @@
-foo
+bar


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.


More information about the Mercurial-devel mailing list