230: The "View Diff" does not show correctly file differences
- Fixed
- Review Board
stanim*******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
|
|
Oct. 5, 2007 |
What's the URL of the page containing the problem? http://reviewboard.eng.vmware.com/r/2945/diff/#index_header What steps will reproduce the problem? 1. Just open the page 2. Look at the link: tocWizard.py: 2 changes [ 1 2 ] 3. Now go the the diff for this file. What is the expected output? What do you see instead? The expected output is a diff which will show only the two differences and hide the unmodified parts of the file. What you see instead is the whole file shown in yellow. The differences are not correctly highlighted at all. What operating system are you using? What browser? OS: Windows XP Professional SP2, Firefox 2.0.06 Please provide any additional information below.
After some observation we started to suspect that the problem is due to the fact that in the repository (perforce) some files were submitted with DOS line endings. So maybe the DiffViewer does not handle 100% correctly that particular case
-
+
(For the patch see previous comment, somehow deleted the text) We had the same problem, the attached patch fixes our case.
The patch was proposed once before but breaks a lot of cases. The "\n" is intentional (we moved away from splitlines()). The case normalization needs to happen in the patching process. Which we do already, so I'm confused as to why this is happening. But no, using splitlines() is the wrong solution and will break a whole lot of common uses, as we've discovered.
I should be more specific. splitlines(), when operating on files with lots of unicode characters, will split lines at places you wouldn't expect. I have a fix in mind that I will test tomorrow, and hopefully we'll have this fixed soon.
-
+ chipx86