sureshvv / reviewboard

Automatically exported from code.google.com/p/reviewboard
0 stars 0 forks source link

Whitespace not ignored #529

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is a bug in myersdiff.py in function _gen_diff_codes(self, lines).
The "temp" is never assigned to "line".

Change from:
                # We still want to show lines that contain only whitespace.
                if temp != "":
                    line = temp

To:

                # We still want to show lines that contain only whitespace.
                if temp != "":
                    line = temp

                line = temp

Original issue reported on code.google.com by vesterb...@gmail.com on 2 Jul 2008 at 1:47

GoogleCodeExporter commented 9 years ago
sorry, ignore this. I had made some changes to the code which caused my 
problems.

Original comment by vesterb...@gmail.com on 2 Jul 2008 at 1:52

GoogleCodeExporter commented 9 years ago

Original comment by chip...@gmail.com on 2 Jul 2008 at 11:02

GoogleCodeExporter commented 9 years ago
But, what is the reason for:

                # We still want to show lines that contain only whitespace.
                if temp != "":
                    line = temp

?

This will show "empty"/"space diff only" lines as yellow. That might not always 
be
desirable. 

It should also be an option if you want to do left strip only (as it is now), 
or both
left and right strip, i.e., switch between

 if self.ignore_space:
                temp = line.lstrip()

and 

 if self.ignore_space:
                temp = line.strip()

Original comment by vesterb...@gmail.com on 3 Jul 2008 at 7:10

GoogleCodeExporter commented 9 years ago
Example of whitespace-only lines shown as different => confusing if there are a 
lot
of other changes as well.

Original comment by vesterb...@gmail.com on 3 Jul 2008 at 7:12

Attachments:

GoogleCodeExporter commented 9 years ago
You're saying any lines containing only whitespace show up as that? That's 
certainly
not happening in any install I've seen. Maybe I don't understand.

Original comment by chip...@gmail.com on 3 Jul 2008 at 7:25

GoogleCodeExporter commented 9 years ago
Yes, whitespace only. Using trunk version of reviewboard, svn diff.

Original comment by vesterb...@gmail.com on 3 Jul 2008 at 7:56