#3963 Commit view inline diff should not show binary file diffs

v1.0.0
closed
nobody
42cc (432)
General
Cory Johns
2015-08-20
2012-03-28
Cory Johns
No

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.

Related

Tickets: #3963

Discussion

  • Anonymous - 2012-05-12

    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.

     
  • Dave Brondsema

    Dave Brondsema - 2012-08-02
    • labels: --> 42cc
     
  • Yaroslav Luzin - 2012-08-08
    • status: open --> in-progress
     
  • Yaroslav Luzin - 2012-08-08

    Closed #139, pushed changes into 42cc_3963 branch

     
  • Yaroslav Luzin - 2012-08-08
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2012-08-15
    • qa: Cory Johns
     
  • Cory Johns - 2012-08-15
    • status: code-review --> closed
    • milestone: forge-backlog --> forge-aug-24
     
  • Dave Brondsema

    Dave Brondsema - 2012-08-22
    • status: closed --> open
     
  • Dave Brondsema

    Dave Brondsema - 2012-08-22

    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).

     
  • Dave Brondsema

    Dave Brondsema - 2012-08-24
    • milestone: forge-sep-07 --> forge-backlog
     
  • Yaroslav Luzin - 2012-08-28
    • status: open --> in-progress
     
  • Yaroslav Luzin - 2012-08-28

    created #157: [#3963] Make the check for binary diffs not too restrictive (1cp)

     

    Related

    Tickets: #3963

  • Yaroslav Luzin - 2012-08-30

    closed #157, branch - 42cc_3963

    • status: in-progress --> code-review
     
  • Cory Johns - 2012-08-30
    • status: code-review --> closed

    • milestone: forge-backlog --> forge-sep-07

     

Log in to post a comment.