[PatchReader] interdiff does not work on files diffed against two different versions

NEW
Unassigned

Status

()

Bugzilla
Attachments & Requests
15 years ago
2 years ago

People

(Reporter: John Keiser (jkeiser), Unassigned)

Tracking

Details

(Reporter)

Description

15 years ago
interdiff tends to fail when two patches are against different versions of a
file, since the line numbers are often wrong.  When such a condition occurs, we
should try to resolve it by pulling the information from cvs.
(Reporter)

Comment 1

15 years ago
The algorithm I propose, which I have implemented before and works:

File is F, version from diff A is Va, version from diff B is Vb
(a) pull F, version Va, from cvs
(b) apply both diff A and diff B to the file.
(c) If both succeed, diff.
(d) If either application fails, repeat steps a-c using Vb instead of Va.
(e) If step (d) fails, the diff fails because there is essentially a conflict
between versions.  Use interdiff and throw up a warning that the diff may just
be plain wrong.
(Reporter)

Updated

15 years ago
Blocks: 195305
(Reporter)

Comment 2

15 years ago
interdiff has *another* problem: if the list of files is different, it chokes. 
This sucks.  We need to move to a new version ASAP.

Comment 3

15 years ago
What might happen is that part of the old diff got checked in as part of another
bug and it needs to be cvs up to the version in the new diff?
(Reporter)

Comment 4

14 years ago
Yes, and it's a fairly common occurrence here.  It's definitely a real problem.

Comment 5

13 years ago
(In reply to comment #2)
> interdiff has *another* problem: if the list of files is different, it chokes. 

interdiff also breaks if the order of diffing is different; for an example, see
attachment 192114 [details] [diff] [review] and attachment 193407 [details] [diff] [review].  Each patches the same list of files,
but comparing the two is impossible because one has toolkit/themes before
themes/ while the other has it the other way around.  I think this ordering
dependency in the viewer is probably the same bug as what you mention, but if
it's not let me know and I'll file a new bug.
OS: Windows XP → All
Hardware: PC → All
*** Bug 307549 has been marked as a duplicate of this bug. ***
The solution proposed above in comment 1 looks like it would work.
But I would settle for a lesser solution.

When you have two patches, each of which patches multiple files, and the two 
patches patch the same set of files in the same order, but ONE of those
files has a different version number in one patch than in the other, then 
interdiff outputs the diffs for the FIRST file in those patches, and stops 
there.  An example of this behavior is seen at
https://bugzilla.mozilla.org/attachment.cgi?oldid=194281&action=interdiff&newid=195237&headers=1

Even if Interdiff simply refuses to diff two patches to a file when they 
have different base versions, IMO, it ought to succesfully diff the patches
for all the other files that have the same version number in both patches.

Updated

12 years ago
QA Contact: mattyt-bugzilla → default-qa

Updated

11 years ago
Summary: Patch Viewer: interdiff does not work on files diffed against two different versions → [PatchReader] interdiff does not work on files diffed against two different versions

Updated

8 years ago
Assignee: john → attach-and-request
You need to log in before you can comment on or make changes to this bug.