On Jul 18, 2014, at 10:32 AM, Dan Smith - dsmith@danplanet.com wrote
This is saying nothing applied, which generally means that line endings aren't right. I think you're using a mac, which uses \r line endings (sometimes, not always, and I can never remember when/why). My guess would be that you copy-and-paste'd the patch out to a file? In that case, you've got \r endings and the code has \n. Thus, patch (or hg import in this case) can't find any lines that match.
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, ...."
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.
Here's the first couple of lines of your patch, as I "saved as plain text" (not copy/paste) from Mail.app, then trimmed off the mail header in vi. (Actually vim). I don't use TextEdit for code. I've been a vi and unix user for 34 years. One of the reasons I use a Mac. This file is what I used for hg import: dan[Desktop]$ hexdump -C dsmith.patch.txt 00000000 23 20 48 47 20 63 68 61 6e 67 65 73 65 74 20 70 |# HG changeset p| 00000010 61 74 63 68 0a 23 20 55 73 65 72 20 44 61 6e 20 |atch.# User Dan | 00000020 53 6d 69 74 68 20 3c 64 73 6d 69 74 68 40 64 61 |Smith <dsmith@da| ... Note that the lines are terminated with 0a = \n. Just for grins I saved that in a file and searched for 0d = \r. No hits except embedded in the offset addresses.
For comparison, here's the first few lines of the last patch I generated with hg and sent to the alias: dan[dev_work1]$ hexdump -C 1767.patch 00000000 23 20 48 47 20 63 68 61 6e 67 65 73 65 74 20 70 |# HG changeset p| 00000010 61 74 63 68 0a 23 20 55 73 65 72 20 44 61 6e 20 |atch.# User Dan | 00000020 44 72 6f 67 69 63 68 65 6e 20 3c 63 68 69 72 70 |Drogichen <chirp|
Same \n termination, and you seem to have no issues (other than filename) with this. And if that's what hg generates on my Mac, you'd think it would want the same for reading.
So I think the line termination issue is a red herring, unless I'm missing something. Any other ideas?
Was this the correct command line, or do I need other flags/arguments?
dan[chirp.hg]$ hg import ~/Desktop/dsmith.patch.txt
-dan