All-<br><br>I'm trying to troubleshoot an issue that came up when working on <a href="http://drupal.org/node/118660">http://drupal.org/node/118660</a>.<br><br>I run OS X (10.4) and roll patches using 'cvs diff -up >
file.patch' on the command line. This uses the Darwinports version of cvs.<br><br>As near as I can figure, differences in how Macs handle linebreaks (/n vs. /r) cause problems, as running the patch will generate the error:
<br><br>"patch unexpectedly ends in middle of line"<br><br>See <a href="http://drupal.org/node/122734">http://drupal.org/node/122734</a> for another example.<br>
<br>A Google search reveals 84 reported instances of this type error on <a href="http://drupal.org">drupal.org</a>, so I'd like to add some handbook notes about it, but can't figure the solution. It seems to be quite common (there are over 400,000 matches on google), but no one ever reports a solution.
<br><br>The closest I've seen is dreweish's note at <a href="http://drupal.org/node/35945#comment-217838">http://drupal.org/node/35945#comment-217838</a>, which suggests running a linebreak converter before applying a patch. But this doesn't seem to help me in rolling and submitting a patch.
<br><br>Unless the answer is to run a linebreak converter on the patch after its rolled and before I submit it. But opening the patchfile in BBEdit indicates that the file has Unix line ends.<br><br>I can even see in the Darwinports release where this error comes from.
(<a href="http://www.opensource.apple.com/darwinsource/Current/patch_cmds-10/patch/pch.c">http://www.opensource.apple.com/darwinsource/Current/patch_cmds-10/patch/pch.c</a>). But no instructions for how to handle it.<br>
<br>Offlist answers are fine. I intend to write a handbook note with the answers.<br><br>Ref:<br> <a href="http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=UeN&q=site%3Adrupal.org+patch+unexpectedly+ends+in+middle+of+line&btnG=Search">
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=UeN&q=site%3Adrupal.org+patch+unexpectedly+ends+in+middle+of+line&btnG=Search</a><br> <a href="http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=6Ji&q=patch+unexpectedly+ends+in+middle+of+line&btnG=Search">
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=6Ji&q=patch+unexpectedly+ends+in+middle+of+line&btnG=Search</a><br><br>-- Ken Rickard<br>agentrickard<br><br>