Mac OS X is unix. Specifically, Darwin, which is derived from BSD unix and Next OS. https://en.wikipedia.org/wiki/Darwin_%28operating_system%29
See also https://en.wikipedia.org/wiki/Newline#Representations "LF: Multics, Unix and Unix-like systems (GNU/Linux, OS X, ...."
Gosh, thanks for the history lesson!
As Dave Nathanson, said, "Classic MacOS" used \r, but that hasn't been the Mac OS since about 2002. All the text files native to modern Macs use \n as the line terminator. Because unix.
Except that several of the applications still save files ending in \r. See: the current Microsoft product suite for OSX. Having no experience with Apple Mail, you can probably imagine why seeing your result might make me think it was keeping with some old behavior.
I just saved the raw email out of thunderbird on a mac and it had standard rfc822 CRLF endings:
theine:chirp.hg dan$ file test.patch test.patch: ASCII English text, with CRLF line terminators
Trying to hg import it failed exactly as it did for you:
theine:chirp.hg dan$ hg import test.patch applying test.patch patching file README.developers Hunk #1 FAILED at 18 Hunk #2 FAILED at 39 2 out of 2 hunks FAILED -- saving rejects to file README.developers.rej patching file chirp/util.py Hunk #1 FAILED at 14 1 out of 1 hunks FAILED -- saving rejects to file chirp/util.py.rej patching file chirpui/config.py Hunk #1 FAILED at 35 Hunk #2 FAILED at 64 2 out of 2 hunks FAILED -- saving rejects to file chirpui/config.py.rej patching file chirpui/mainapp.py Hunk #1 FAILED at 223 1 out of 1 hunks FAILED -- saving rejects to file chirpui/mainapp.py.rej abort: patch failed to apply
I converted it to LF-only and it applied just fine:
theine:chirp.hg dan$ file test.patch test.patch: ASCII English text theine:chirp.hg dan$ hg import test.patch applying test.patch
Good luck!
--Dan