This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Development build #200209190100 of NetBeans 4.0 Windows 2000 with JDK 1.4.1 RC build #21 Description: ============ Could you please take a look at the steps below and the attached files ? I am convinced that there is no reason to say that patch is not applicable. I was very sad about the fact that I am the one who must apply the patch ... :-( Steps to reproduce: =================== 1. Place both java files into one directory and select them. 2. Invoke "Tools|Diff" and then choose "Command-line Diff" engine. 3. Choose "Textual Diff Viewer" visualizer. 4. Select whole text, press CTRL+C, paste somewhere and save it as "Patch.txt" file. 5. Select "VCSWizardAdvanced" node and invoke "Tools|Apply Patch..." action. 6. Browse to your "Patch.txt" file and push "Patch" button. 7. Below attached exception is thrown.
Created attachment 7451 [details] Exception thrown instead of patch application.
Created attachment 7452 [details] File that should be patched.
Created attachment 7453 [details] File with "better" code that was used to create the patch.
Created attachment 7454 [details] Patch file created from textual diff using command-line client.
Scheduling for NB 4.0.
I was trying to reproduce that on Solaris and yes, it said that the patch was inapplicable. But even /usr/bin/patch has complaied: bash-2.03$ patch -i Patch_UNIX.txt VCSWizardAdvanced.java Looks like a normal diff. Hunk #2 failed at line 24. Hunk #3 failed at line 29. Hunk #4 failed at line 33. Hunk #5 failed at line 91. Hunk #6 failed at line 384. 5 out of 6 hunks failed: saving rejects to VCSWizardAdvanced.java.rej done I found that it failed due to Windows line endings in the file. Even on Windows the files with Windows' line endings fail, but after they are converted to UNIX line endings the patch is applied successfully. I've changed the subject to describe better the problem.
Fixed in dev and projects builds: Checking in Patch.java; /cvs/diff/src/org/netbeans/modules/diff/builtin/Patch.java,v <-- Patch.java new revision: 1.13; previous revision: 1.12 done Checking in Patch.java; /cvs/diff/src/org/netbeans/modules/diff/builtin/Patch.java,v <-- Patch.java new revision: 1.12.6.2; previous revision: 1.12.6.1 done It should work O.K. now regardless on the line endings.
Cool, the patch application finished successfully. Verified in development build #200308060100 of NetBeans 4.0.