Mercurial > public > mercurial-scm > hg
diff tests/test-import @ 10501:a27af7229850 stable
import: if in doubt, consume stream until start of diff
This prevents a header-like line in the message body from causing a spurious split.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 18 Feb 2010 10:46:01 -0800 |
parents | 832f35386067 |
children | 3212afb33116 |
line wrap: on
line diff
--- a/tests/test-import Thu Feb 18 10:32:51 2010 +0100 +++ b/tests/test-import Thu Feb 18 10:46:01 2010 -0800 @@ -372,3 +372,30 @@ hg parents -v cd .. +echo '% tricky header splitting' +cat > trickyheaders.patch <<EOF +From: User A <user@a> +Subject: [PATCH] from: tricky! + +# HG changeset patch +# User User B +# Date 1266264441 18000 +# Branch stable +# Node ID f2be6a1170ac83bf31cb4ae0bad00d7678115bc0 +# Parent 0000000000000000000000000000000000000000 +from: tricky! + +That is not a header. + +diff -r 000000000000 -r f2be6a1170ac foo +--- /dev/null ++++ b/foo +@@ -0,0 +1,1 @@ ++foo +EOF + +hg init trickyheaders +cd trickyheaders +hg import -d '0 0' ../trickyheaders.patch +hg export --git tip +cd ..