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.
Summary: | "Apply Patch" can not apply patches to files with Windows' line endings. | ||
---|---|---|---|
Product: | utilities | Reporter: | Jiri Kovalsky <jkovalsky> |
Component: | Diff | Assignee: | Martin Entlicher <mentlicher> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Exception thrown instead of patch application.
File that should be patched. File with "better" code that was used to create the patch. Patch file created from textual diff using command-line client. |
Description
Jiri Kovalsky
2002-09-19 10:00:33 UTC
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. |