Defect #1175
open
Empty diff page for binary files
Added by Leszek Ciesielski over 16 years ago.
Updated about 1 year ago.
Description
When files are commited to svn repository with binary mime type (generally anything with application/* mime), Redmine still shows the "Annotate" button for them, but pressing it shows an empty change list. It would be more user-friendly to show some kind of message indicating why no diff is available (e.g. "This file has a binary mime type of application/xml").
Sorry, I didn't see that you said "svn repository".
Don't you get the same error message on your install ?
My mistake. The 'Annotate' behaves as expected, it's the 'Compare Differences' that shows no error message.
- Subject changed from Empty annotate page for binary files to Empty diff page for binary files
- Status changed from New to Confirmed
Hi there,
I just tested this on redmine.org, this seems to be still reproduceable.
See here
Best regards,
Daniel
Peter Kövesdi wrote in #note-7:
Even worse: the changes in binary files are not even mentioned when comparing the whole revisions:
I made a littel tweaky, ugly solution: I added the following to the top of `app/views/common/_diff.html.erb`:
<% diff1=[]
diff.each { |line|
if line =~ /Binary files (.+?) and (.+?) differ/
diff1.append("--- "+$1+"\n")
diff1.append("+++ "+$2+"\n")
diff1.append("@@ -0,0 +0,0 @@\n")
diff1.append(" Binary file")
else
diff1.append(line)
end
diff = diff1
} %>
This just tweaks the output of git diff to pretend, the binary changes were diffable. Of course, better would be to change the the redmine source to correctly handle the "Binary files ... and ... differ" output lines of `git diff` and show them nicely as files with path, similar to the revision view. But this is beyond my time and skill at the moment.
Also available in: Atom
PDF