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 #200207080100 of NetBeans 3.4 Windows 2000 with JDK 1.4.1 RC build #15 Description: ============ I produced three merging conflicts and did various hanky-panky with conflicts resolver. Then I noticed that I couldn't select one solution of certain conflict because it's "Accept" button was disabled although the second solution was chosen. So I tried to push "OK" button. It asked me "The file is modified. Do you want to save it ?" and offered only "OK" button ! I had confirmed it and the attached exception was thrown. Steps to reproduce: =================== 1. Create three conflicts: new line, modified lide and deleted line. 2. Invoke "Resolve Conflicts" on [Merge Conflicts] file. 3. Try to play with it. Resolve them many times differently. 4. Watch the ouput pane whether it contains correct result. 5. Push "OK" button. The exception might be thrown.
Created attachment 6537 [details] Suspicious exception thrown during saving operation.
Created attachment 6538 [details] Picture showing wrong contents in the output pane.
Starting to work on it, trying to reproduce. If it's a real bug, it seems to me like a P2, since it can make the conflicts resolver unusable. But after several attempts I was not able to reproduce the buggy behavior yet.
I was able tp reproduce it. The problem occures if one side of the conflict is empty. Priority increased to P2, since it can cause data loss.
Fixed in the main trunk, both exception and bad conflicts resolution for ADD and DELETE conflict types. Diffs: http://diff.netbeans.org/source/browse/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeControl.java.diff?r1=1.10&r2=1.11 http://diff.netbeans.org/source/browse/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java.diff?r1=1.13&r2=1.14 http://diff.netbeans.org/source/browse/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java.diff?r1=1.19&r2=1.20 http://vcsgeneric.netbeans.org/source/browse/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsResolveConflicts.java.diff?r1=1.5&r2=1.6 Fix description: MergeControl: A special adjustment added for conflicts, that are ADD or DELETE. Line numbers of these conflicts are different from CHANGE conflicts, there are zero second lines (e.g. [2, 0, 3, 5] for ADD and [2, 5, 3, 0] for DELETE). When a conflict resolves to nothing, we need to unhighlight the next line, that gets colored by the original highlight. MergeDialogComponent: For save confirmation is used NotifyDescriptor.Confirmation instead of NotifyDescriptor.Message. MergePanel: Fix for ArrayIndexOutOfBoundsException. Milos, can you please review the fix? Thanks.
I forgot to say, that the change in CvsResolveConflicts is necessary to refresh the file after partial conflicts resolution.
Great, I am glad to confirm it's working fine now. Verified in development build of NetBeans 4.0 #200207170450.
the fix seems ok to me. reviewed.
The fix was merged into the release34 branch.
Resolved for 3.3.x or earlier, no new info since then -> closing.