On 03/14/2013 04:20 PM, Kai Willadsen wrote:
On 1 March 2013 02:08, Jeff Webb <[email protected]> wrote:
There seems to be a "bug" in meld's directory view. If the
Preferences->Text Filters->"Ignore changes which insert or delete blank
lines" checkbox is enabled, files which differ only by blank lines show up
as being different in the directory view. If you click on one of these
files in the directory view, the file diff shows no differences, as
expected. It seems like the fix could be as simple as something like what
is shown in the patch below. You may want to do something more efficient,
but it seems that something like this is needed here. This fix is very
useful in conjunction with something like the "C++ comment" filter when you
are comparing different revisions of a project and want to find the files
that have non-comment differences. We were trying to do this in a case
where someone changed a revision number comment in every file. This fix
seems to work for our test case.
That also won't work for unicode or mac linebreaks, so we'd need to
establish a list of linebreaks that would be ignored in FileDiff by
the preference (which will then break when GTK or Python changes their
definitions, but hey).
That sounds like a good solution to me. I was also worried that the patch I posted may
slow things down for large directory diffs, since it is an extra step to run on each
file. Perhaps being able to enable this feature in the dirdiff "Filters"
drop-down would be a good idea, if that is an issue.
I'd like to fix the bug, but I don't want to encourage the idea that
that should work. I have to admit that it never occurred to me that
the blank line ignoring *would* propagate across to folder
comparisons. Basically, it's only there cause our filters can't handle
new lines.
My use case really has to do with the text filters as well, so I think the bug
is legitimate in that context. As you mentioned, if the filters could handle
new lines, this feature wouldn't matter very much. In my case, I want to see
only non-comment differences between two revisions of a source tree. Someone
decided that putting a revision number (and change log) in every file was a
good idea, so it looks like every file has changed between the two revisions.
With my patch applied, I can see which files have significant changes without
having to examine every one individually. When I examined the meld source
code, I discovered that the underlying issue was that even though the text
filters were applied, the line differences elimination code was not. That's
why I described the bug the way I did. I thought it would be more clear to not
mention the text filters, since that part seems to be working properly.
Could I ask you to file a bug please, and I'll take a look at a more
general patch?
Sure. I just filed Bug 695912:
https://bugzilla.gnome.org/show_bug.cgi?id=695912
Thanks for taking the time to examine this issue. Also, thank you for your
work on meld. My coworkers and I find the tool very useful. I also love that
it's written in python -- that made it easy to dive in and fix the issue.
-Jeff
_______________________________________________
meld-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/meld-list