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

Summary: Apply patch doesn't work as expected
Product: utilities Reporter: _ mihmax <mihmax>
Component: DiffAssignee: Martin Entlicher <mentlicher>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Attachments: Original file
Patched file
The patch itself
Patched file (real)

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.