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.

Bug 26757 - Apply patch doesn't work as expected
Summary: Apply patch doesn't work as expected
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-23 20:50 UTC by _ mihmax
Modified: 2003-06-30 17:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Original file (40.63 KB, text/plain)
2002-08-23 20:51 UTC, _ mihmax
Details
Patched file (1.15 KB, text/plain)
2002-08-23 20:52 UTC, _ mihmax
Details
The patch itself (4.45 KB, patch)
2002-08-23 20:52 UTC, _ mihmax
Details | Diff
Patched file (real) (43.63 KB, text/plain)
2002-08-23 20:54 UTC, _ mihmax
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ mihmax 2002-08-23 20:50:17 UTC
Apply patch doesn't work as expected,
see attached files
Comment 1 _ mihmax 2002-08-23 20:51:35 UTC
Created attachment 7201 [details]
Original file
Comment 2 _ mihmax 2002-08-23 20:52:19 UTC
Created attachment 7202 [details]
Patched file
Comment 3 _ mihmax 2002-08-23 20:52:47 UTC
Created attachment 7203 [details]
The patch itself
Comment 4 _ mihmax 2002-08-23 20:54:21 UTC
Created attachment 7204 [details]
Patched file (real)
Comment 5 _ mihmax 2002-08-23 20:56:05 UTC
Sorry, first "Patched file" was wrong (simply another file).
"Patched file (real)" - the errorful one.
Comment 6 _ mihmax 2002-08-23 20:57:10 UTC
I cannot apply patches sent by other people with this bug.
Comment 7 Martin Entlicher 2002-08-27 15:57:57 UTC
I was able to reproduce the problem.
It seems, that the only problem is the "*/", that is for some reason
added at the end of the merged patch. I'll explore that.
Comment 8 Martin Entlicher 2002-08-28 15:00:22 UTC
The bug is in the parsing algorithm of the context diff. The same
patch in standard UNIX diff format was applied correctly.
Scheduling target to 4.0.
Comment 9 Martin Entlicher 2002-08-29 18:26:41 UTC
Fixed in the main trunk. Apply of context patches should work
correctly in dev builds from 20020830 and newer.

/cvs/diff/src/org/netbeans/modules/diff/builtin/Patch.java,v  <-- 
Patch.java
new revision: 1.8; previous revision: 1.7
Comment 10 Martin Entlicher 2002-08-29 18:28:12 UTC
I propose this as a candidate into 3.4.1.
Comment 11 _ mihmax 2002-10-05 15:09:28 UTC
it works, I get the correct patched file,
thanks
Comment 12 _ mihmax 2002-12-01 22:32:45 UTC
commited to release341 branch
Comment 14 Quality Engineering 2003-06-30 17:41:08 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.