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 39456 - [REGRESSION] Graphical diff lines out of sync
Summary: [REGRESSION] Graphical diff lines out of sync
Status: RESOLVED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-02 03:47 UTC by _ gtzabari
Modified: 2005-10-26 10:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Newer version of file (130.16 KB, text/plain)
2004-02-02 03:48 UTC, _ gtzabari
Details
Older version of file (128.75 KB, text/plain)
2004-02-02 03:49 UTC, _ gtzabari
Details
Older file, test2 (130.17 KB, text/plain)
2004-02-03 22:19 UTC, _ gtzabari
Details
Newer file, test2 (135.33 KB, text/plain)
2004-02-03 22:19 UTC, _ gtzabari
Details
Screenshot of test2 (161.43 KB, image/jpeg)
2004-02-03 22:20 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2004-02-02 03:47:02 UTC
dev build 200401301900

   I've attached two versions of the same file. I
have noticed that the text diff displays the
correct results but the graphical diff lines get
out of sync for "2699a2720,2731". Specifically:

- Given a "new panel" and "old panel" associated
with the newer and older versions of the file
respectively.
- new lines (denoted by the color green) are shown
in the newer panel, but
- the old panel does not leave these lines blank.
Instead, it continues listing some code so that
when the "new lines section" is over the older
panel is out of sync by "length(new lines
section)" lines

    I know my explanation is quite cryptic but if
you take a look at the output yourself you should
be able to understand what I mean. Please feel
free to direct further questions to me if you need
any help reproducing this.
Comment 1 _ gtzabari 2004-02-02 03:48:01 UTC
Created attachment 13179 [details]
Newer version of file
Comment 2 _ gtzabari 2004-02-02 03:49:40 UTC
Created attachment 13180 [details]
Older version of file
Comment 3 Martin Entlicher 2004-02-02 10:26:26 UTC
Gili, I'm not able to reproduce this problem :-(

I've saved the attached files, selected them in NB and run Tools ->
Diff. The GUI diff looks good, there are no lines out of sync, all
lines match.

Then I've committed the files to a test local CVS repository as two
revisions of a single file. And CVS -> Graphical Diff also returned
correct results. I've tried switches like -b, -B, but the GUI diff was
always displayed correctly.

Gili, can you please attach the textual diff? IMHO the problem is
caused by the two empty lines, which are probably not reported by the
diff provider.

Also, how do you display the differences? Do you use Tools -> Diff on
two files, or do you have the files in CVS and use CVS -> Graphical
Diff? Do you set any extra options to the diff?
Comment 4 _ gtzabari 2004-02-03 22:18:29 UTC
Unfortunately I can no longer reproduce the original problem, but it
might be worth noting I found a related one. If you hit ALT-N/ALT-P to
move to the next/previous difference, weird things begin to happen. 

Attached are newer2.txt, older2.txt and screenshot2.jpg illustrating
the problem. What I noticed is that if you hit ALT-P and move to the
last diff found in the file, the left/right pane line numbers are out
of sync. If, however, you dumped these files to disk and ran TOOLS ->
DIFF on them the problem did not occur. So aparently there is a bug in
the online CVS | DIFF tool.

I can reproduce the problem on my end by diffing versions 1.211 and
1.215 of a certain file. Perhaps the bug is triggered by diffs across
multiple version numbers.
Comment 5 _ gtzabari 2004-02-03 22:19:09 UTC
Created attachment 13226 [details]
Older file, test2
Comment 6 _ gtzabari 2004-02-03 22:19:32 UTC
Created attachment 13227 [details]
Newer file, test2
Comment 7 _ gtzabari 2004-02-03 22:20:04 UTC
Created attachment 13228 [details]
Screenshot of test2
Comment 8 Martin Entlicher 2004-02-04 09:01:04 UTC
I was able to reproduce the problem that is shown in the screenshot
when I was switching between the first and the last difference.
When I touch the vertical scroll bar, the lines are corrected.

This seems to occur only when the last difference is on the last line.
File "newer2.txt" does not end with a newline. Maybe that this is
causing the problems.

I'm lowering the priority to P3, this does not seem to be a serious
problem.
Comment 9 Martin Entlicher 2004-03-02 12:48:39 UTC
Moving to diff module, this is a problem of the GUI diff visualizer.
Comment 10 Martin Entlicher 2004-04-23 17:14:07 UTC
Scheduling for promotion D.
Comment 11 _ pkuzel 2005-10-26 10:46:12 UTC
Can not reproduce anymore.
Comment 12 _ pkuzel 2005-10-26 10:48:01 UTC
Besides new Hunt algorithm is very neat it correctly detects /* end */ as pure
addition.