Seems to be a whitespace issue. Not sure of the cause and I could not replicate the error when I rolled a new patch today.<br><br>I created <a href="http://drupal.org/node/136288">http://drupal.org/node/136288</a> to address.
<br><br>- Ken<br><br><div><span class="gmail_quote">On 4/14/07, <b class="gmail_sendername">Ken Rickard</b> <<a href="mailto:agentrickard@gmail.com">agentrickard@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
All-<br><br>I'm trying to troubleshoot an issue that came up when working on <a href="http://drupal.org/node/118660" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_self" onclick="return top.js.OpenExtLink(window,event,this)">
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><span class="sg"><br>-- Ken Rickard<br>agentrickard
<br><br>
</span></blockquote></div><br>