Example: https://sourceforge.net/p/stockpot/code/ci/669baf789b3e042ce4d4dbca6e5e1d90ee0c53df/#diff-2
The normal diff view detects and doesn't render by default diffs for binary files. The inline diffs on the commit view should have the same behavior.
Originally by: kambi
I experience the same problem, with SVN repository.
The commit 11402 to SVN repository of castle-engine project added 19 PNG images and did 1 change in PHP file. Viewing in the Allura commit browser:
http://sourceforge.net/p/castle-engine/code/11402/
This shows all the additions to PNG files as text. So it's a little slow (seems to depend on overall SF overload, yesterday 2012-05-11 it was very slow, today it's faster), and it's filled with long and useless contents of binary (PNG) files represented as a sequence of characters (most of which cannot be rendered using a standard font). The only useful change (readable to human eye) is the small PHP change (/trunk/www/htdocs/news_2012.php) and the very end.
SVN default diff, by "svn diff -r11401:11402 http://svn.code.sf.net/p/castle-engine/code/trunk/", sees that the mime type is set to image/png, and doesn't display it at all ("Cannot display: file marked as a binary type."). Or I can use the --force option to override this, and successfully get 983K patch.
This former approach (don't try to display binary stuff) is the best approach for SF commit browser too IMHO, as the patches in Allura are mostly for human-browsing. For automated applying, you should use svn/git etc. commands, not copy-paste from Allura commit browser.
As a small suggestion, the solution that I would be very happy with (as it would also solve #3019) is to just show in Allura browser a colorized output of "svn diff" / "git diff" commands.
Closed #139, pushed changes into 42cc_3963 branch
The check for this is too restrictive. See http://sourceforge.net/u/skl85/phorkie/ci/36e2a88191a8dd59b642bf7b55692e18ad7e93fa/ for example.
The same logic should be used as that for displaying a regular file (IIRC, that is to check VIEWABLE_EXTENSIONS plus the tool settings).
created #157: [#3963] Make the check for binary diffs not too restrictive (1cp)
Related
Tickets:
#3963closed #157, branch - 42cc_3963
status: code-review --> closed
milestone: forge-backlog --> forge-sep-07