4052: Interdiff from deleted to modified file shows file as deleted
- Fixed
- Review Board
smacleod | |
smacleod |
What version are you running?
2.5.2
What's the URL of the page containing the problem?
https://reviewboard.mozilla.org/r/29831/diff/1-2/
What steps will reproduce the problem?
- Create a diff revision which removes a file (r1)
- Publish
- Create a new diff revision which doesn't remove the file, but modifies it. (r2)
- View the interdiff between the two revisions
What is the expected output? What do you see instead?
Expected: Interdiff showing add lines for the contents of the file in (r2).
Instead: Interdiff shows that the file was removed.Diff set information:
Diff Set Revision 1:
Generated From: https://reviewboard-hg.mozilla.org/gecko/rev/dcf453bcead9
ID: 64881
Differ Compatibility Version: 2
Commit ID: 9d013a40a75073665fe86ff02b0558f0e078bac0
Extra Data: {}
Relevant File Diff:
ID: 518509
Status: Deleted
Source File: dom/html/test/file_fullscreen-api-keys.html
Source File Revision: UNKNOWN
Destination File: dom/html/test/file_fullscreen-api-keys.html
Destination File Details:
Diff: filediff-518509.diff attached
Extra Data: {"orig_sha1": "ff9c2f6f5c8e6ec42b4a117c4be5f5994724f4a7", "total_line_count": 129, "patched_sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "raw_delete_count": 129, "delete_count": 129, "replace_count": 0, "raw_insert_count": 0, "insert_count": 0, "equal_count": 0}Diff Set Revision 2:
Generated From: https://reviewboard-hg.mozilla.org/gecko/rev/30ede73c4b96
ID: 65417
Differ Compatibility Version: 2
Commit ID: 5c5196bdd8252d52c0504dc1fdbb178e92d50dd0
Extra Data: {}
Relevant File Diff:
ID: 520857
Status: Modified
Source File: dom/html/test/file_fullscreen-api-keys.html
Source File Revision: UNKNOWN
Destination File: dom/html/test/file_fullscreen-api-keys.html
Destination File Details:
Diff: filediff-520857.diff attached
Extra Data: {"orig_sha1": "ff9c2f6f5c8e6ec42b4a117c4be5f5994724f4a7", "total_line_count": 132, "patched_sha1": "f8377baf538284b1715ea28c3a9f44ffaa258f25", "raw_delete_count": 107, "delete_count": 100, "replace_count": 7, "raw_insert_count": 10, "insert_count": 3, "equal_count": 22}
I'm working on this, wish me luck.
-
- New + Started -
+ Release-2.5.x -
- Priority:Medium + Component:DiffViewer + Interdiffs + Priority:High -
+ smacleod
So a bit of a status update for this bug, it actually has several layers to it:
1. Taking the interdiff into account when deciding if the file is deleted.
2. Properly marking this case as a new file in the interdiff
3. Fixing the opcode processor to stop filtering this case as all "filtered equal" chunks.The code I've posted in https://reviews.reviewboard.org/r/7874/ takes care of (1), I have a patch ready for (2) as well, but (3) is much more difficult and may take a little time for me to get a handle on - I'm still working on it.